about summary refs log tree commit diff
path: root/library/stdarch/crates/assert-instr-macro/src
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-04-07 00:46:39 -0400
committerGitHub <noreply@github.com>2021-04-07 05:46:39 +0100
commit7bab2c06958fc21081e6a4e1a4e1a9d4bc35f701 (patch)
tree5609c3befbb8a0a797ae555bf148e53f256c33e0 /library/stdarch/crates/assert-instr-macro/src
parente6a81b75661bee528176786aebd11eec044fd05d (diff)
downloadrust-7bab2c06958fc21081e6a4e1a4e1a9d4bc35f701.tar.gz
rust-7bab2c06958fc21081e6a4e1a4e1a9d4bc35f701.zip
Deny 2018 idiom lints (#1108)
This lint is allow by default, which is why this wasn't spotted earlier.
It's denied by rust-lang/rust, so it's good to warn about it here so it
can be fixed more quickly.
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src')
-rw-r--r--library/stdarch/crates/assert-instr-macro/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/stdarch/crates/assert-instr-macro/src/lib.rs b/library/stdarch/crates/assert-instr-macro/src/lib.rs
index b475ec8bc4b..0a879e037e2 100644
--- a/library/stdarch/crates/assert-instr-macro/src/lib.rs
+++ b/library/stdarch/crates/assert-instr-macro/src/lib.rs
@@ -7,6 +7,7 @@
 //! The procedural macro here is relatively simple, it simply appends a
 //! `#[test]` function to the original token stream which asserts that the
 //! function itself contains the relevant instruction.
+#![deny(rust_2018_idioms)]
 
 extern crate proc_macro;
 extern crate proc_macro2;
@@ -177,7 +178,7 @@ struct Invoc {
 }
 
 impl syn::parse::Parse for Invoc {
-    fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
+    fn parse(input: syn::parse::ParseStream<'_>) -> syn::Result<Self> {
         use syn::{ext::IdentExt, Token};
 
         let mut instr = String::new();