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 77//! The procedural macro here is relatively simple, it simply appends a
88//! `#[test]` function to the original token stream which asserts that the
99//! function itself contains the relevant instruction.
10+ #![ deny( rust_2018_idioms) ]
1011
1112extern crate proc_macro;
1213extern crate proc_macro2;
@@ -162,7 +163,7 @@ struct Invoc {
162163}
163164
164165impl syn:: parse:: Parse for Invoc {
165- fn parse ( input : syn:: parse:: ParseStream ) -> syn:: Result < Self > {
166+ fn parse ( input : syn:: parse:: ParseStream < ' _ > ) -> syn:: Result < Self > {
166167 use syn:: { ext:: IdentExt , Token } ;
167168
168169 let mut instr = String :: new ( ) ;
Original file line number Diff line number Diff line change 22#![ allow( improper_ctypes_definitions) ]
33#![ allow( dead_code) ]
44#![ allow( unused_features) ]
5+ #![ deny( rust_2018_idioms) ]
56#![ feature(
67 asm,
78 const_fn,
@@ -69,9 +70,6 @@ extern crate std;
6970#[ cfg( test) ]
7071#[ macro_use]
7172extern crate std_detect;
72- #[ cfg( test) ]
73- extern crate stdarch_test;
74-
7573#[ path = "mod.rs" ]
7674mod core_arch;
7775
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use crate::core_arch::x86::__m256i;
99use crate :: core_arch:: x86:: __m512i;
1010
1111#[ cfg( test) ]
12- use crate :: stdarch_test:: assert_instr;
12+ use stdarch_test:: assert_instr;
1313
1414#[ allow( improper_ctypes) ]
1515extern "C" {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ mod tests {
8787 }
8888
8989 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 {
9191 write ! ( f, "[" ) ?;
9292 for i in 0 ..self . data . len ( ) {
9393 write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change 88use crate :: core_arch:: x86:: __m128i;
99
1010#[ cfg( test) ]
11- use crate :: stdarch_test:: assert_instr;
11+ use stdarch_test:: assert_instr;
1212
1313#[ allow( improper_ctypes) ]
1414extern "C" {
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ mod tests {
196196 }
197197
198198 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 {
200200 write ! ( f, "[" ) ?;
201201 for i in 0 ..self . data . len ( ) {
202202 write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ mod tests {
8787 }
8888
8989 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 {
9191 write ! ( f, "[" ) ?;
9292 for i in 0 ..self . data . len ( ) {
9393 write ! ( f, "{}" , self . data[ i] ) ?;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ mod tests {
164164 }
165165
166166 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 {
168168 write!(f, "[")?;
169169 for i in 0..self.data.len() {
170170 write!(f, "{}", self.data[i])?;
Original file line number Diff line number Diff line change 22//!
33//! This macro expands to a `#[test]` function which tests the local machine
44//! for the appropriate cfg before calling the inner test function.
5+ #![ deny( rust_2018_idioms) ]
56
67extern crate proc_macro;
78extern crate proc_macro2;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ impl CpuInfo {
1717 } )
1818 }
1919 /// 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 < ' _ > {
2121 for l in self . raw . lines ( ) {
2222 if l. trim ( ) . starts_with ( field) {
2323 return CpuInfoField :: new ( l. split ( ": " ) . nth ( 1 ) ) ;
You can’t perform that action at this time.
0 commit comments