File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ fn main() {
1212 let _ = root_function ( ) ;
1313 let _ = my_api:: root_function ( ) ;
1414 let _ = my_api:: utils:: utils_helper ( ) ;
15- //~^ ERROR E0433
15+ //~^ ERROR cannot find `utils` in `my_api` [ E0433]
1616 let _ = util:: util_mod_helper ( ) ;
1717 let _ = my_api:: core:: core_fn ( ) ;
18- //~^ ERROR E0433
18+ //~^ ERROR cannot find `core` in `my_api` [ E0433]
1919}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 55//@ edition: 2024
66
77use my_api:: core:: { core_fn, core_fn2} ;
8- //~^ ERROR E0432
8+ //~^ ERROR unresolved import `my_api::core` [ E0432]
99use my_api:: utils:: * ;
10- //~^ ERROR E0432
10+ //~^ ERROR unresolved import `my_api::utils` [ E0432]
1111use my_api:: * ;
1212
1313fn main ( ) {
Original file line number Diff line number Diff line change 1010fn main ( ) {
1111 let _ = my_api:: utils:: root_helper ( ) ;
1212 let _ = my_api:: utils:: utils_helper ( ) ;
13- //~^ ERROR E0425
13+ //~^ ERROR cannot find function `utils_helper` in module `my_api::utils` [ E0425]
1414}
Original file line number Diff line number Diff line change 88fn main ( ) {
99 let _ = my_api:: root_function ( ) ;
1010 let _ = my_api:: utils:: utils_helper ( ) ;
11- //~^ ERROR E0433
11+ //~^ ERROR cannot find `utils` in `my_api` [ E0433]
1212}
Original file line number Diff line number Diff line change 33//@ aux-crate: my_api::utils=open-ns-my_api_utils.rs
44//@ compile-flags: -Z namespaced-crates
55//@ edition: 2024
6- //@ build -pass
6+ //@ check -pass
77
88macro_rules! import_and_call {
99 ( $import_path: path, $fn_name: ident) => { {
Original file line number Diff line number Diff line change 33//@ aux-crate: my_api::utils=open-ns-my_api_utils.rs
44//@ compile-flags: -Z namespaced-crates
55//@ edition: 2024
6- //@ build -pass
6+ //@ check -pass
77
88use my_api;
99use my_api:: utils:: utils_helper;
Original file line number Diff line number Diff line change 66//@ edition: 2024
77
88use my_api:: utils:: utils_helper;
9- //~^ ERROR E0432
9+ //~^ ERROR unresolved import `my_api::utils` [ E0432]
1010
1111fn main ( ) {
1212 let _ = my_api:: utils:: utils_helper ( ) ;
13- //~^ ERROR E0433
13+ //~^ ERROR cannot find `utils` in `my_api` [ E0433]
1414}
Original file line number Diff line number Diff line change 1- // Tests that namespaced crate names work inside macros.
1+ // Tests that a macro-generated item has higher precendence than a namespaced crate
22//@ aux-crate: my_api::utils=open-ns-my_api_utils.rs
33//@ compile-flags: -Z namespaced-crates
44//@ edition: 2024
5- //@ build -pass
5+ //@ check -pass
66
77macro_rules! define {
88 ( ) => {
Original file line number Diff line number Diff line change 1- // Tests that namespaced crate names work inside macros.
21//@ aux-crate: my_api::utils=open-ns-my_api_utils.rs
32//@ compile-flags: -Z namespaced-crates
43//@ edition: 2024
5- //@ build-pass
4+
5+ use my_api:: utils:: get_u32;
6+ //~^ ERROR `my_api` is ambiguous [E0659]
67
78macro_rules! define {
89 ( ) => {
@@ -12,18 +13,13 @@ macro_rules! define {
1213 2
1314 }
1415 }
15-
16- pub mod unique {
17- pub fn get_u32( ) -> u32 {
18- 2
19- }
20- }
2116 }
2217 } ;
2318}
2419
20+ define ! ( ) ;
21+
2522fn main ( ) {
26- define ! ( ) ;
27- let res1 = my_api:: unique:: get_u32 ( ) ;
28- assert_eq ! ( res1, 2 ) ;
23+ let val = get_u32 ( ) ;
24+ assert_eq ! ( val, 2 ) ;
2925}
You can’t perform that action at this time.
0 commit comments