File tree 1 file changed +9
-33
lines changed
1 file changed +9
-33
lines changed Original file line number Diff line number Diff line change 1
- //@ run-pass
2
-
3
- //! This test was to solve a bug as the rust notation for attributes on modules was transitioning
4
- //! from
5
- //!
6
- //! ```
7
- //! mod foo = "foo.rs";
8
- //! ```
9
- //!
10
- //! to
1
+ //! Regression test to check that attributes for the first module get applied to the first module
2
+ //! only and not to subsequent modules
11
3
//!
12
- //! ```
13
- //! #[path = "foo.rs"]
14
- //! mod foo;
15
- //! ```
16
- //!
17
- //! This specifically was testing when an attribute was being applied to all modules instead of the
18
- //! first one
19
- //!
20
- //! Added in commit: https://github.com/rust-lang/rust/commit/7aee9f7b56f8d96f9444ebb1d06e32e024b81974
21
- //! Issue : https://github.com/rust-lang/rust/issues/906
22
-
23
- #[ cfg( target_os = "linux" ) ]
24
- mod hello { }
25
-
26
- #[ cfg( target_os = "macos" ) ]
27
- mod hello { }
4
+ //! Added in commit: <https://github.com/rust-lang/rust/commit/7aee9f7b56f8d96f9444ebb1d06e32e024b81974>
5
+ //! Issue : <https://github.com/rust-lang/rust/issues/906>
28
6
29
- #[ cfg( target_os = "windows" ) ]
30
- mod hello { }
31
-
32
- #[ cfg( target_os = "freebsd" ) ]
33
- mod hello { }
7
+ //@ check-pass
8
+ //@ compile-flags: --cfg=first
9
+ //@ no-auto-check-cfg
34
10
35
- #[ cfg( target_os = "dragonfly" ) ]
11
+ #[ cfg( first ) ]
36
12
mod hello { }
37
13
38
- #[ cfg( target_os = "android" ) ]
14
+ #[ cfg( not_set ) ]
39
15
mod hello { }
40
16
41
17
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments