Skip to content

Problem with type inference resolution #51223

@Lapz

Description

@Lapz

A problem was found with the type inference resoultion when the env_logger crate was imported. The issue was reported on reddit and errors on the latest stable and nightly.

// Uncomment this and it breaks...
extern crate env_logger;

fn main() {
    let string = String::new();
    let str = <&str>::from(&string);

    println!("{:?}", str);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inferenceArea: Type inferenceA-trait-systemArea: Trait systemT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions