Skip to content

Regression in autoderef on ascii traits #32074

Description

@Manishearth

The following code compiles on stable but gives an error on beta/nightly:

use std::ascii::AsciiExt; 

fn main() {
        let x = "a".to_string();
        x.eq_ignore_ascii_case("A");
}

playpen

<anon>:5:32: 5:35 error: mismatched types:
 expected `&collections::string::String`,
    found `&'static str`
(expected struct `collections::string::String`,
    found str) [E0308]
<anon>:5         x.eq_ignore_ascii_case("A");

This was caused by the new impl of AsciiExt on String: 700ac0e

cc @SimonSapin @alexcrichton

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highHigh priorityT-libs-api[DEPRECATED; DO NOT USE]regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions