File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // Tests that namespaced crate names are limited to two segments
2+
3+ //@ aux-crate: nscrate::three::segments=open-ns-my_api_utils.rs
4+ //@ compile-flags: -Z namespaced-crates
5+ //@ edition: 2024
6+ //~? ERROR crate name `nscrate::three::segments` passed to `--extern` can have at most two segments.
7+
8+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: crate name `nscrate::three::segments` passed to `--extern` can have at most two segments.
2+
Original file line number Diff line number Diff line change 1+ // Tests that namespaced crate names are limited to two segments
2+
3+ //@ aux-crate: std::utils=open-ns-my_api_utils.rs
4+ //@ compile-flags: -Z namespaced-crates
5+ //@ edition: 2024
6+
7+ use std:: utils:: get_u32;
8+ //~^ ERROR unresolved import `std::utils`
9+
10+ fn main ( ) {
11+ let _ = get_u32 ( ) ;
12+ }
Original file line number Diff line number Diff line change 1+ error[E0432]: unresolved import `std::utils`
2+ --> $DIR/open-ns-11.rs:7:10
3+ |
4+ LL | use std::utils::get_u32;
5+ | ^^^^^ could not find `utils` in `std`
6+
7+ error: aborting due to 1 previous error
8+
9+ For more information about this error, try `rustc --explain E0432`.
Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ macro_rules! import_and_call {
1313}
1414
1515fn main ( ) {
16- import_and_call ! ( my_api:: utils:: utils_helper, utils_helper)
16+ import_and_call ! ( my_api:: utils:: utils_helper, utils_helper) ;
17+ let _x = 4 + 5 ;
1718}
You can’t perform that action at this time.
0 commit comments