rust/tests/ui/rfcs/rfc-2126-crate-paths/crate-path-non-absolute.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
213 B
Rust
Raw Normal View History

2017-11-04 15:56:45 -05:00
struct S;
2016-04-24 13:35:50 -05:00
2018-04-20 19:04:29 -05:00
pub mod m {
2017-11-04 15:56:45 -05:00
fn f() {
2018-04-20 19:04:29 -05:00
let s = ::m::crate::S; //~ ERROR failed to resolve
let s1 = ::crate::S; //~ ERROR failed to resolve
2018-04-20 19:04:29 -05:00
let s2 = crate::S; // no error
2017-11-04 15:56:45 -05:00
}
2016-04-24 13:35:50 -05:00
}
2017-11-04 15:56:45 -05:00
fn main() {}