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 idioms: incorrect suggestion for root module and crate of same name #55759

Open
alexcrichton opened this Issue Nov 7, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@alexcrichton
Copy link
Member

alexcrichton commented Nov 7, 2018

First reported at rust-lang/cargo#6273

this code:

#![warn(rust_2018_idioms)]

extern crate time as std_time;

pub mod time {
    pub fn f() {
        println!("{:?}", crate::std_time::now());
    }
}

fn main() {}

when compiled gives a warning that, when applied, produces code that doesn't compile

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Nov 7, 2018

@ehuss notes that this code is likely relevant here.

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