diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:25:56 +0000 |
commit | 018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch) | |
tree | a835ebdf2088ef88fa681f8fad45f09922c1ae9a /vendor/wasm-bindgen-macro-support | |
parent | Adding debian version 1.75.0+dfsg1-5. (diff) | |
download | rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/wasm-bindgen-macro-support')
-rw-r--r-- | vendor/wasm-bindgen-macro-support/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/wasm-bindgen-macro-support/Cargo.toml | 10 | ||||
-rw-r--r-- | vendor/wasm-bindgen-macro-support/src/parser.rs | 18 |
3 files changed, 13 insertions, 17 deletions
diff --git a/vendor/wasm-bindgen-macro-support/.cargo-checksum.json b/vendor/wasm-bindgen-macro-support/.cargo-checksum.json index dcec33906..bf059fcde 100644 --- a/vendor/wasm-bindgen-macro-support/.cargo-checksum.json +++ b/vendor/wasm-bindgen-macro-support/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"928cbdb77324e101e405dc8f019f9f5dab5462b3f67b15d321530b96ae4a16f7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/lib.rs":"4f212183a9d5a2682d6156f7b011f789fa23002099268940af090336f067d6fa","src/parser.rs":"e230634a3c26d1c6c3a2622cf028321a516cfcfabfe8aa17f4d563d6ec15f13e"},"package":"54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"}
\ No newline at end of file +{"files":{"Cargo.toml":"cbb480d7ae0165bcd0043502e847fe6e2d178ce2e60c01ae350626fc712a12d4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/lib.rs":"4f212183a9d5a2682d6156f7b011f789fa23002099268940af090336f067d6fa","src/parser.rs":"b31546dcb5783705352c190d2e1c5a74bcd307c0da6da76c4f8aea35185f5a3c"},"package":"f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"}
\ No newline at end of file diff --git a/vendor/wasm-bindgen-macro-support/Cargo.toml b/vendor/wasm-bindgen-macro-support/Cargo.toml index 36bb02447..5b4c47cfd 100644 --- a/vendor/wasm-bindgen-macro-support/Cargo.toml +++ b/vendor/wasm-bindgen-macro-support/Cargo.toml @@ -11,16 +11,16 @@ [package] edition = "2018" -rust-version = "1.56" +rust-version = "1.57" name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" authors = ["The wasm-bindgen Developers"] description = """ The part of the implementation of the `#[wasm_bindgen]` attribute that is not in the shared backend crate """ homepage = "https://rustwasm.github.io/wasm-bindgen/" documentation = "https://docs.rs/wasm-bindgen" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support" resolver = "2" @@ -38,10 +38,10 @@ features = [ ] [dependencies.wasm-bindgen-backend] -version = "=0.2.87" +version = "=0.2.89" [dependencies.wasm-bindgen-shared] -version = "=0.2.87" +version = "=0.2.89" [features] extra-traits = ["syn/extra-traits"] diff --git a/vendor/wasm-bindgen-macro-support/src/parser.rs b/vendor/wasm-bindgen-macro-support/src/parser.rs index 9765cddd7..73b9c2166 100644 --- a/vendor/wasm-bindgen-macro-support/src/parser.rs +++ b/vendor/wasm-bindgen-macro-support/src/parser.rs @@ -8,6 +8,7 @@ use backend::util::{ident_ty, ShortHash}; use backend::Diagnostic; use proc_macro2::{Ident, Span, TokenStream, TokenTree}; use quote::ToTokens; +use syn::ext::IdentExt; use syn::parse::{Parse, ParseStream, Result as SynResult}; use syn::spanned::Spanned; use syn::{ItemFn, Lit, MacroDelimiter, ReturnType}; @@ -143,14 +144,13 @@ macro_rules! methods { fn $name(&self) -> Option<(&str, Span)> { self.attrs .iter() - .filter_map(|a| match &a.1 { + .find_map(|a| match &a.1 { BindgenAttr::$variant(_, s, span) => { a.0.set(true); Some((&s[..], *span)) } _ => None, }) - .next() } }; @@ -158,14 +158,13 @@ macro_rules! methods { fn $name(&self) -> Option<(&[String], &[Span])> { self.attrs .iter() - .filter_map(|a| match &a.1 { + .find_map(|a| match &a.1 { BindgenAttr::$variant(_, ss, spans) => { a.0.set(true); Some((&ss[..], &spans[..])) } _ => None, }) - .next() } }; @@ -174,14 +173,13 @@ macro_rules! methods { fn $name(&self) -> Option<&$($other)*> { self.attrs .iter() - .filter_map(|a| match &a.1 { + .find_map(|a| match &a.1 { BindgenAttr::$variant(_, s) => { a.0.set(true); Some(s) } _ => None, }) - .next() } }; @@ -190,14 +188,13 @@ macro_rules! methods { fn $name(&self) -> Option<&$($other)*> { self.attrs .iter() - .filter_map(|a| match &a.1 { + .find_map(|a| match &a.1 { BindgenAttr::$variant(s) => { a.0.set(true); Some(s) } _ => None, }) - .next() } }; } @@ -424,7 +421,7 @@ impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs)> for &'a mut syn::ItemStruct _ => continue, } let (js_field_name, member) = match &field.ident { - Some(ident) => (ident.to_string(), syn::Member::Named(ident.clone())), + Some(ident) => (ident.unraw().to_string(), syn::Member::Named(ident.clone())), None => (i.to_string(), syn::Member::Unnamed(i.into())), }; @@ -1355,14 +1352,13 @@ impl<'a> MacroParse<(&'a mut TokenStream, BindgenAttrs)> for syn::ItemEnum { values.sort(); let hole = values .windows(2) - .filter_map(|window| { + .find_map(|window| { if window[0] + 1 != window[1] { Some(window[0] + 1) } else { None } }) - .next() .unwrap_or(*values.last().unwrap() + 1); for value in values { assert!(hole != value); |