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"
99repository = " https://github.com/rust-lang/libc"
1010
1111[dependencies ]
12+ annotate-snippets = { version = " 0.11.5" , features = [" testing-colors" ] }
1213cfg-if = " 1.0.1"
1314libc = { 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" ] }
1417
1518[dev-dependencies ]
16- syn = { version = " 2.0.104" , features = [" full" , " visit" ] }
17- proc-macro2 = { version = " 1.0.95" , features = [" span-locations" ] }
1819glob = " 0.3.2"
19- annotate-snippets = { version = " 0.11.5" , features = [" testing-colors" ] }
2020
2121[build-dependencies ]
2222cc = " 1.2.29"
@@ -95,12 +95,7 @@ harness = true
9595
9696[[test ]]
9797name = " 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"
10499harness = true
105100
106101# 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;
3737use syn:: visit:: { self , Visit } ;
3838use syn:: Token ;
3939
40+ #[ cfg( test) ]
41+ mod tests;
42+
4043const ALLOWED_REPEATED_MACROS : & [ & str ] = & [ "s" , "s_no_extra_traits" , "s_paren" ] ;
4144
4245pub type Error = Box < dyn std:: error:: Error > ;
Original file line number Diff line number Diff line change 11//! Verifies the implementation of the style checker in [style].
22
3- use style:: StyleChecker ;
4-
5- pub mod style;
3+ use super :: StyleChecker ;
64
75#[ test]
86fn check_style_accept_correct_module_layout ( ) {
Original file line number Diff line number Diff line change 99//! cargo test --test style
1010//! ```
1111
12- pub mod style;
13-
1412use std:: env;
1513use std:: path:: Path ;
1614
17- use style:: { Result , StyleChecker } ;
15+ use libc_test :: style:: { Result , StyleChecker } ;
1816
1917/// Relative to `src/`.
2018const SKIP_PREFIXES : & [ & str ] = & [
You can’t perform that action at this time.
0 commit comments