Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018 compatibility lint isn't firing for all imports that need to be rewritten #50660

Closed
alexcrichton opened this issue May 11, 2018 · 0 comments · Fixed by #50665
Closed

2018 compatibility lint isn't firing for all imports that need to be rewritten #50660

alexcrichton opened this issue May 11, 2018 · 0 comments · Fixed by #50665
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-rust-2018-preview Area: The 2018 edition preview

Comments

@alexcrichton
Copy link
Member

alexcrichton commented May 11, 2018

This code:

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

mod m {
    use foo;

    crate fn bar() {
        foo();
    }
}

fn foo() {}

fn main() {
    m::bar();
}

on nightly produces no warnings, but to compile in the 2018 edition the use statement needs to be rewritten to crate::.

@alexcrichton alexcrichton added the A-diagnostics Area: Messages for errors, warnings, and lints label May 11, 2018
Manishearth added a commit to Manishearth/rust that referenced this issue May 11, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 11, 2018
This commit fixes recommending the `crate` prefix when migrating to 2018 for
paths that look like `use foo;` or `use {bar, baz}`

Closes rust-lang#50660
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 11, 2018
…arnings, r=Manishearth

rustc: Fix `crate` lint for single-item paths

This commit fixes recommending the `crate` prefix when migrating to 2018 for
paths that look like `use foo;` or `use {bar, baz}`

Closes rust-lang#50660
@alexcrichton alexcrichton added the A-rust-2018-preview Area: The 2018 edition preview label May 11, 2018
@alexcrichton alexcrichton self-assigned this May 11, 2018
alexcrichton added a commit to alexcrichton/rust that referenced this issue May 15, 2018
This commit fixes recommending the `crate` prefix when migrating to 2018 for
paths that look like `use foo;` or `use {bar, baz}`

Closes rust-lang#50660
bors added a commit that referenced this issue May 17, 2018
…oli-obk

rustc: Fix `crate` lint for single-item paths

This commit fixes recommending the `crate` prefix when migrating to 2018 for
paths that look like `use foo;` or `use {bar, baz}`

Closes #50660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-rust-2018-preview Area: The 2018 edition preview
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant