File tree 13 files changed +84
-0
lines changed
13 files changed +84
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ const SKIP_FILE_WHITE_LIST: &[&str] = &[
30
30
// These files and directory are a part of modules defined inside `cfg_if!`.
31
31
"cfg_if/mod.rs" ,
32
32
"cfg_if/detect" ,
33
+ "issue-3253/foo.rs" ,
34
+ "issue-3253/bar.rs" ,
35
+ "issue-3253/paths" ,
33
36
// These files and directory are a part of modules defined inside `cfg_attr(..)`.
34
37
"cfg_mod/dir" ,
35
38
"cfg_mod/bar.rs" ,
Original file line number Diff line number Diff line change
1
+ // Empty
2
+ fn empty ( ) {
3
+
4
+ }
Original file line number Diff line number Diff line change
1
+ pub fn hello ( )
2
+ {
3
+ println ! ( "Hello World!" ) ;
4
+
5
+ }
6
+
Original file line number Diff line number Diff line change
1
+ #[ macro_use]
2
+ extern crate cfg_if;
3
+
4
+ cfg_if ! {
5
+ if #[ cfg( target_family = "unix" ) ] {
6
+ mod foo;
7
+ #[ path = "paths/bar_foo.rs" ]
8
+ mod bar_foo;
9
+ } else {
10
+ mod bar;
11
+ #[ path = "paths/foo_bar.rs" ]
12
+ mod foo_bar;
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ fn foo_decl_item ( x : & mut i32 ) {
2
+ x = 3 ;
3
+ }
Original file line number Diff line number Diff line change
1
+ // This module is not imported in the cfg_if macro in lib.rs so it is ignored
2
+ // while the foo and bar mods are formatted.
3
+ // Check the corresponding file in tests/target/issue-3253/paths/excluded.rs
4
+ trait CoolerTypes { fn dummy ( & self ) {
5
+ }
6
+ }
Original file line number Diff line number Diff line change
1
+
2
+
3
+ fn Foo < T > ( ) where T : Bar {
4
+ }
Original file line number Diff line number Diff line change
1
+ // Empty
2
+ fn empty ( ) { }
Original file line number Diff line number Diff line change
1
+ pub fn hello ( ) {
2
+ println ! ( "Hello World!" ) ;
3
+ }
Original file line number Diff line number Diff line change
1
+ #[ macro_use]
2
+ extern crate cfg_if;
3
+
4
+ cfg_if ! {
5
+ if #[ cfg( target_family = "unix" ) ] {
6
+ mod foo;
7
+ #[ path = "paths/bar_foo.rs" ]
8
+ mod bar_foo;
9
+ } else {
10
+ mod bar;
11
+ #[ path = "paths/foo_bar.rs" ]
12
+ mod foo_bar;
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ fn foo_decl_item ( x : & mut i32 ) {
2
+ x = 3 ;
3
+ }
Original file line number Diff line number Diff line change
1
+ // This module is not imported in the cfg_if macro in lib.rs so it is ignored
2
+ // while the foo and bar mods are formatted.
3
+ // Check the corresponding file in tests/source/issue-3253/paths/excluded.rs
4
+
5
+
6
+
7
+
8
+ fn Foo < T > ( ) where T : Bar {
9
+ }
10
+
11
+
12
+
13
+ trait CoolerTypes { fn dummy ( & self ) {
14
+ }
15
+ }
16
+
17
+
Original file line number Diff line number Diff line change
1
+ fn Foo < T > ( )
2
+ where
3
+ T : Bar ,
4
+ {
5
+ }
You can’t perform that action at this time.
0 commit comments