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 23:56:45 +03:00
struct S;
2016-04-24 21:35:50 +03:00
2018-04-20 17:04:29 -07:00
pub mod m {
2017-11-04 23:56:45 +03:00
fn f() {
2018-04-20 17:04:29 -07:00
let s = ::m::crate::S; //~ ERROR failed to resolve
let s1 = ::crate::S; //~ ERROR failed to resolve
2018-04-20 17:04:29 -07:00
let s2 = crate::S; // no error
2017-11-04 23:56:45 +03:00
}
2016-04-24 21:35:50 +03:00
}
2017-11-04 23:56:45 +03:00
fn main() {}