File tree Expand file tree Collapse file tree 1 file changed +9
-33
lines changed Expand file tree Collapse file tree 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
113//!
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>
286
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
3410
35- #[ cfg( target_os = "dragonfly" ) ]
11+ #[ cfg( first ) ]
3612mod hello { }
3713
38- #[ cfg( target_os = "android" ) ]
14+ #[ cfg( not_set ) ]
3915mod hello { }
4016
4117fn main ( ) { }
You can’t perform that action at this time.
0 commit comments