summaryrefslogtreecommitdiffstats
path: root/library/stdarch/crates/stdarch-verify/src/lib.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /library/stdarch/crates/stdarch-verify/src/lib.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/stdarch/crates/stdarch-verify/src/lib.rs')
-rw-r--r--library/stdarch/crates/stdarch-verify/src/lib.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/library/stdarch/crates/stdarch-verify/src/lib.rs b/library/stdarch/crates/stdarch-verify/src/lib.rs
index 9b66137ba..a9bf89f70 100644
--- a/library/stdarch/crates/stdarch-verify/src/lib.rs
+++ b/library/stdarch/crates/stdarch-verify/src/lib.rs
@@ -69,7 +69,7 @@ fn functions(input: TokenStream, dirs: &[&str]) -> TokenStream {
}
assert!(!tests.is_empty());
- functions.retain(|&(ref f, _)| {
+ functions.retain(|(f, _)| {
if let syn::Visibility::Public(_) = f.vis {
if f.sig.unsafety.is_some() {
return true;
@@ -350,11 +350,11 @@ fn to_type(t: &syn::Type) -> proc_macro2::TokenStream {
}) => {
// Both pointers and references can have a mut token (*mut and &mut)
if mutability.is_some() {
- let tokens = to_type(&elem);
+ let tokens = to_type(elem);
quote! { &Type::MutPtr(#tokens) }
} else {
// If they don't (*const or &) then they are "const"
- let tokens = to_type(&elem);
+ let tokens = to_type(elem);
quote! { &Type::ConstPtr(#tokens) }
}
}
@@ -471,11 +471,9 @@ fn find_target_feature(attrs: &[syn::Attribute]) -> Option<syn::Lit> {
attrs
.iter()
.flat_map(|a| {
- if let Ok(a) = a.parse_meta() {
- if let syn::Meta::List(i) = a {
- if i.path.is_ident("target_feature") {
- return i.nested;
- }
+ if let Ok(syn::Meta::List(i)) = a.parse_meta() {
+ if i.path.is_ident("target_feature") {
+ return i.nested;
}
}
syn::punctuated::Punctuated::new()