Skip to content

migration lint for use crate fails with <Foo as Bar>::Baz paths #50970

Closed
@nikomatsakis

Description

@nikomatsakis

Test case:

#![warn(rust_2018_compatibility)]
#![feature(rust_2018_preview)]

mod foo {
    crate trait Foo {
        type Bar;
    }

    impl Foo for u32 {
        type Bar = ();
    }
}


fn main() {
    let _: <u32 as ::foo::Foo>::Bar = ();
}

This currently suggests:

help: use `crate`: `crate::<u32 as ::foo::Foo>::Bar`

but should suggest:

help: use `crate`: `<u32 as crate::foo::Foo>::Bar`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions