File tree Expand file tree Collapse file tree 13 files changed +18
-18
lines changed Expand file tree Collapse file tree 13 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 7
7
//! The procedural macro here is relatively simple, it simply appends a
8
8
//! `#[test]` function to the original token stream which asserts that the
9
9
//! function itself contains the relevant instruction.
10
+ #![ deny( rust_2018_idioms) ]
10
11
11
12
extern crate proc_macro;
12
13
extern crate proc_macro2;
@@ -177,7 +178,7 @@ struct Invoc {
177
178
}
178
179
179
180
impl syn:: parse:: Parse for Invoc {
180
- fn parse ( input : syn:: parse:: ParseStream ) -> syn:: Result < Self > {
181
+ fn parse ( input : syn:: parse:: ParseStream < ' _ > ) -> syn:: Result < Self > {
181
182
use syn:: { ext:: IdentExt , Token } ;
182
183
183
184
let mut instr = String :: new ( ) ;
Original file line number Diff line number Diff line change 2
2
#![ allow( improper_ctypes_definitions) ]
3
3
#![ allow( dead_code) ]
4
4
#![ allow( unused_features) ]
5
+ #![ deny( rust_2018_idioms) ]
5
6
#![ feature(
6
7
asm,
7
8
const_fn,
@@ -68,9 +69,6 @@ extern crate std;
68
69
#[ cfg( test) ]
69
70
#[ macro_use]
70
71
extern crate std_detect;
71
- #[ cfg( test) ]
72
- extern crate stdarch_test;
73
-
74
72
#[ path = "mod.rs" ]
75
73
mod core_arch;
76
74
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use crate::core_arch::x86::__m256i;
9
9
use crate :: core_arch:: x86:: __m512i;
10
10
11
11
#[ cfg( test) ]
12
- use crate :: stdarch_test:: assert_instr;
12
+ use stdarch_test:: assert_instr;
13
13
14
14
#[ allow( improper_ctypes) ]
15
15
extern "C" {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ mod tests {
87
87
}
88
88
89
89
impl fmt:: Debug for FxsaveArea {
90
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
90
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
91
91
write ! ( f, "[" ) ?;
92
92
for i in 0 ..self . data . len ( ) {
93
93
write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change 8
8
use crate :: core_arch:: x86:: __m128i;
9
9
10
10
#[ cfg( test) ]
11
- use crate :: stdarch_test:: assert_instr;
11
+ use stdarch_test:: assert_instr;
12
12
13
13
#[ allow( improper_ctypes) ]
14
14
extern "C" {
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ mod tests {
196
196
}
197
197
198
198
impl fmt:: Debug for XsaveArea {
199
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
199
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
200
200
write ! ( f, "[" ) ?;
201
201
for i in 0 ..self . data . len ( ) {
202
202
write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ mod tests {
87
87
}
88
88
89
89
impl fmt:: Debug for FxsaveArea {
90
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
90
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
91
91
write ! ( f, "[" ) ?;
92
92
for i in 0 ..self . data . len ( ) {
93
93
write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ mod tests {
164
164
}
165
165
166
166
impl fmt::Debug for XsaveArea {
167
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
167
+ fn fmt(&self, f: &mut fmt::Formatter<'_> ) -> fmt::Result {
168
168
write!(f, "[")?;
169
169
for i in 0..self.data.len() {
170
170
write!(f, "{}", self.data[i])?;
Original file line number Diff line number Diff line change 2
2
//!
3
3
//! This macro expands to a `#[test]` function which tests the local machine
4
4
//! for the appropriate cfg before calling the inner test function.
5
+ #![ deny( rust_2018_idioms) ]
5
6
6
7
extern crate proc_macro;
7
8
extern crate proc_macro2;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ impl CpuInfo {
17
17
} )
18
18
}
19
19
/// Returns the value of the cpuinfo `field`.
20
- pub ( crate ) fn field ( & self , field : & str ) -> CpuInfoField {
20
+ pub ( crate ) fn field ( & self , field : & str ) -> CpuInfoField < ' _ > {
21
21
for l in self . raw . lines ( ) {
22
22
if l. trim ( ) . starts_with ( field) {
23
23
return CpuInfoField :: new ( l. split ( ": " ) . nth ( 1 ) ) ;
You can’t perform that action at this time.
0 commit comments