Closed
Description
First reported at rust-lang/cargo#5797, this code:
#![feature(rust_2018_preview)]
#![warn(rust_2018_compatibility)]
fn generic_return<T>() {
}
pub struct B{}
pub mod submod {
pub fn test() {
::generic_return::<::B>();
}
}
fn main() {}
yields these warnings:
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/main.rs:11:9
|
11 | ::generic_return::<::B>();
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::generic_return::<::B>`
|
note: lint level defined here
--> src/main.rs:2:9
|
2 | #![warn(rust_2018_compatibility)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: #[warn(absolute_paths_not_starting_with_crate)] implied by #[warn(rust_2018_compatibility)]
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/main.rs:11:28
|
11 | ::generic_return::<::B>();
| ^^^ help: use `crate`: `crate::B`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
unfortunately though, the overlapping suggestions here means that rustfix can't apply a fix!