File tree Expand file tree Collapse file tree 5 files changed +10
-15
lines changed Expand file tree Collapse file tree 5 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,14 @@ license = "MIT OR Apache-2.0"
9
9
repository = " https://github.com/rust-lang/libc"
10
10
11
11
[dependencies ]
12
+ annotate-snippets = { version = " 0.11.5" , features = [" testing-colors" ] }
12
13
cfg-if = " 1.0.1"
13
14
libc = { path = " .." , version = " 1.0.0-alpha.1" , default-features = false }
15
+ proc-macro2 = { version = " 1.0.95" , features = [" span-locations" ] }
16
+ syn = { version = " 2.0.104" , features = [" full" , " visit" ] }
14
17
15
18
[dev-dependencies ]
16
- syn = { version = " 2.0.104" , features = [" full" , " visit" ] }
17
- proc-macro2 = { version = " 1.0.95" , features = [" span-locations" ] }
18
19
glob = " 0.3.2"
19
- annotate-snippets = { version = " 0.11.5" , features = [" testing-colors" ] }
20
20
21
21
[build-dependencies ]
22
22
cc = " 1.2.29"
@@ -95,12 +95,7 @@ harness = true
95
95
96
96
[[test ]]
97
97
name = " style"
98
- path = " test/check_style.rs"
99
- harness = true
100
-
101
- [[test ]]
102
- name = " style_tests"
103
- path = " test/style_tests.rs"
98
+ path = " test/style.rs"
104
99
harness = true
105
100
106
101
# FIXME(msrv): These should be moved to the root Cargo.toml as `[workspace.lints.*]`
Original file line number Diff line number Diff line change
1
+ pub mod style;
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ use syn::spanned::Spanned;
37
37
use syn:: visit:: { self , Visit } ;
38
38
use syn:: Token ;
39
39
40
+ #[ cfg( test) ]
41
+ mod tests;
42
+
40
43
const ALLOWED_REPEATED_MACROS : & [ & str ] = & [ "s" , "s_no_extra_traits" , "s_paren" ] ;
41
44
42
45
pub type Error = Box < dyn std:: error:: Error > ;
Original file line number Diff line number Diff line change 1
1
//! Verifies the implementation of the style checker in [style].
2
2
3
- use style:: StyleChecker ;
4
-
5
- pub mod style;
3
+ use super :: StyleChecker ;
6
4
7
5
#[ test]
8
6
fn check_style_accept_correct_module_layout ( ) {
Original file line number Diff line number Diff line change 9
9
//! cargo test --test style
10
10
//! ```
11
11
12
- pub mod style;
13
-
14
12
use std:: env;
15
13
use std:: path:: Path ;
16
14
17
- use style:: { Result , StyleChecker } ;
15
+ use libc_test :: style:: { Result , StyleChecker } ;
18
16
19
17
/// Relative to `src/`.
20
18
const SKIP_PREFIXES : & [ & str ] = & [
You can’t perform that action at this time.
0 commit comments