summaryrefslogtreecommitdiffstats
path: root/vendor/quote
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /vendor/quote
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/quote')
-rw-r--r--vendor/quote/.cargo-checksum.json2
-rw-r--r--vendor/quote/Cargo.toml4
-rw-r--r--vendor/quote/LICENSE-APACHE25
-rw-r--r--vendor/quote/src/lib.rs12
-rw-r--r--vendor/quote/src/runtime.rs60
-rw-r--r--vendor/quote/src/spanned.rs21
-rw-r--r--vendor/quote/tests/test.rs32
-rw-r--r--vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr2
-rw-r--r--vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr2
-rw-r--r--vendor/quote/tests/ui/does-not-have-iter-separated.stderr2
-rw-r--r--vendor/quote/tests/ui/does-not-have-iter.stderr2
-rw-r--r--vendor/quote/tests/ui/not-quotable.rs2
-rw-r--r--vendor/quote/tests/ui/not-quotable.stderr12
-rw-r--r--vendor/quote/tests/ui/not-repeatable.rs2
-rw-r--r--vendor/quote/tests/ui/not-repeatable.stderr6
-rw-r--r--vendor/quote/tests/ui/wrong-type-span.stderr10
16 files changed, 140 insertions, 56 deletions
diff --git a/vendor/quote/.cargo-checksum.json b/vendor/quote/.cargo-checksum.json
index 990f0d7ad..d14e0d1c7 100644
--- a/vendor/quote/.cargo-checksum.json
+++ b/vendor/quote/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"b31678b5e9696b0320493f7120e873490183308fc5afb052dc23a265048b8e16","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"66f3cf08338e47618fd23d810355b075da573815d9c1e158a7f7ab140decc16d","build.rs":"3733c86ae2733629f873f93c2f45da30164beee8de9ee0833099fac6a05a3e6b","rust-toolchain.toml":"6bbb61302978c736b2da03e4fb40e3beab908f85d533ab46fd541e637b5f3e0f","src/ext.rs":"9881576cac3e476a4bf04f9b601cf9a53b79399fb0ca9634e8b861ac91709843","src/format.rs":"c595015418f35e6992e710441b9999f09b2afe4678b138039d670d100c0bdd86","src/ident_fragment.rs":"66788c5f57681547d936a9bcf51873b658630c76b2e690df4b3158edf573384a","src/lib.rs":"5f0dac39c736d01c698745909c93efb7e701aed4493c488a32239a7efd7d4469","src/runtime.rs":"79bbb2fe5b18bc3ec9f8f8143bd120b45680a3027c89f37b0a6a6b97bdaadb21","src/spanned.rs":"43ff919f1d2d27dff6b2db409539b1c697e913eb8c3131cf5de45a845752b7b5","src/to_tokens.rs":"99bb6f467289c32af6c1f7af0d45cc6ac7b31e2436774e616770152a49e6ac0f","tests/compiletest.rs":"022a8e400ef813d7ea1875b944549cee5125f6a995dc33e93b48cba3e1b57bd1","tests/test.rs":"c4967a33fcf7c2effd1979bcb4c03ae797359eeab92c627ab4b609cd8678ff78","tests/ui/does-not-have-iter-interpolated-dup.rs":"ad13eea21d4cdd2ab6c082f633392e1ff20fb0d1af5f2177041e0bf7f30da695","tests/ui/does-not-have-iter-interpolated-dup.stderr":"be67a6c99eed689aa08b46afd0ab3ed4e71fde42e5efed41ab05741710f42fe5","tests/ui/does-not-have-iter-interpolated.rs":"83a5b3f240651adcbe4b6e51076d76d653ad439b37442cf4054f1fd3c073f3b7","tests/ui/does-not-have-iter-interpolated.stderr":"ed05bc229abf5a267ea3d194336a3a845a061bd10c1be7020b9351f81e737946","tests/ui/does-not-have-iter-separated.rs":"fe413c48331d5e3a7ae5fef6a5892a90c72f610d54595879eb49d0a94154ba3f","tests/ui/does-not-have-iter-separated.stderr":"873f4db0ec63606d64d46790f3ee24bdb4dd04379b8e57dc5ac1114cc3775fb3","tests/ui/does-not-have-iter.rs":"09dc9499d861b63cebb0848b855b78e2dc9497bfde37ba6339f3625ae009a62f","tests/ui/does-not-have-iter.stderr":"0e3de2635a79cce9226113fa8cb6bdbdc0ffcd487d7537d4dd0dc8222adf4a8a","tests/ui/not-quotable.rs":"d630ed8e5fe16f125015999d068569cc3fe5dc1033a56e622690ec2c080c13f4","tests/ui/not-quotable.stderr":"4b81ec7bb82ba197ede6d47c1b6e5cacc0999cc8c9e2fa77a46db5e29397153c","tests/ui/not-repeatable.rs":"dbfedcad67b57543aa7d6684b6549db90fbdb74ffebcae42323d31eb88e59c87","tests/ui/not-repeatable.stderr":"a578a6293fef33c54f8e8114bf72a933a1315b45e866e4bcef1e31ce2ce55dcd","tests/ui/wrong-type-span.rs":"6195e35ea844c0c52ba1cff5d790c3a371af6915d137d377834ad984229ef9ea","tests/ui/wrong-type-span.stderr":"c986de5cb858272636c9e36ae5f57e5ee13589d4f1a73a050b21824010314f8d"},"package":"8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"} \ No newline at end of file
+{"files":{"Cargo.toml":"5969ab348602ad0e3909923146807be5bd7d650692c09e8028fcdfa0886d4a71","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"66f3cf08338e47618fd23d810355b075da573815d9c1e158a7f7ab140decc16d","build.rs":"3733c86ae2733629f873f93c2f45da30164beee8de9ee0833099fac6a05a3e6b","rust-toolchain.toml":"6bbb61302978c736b2da03e4fb40e3beab908f85d533ab46fd541e637b5f3e0f","src/ext.rs":"9881576cac3e476a4bf04f9b601cf9a53b79399fb0ca9634e8b861ac91709843","src/format.rs":"c595015418f35e6992e710441b9999f09b2afe4678b138039d670d100c0bdd86","src/ident_fragment.rs":"66788c5f57681547d936a9bcf51873b658630c76b2e690df4b3158edf573384a","src/lib.rs":"7938cba6edf3be1f8c2c4432d3c6c171104375aec4b9c213437c89656fd8d3f2","src/runtime.rs":"31b2159986c68dc1c78801a92f795435dbc0bcea859ca342df280889e82c6c4d","src/spanned.rs":"0ccaae1137af5f3e54eae75c3bdc637be74cfa56a857f2c0f85a041c9ba26838","src/to_tokens.rs":"99bb6f467289c32af6c1f7af0d45cc6ac7b31e2436774e616770152a49e6ac0f","tests/compiletest.rs":"022a8e400ef813d7ea1875b944549cee5125f6a995dc33e93b48cba3e1b57bd1","tests/test.rs":"3be80741f84a707376c230d9cf70ce9537caa359691d8d4c34968e28175e4ad7","tests/ui/does-not-have-iter-interpolated-dup.rs":"ad13eea21d4cdd2ab6c082f633392e1ff20fb0d1af5f2177041e0bf7f30da695","tests/ui/does-not-have-iter-interpolated-dup.stderr":"09406a4bcf96587a739df7053251c8e07ea520f8d20b13f8fbea33f9c29e019b","tests/ui/does-not-have-iter-interpolated.rs":"83a5b3f240651adcbe4b6e51076d76d653ad439b37442cf4054f1fd3c073f3b7","tests/ui/does-not-have-iter-interpolated.stderr":"626170deaca60092f1992262afe7598e03ef8e3821ebe91d0a643edd8346e9ac","tests/ui/does-not-have-iter-separated.rs":"fe413c48331d5e3a7ae5fef6a5892a90c72f610d54595879eb49d0a94154ba3f","tests/ui/does-not-have-iter-separated.stderr":"03fd560979ebcd5aa6f83858bc2c3c01ba6546c16335101275505304895c1ae9","tests/ui/does-not-have-iter.rs":"09dc9499d861b63cebb0848b855b78e2dc9497bfde37ba6339f3625ae009a62f","tests/ui/does-not-have-iter.stderr":"d6da483c29e232ced72059bbdf05d31afb1df9e02954edaa9cfaea1ec6df72dc","tests/ui/not-quotable.rs":"5759d0884943417609f28faadc70254a3e2fd3d9bd6ff7297a3fb70a77fafd8a","tests/ui/not-quotable.stderr":"efcace9419fdf64d6beca7e135c3b7daff74038d4449475896cbe8cbf2566ade","tests/ui/not-repeatable.rs":"a4b115c04e4e41049a05f5b69450503fbffeba031218b4189cb931839f7f9a9c","tests/ui/not-repeatable.stderr":"594249d59d16f039c16816f1aaf9933176994e296fcf81d1b8b24d5b66ae0d0a","tests/ui/wrong-type-span.rs":"6195e35ea844c0c52ba1cff5d790c3a371af6915d137d377834ad984229ef9ea","tests/ui/wrong-type-span.stderr":"cad072e40e0ecc04f375122ae41aede2f0da2a9244492b3fcf70249e59d1b128"},"package":"4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"} \ No newline at end of file
diff --git a/vendor/quote/Cargo.toml b/vendor/quote/Cargo.toml
index 4d6b32670..734042ff5 100644
--- a/vendor/quote/Cargo.toml
+++ b/vendor/quote/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.31"
name = "quote"
-version = "1.0.23"
+version = "1.0.26"
authors = ["David Tolnay <dtolnay@gmail.com>"]
autobenches = false
description = "Quasi-quoting macro quote!(...)"
@@ -34,7 +34,7 @@ targets = ["x86_64-unknown-linux-gnu"]
doc-scrape-examples = false
[dependencies.proc-macro2]
-version = "1.0.40"
+version = "1.0.52"
default-features = false
[dev-dependencies.rustversion]
diff --git a/vendor/quote/LICENSE-APACHE b/vendor/quote/LICENSE-APACHE
index 16fe87b06..1b5ec8b78 100644
--- a/vendor/quote/LICENSE-APACHE
+++ b/vendor/quote/LICENSE-APACHE
@@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/vendor/quote/src/lib.rs b/vendor/quote/src/lib.rs
index adc14c573..ab8c1b156 100644
--- a/vendor/quote/src/lib.rs
+++ b/vendor/quote/src/lib.rs
@@ -81,7 +81,7 @@
//! ```
// Quote types in rustdoc of other crates get linked to here.
-#![doc(html_root_url = "https://docs.rs/quote/1.0.23")]
+#![doc(html_root_url = "https://docs.rs/quote/1.0.26")]
#![allow(
clippy::doc_markdown,
clippy::missing_errors_doc,
@@ -619,14 +619,14 @@ macro_rules! quote_spanned {
#[macro_export]
macro_rules! quote_spanned {
($span:expr=>) => {{
- let _: $crate::__private::Span = $span;
+ let _: $crate::__private::Span = $crate::__private::get_span($span).__into_span();
$crate::__private::TokenStream::new()
}};
// Special case rule for a single tt, for performance.
($span:expr=> $tt:tt) => {{
let mut _s = $crate::__private::TokenStream::new();
- let _span: $crate::__private::Span = $span;
+ let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span();
$crate::quote_token_spanned!{$tt _s _span}
_s
}};
@@ -634,13 +634,13 @@ macro_rules! quote_spanned {
// Special case rules for two tts, for performance.
($span:expr=> # $var:ident) => {{
let mut _s = $crate::__private::TokenStream::new();
- let _: $crate::__private::Span = $span;
+ let _: $crate::__private::Span = $crate::__private::get_span($span).__into_span();
$crate::ToTokens::to_tokens(&$var, &mut _s);
_s
}};
($span:expr=> $tt1:tt $tt2:tt) => {{
let mut _s = $crate::__private::TokenStream::new();
- let _span: $crate::__private::Span = $span;
+ let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span();
$crate::quote_token_spanned!{$tt1 _s _span}
$crate::quote_token_spanned!{$tt2 _s _span}
_s
@@ -649,7 +649,7 @@ macro_rules! quote_spanned {
// Rule for any other number of tokens.
($span:expr=> $($tt:tt)*) => {{
let mut _s = $crate::__private::TokenStream::new();
- let _span: $crate::__private::Span = $span;
+ let _span: $crate::__private::Span = $crate::__private::get_span($span).__into_span();
$crate::quote_each_token_spanned!{_s _span $($tt)*}
_s
}};
diff --git a/vendor/quote/src/runtime.rs b/vendor/quote/src/runtime.rs
index f3cdded3a..4e3d4fd03 100644
--- a/vendor/quote/src/runtime.rs
+++ b/vendor/quote/src/runtime.rs
@@ -1,10 +1,12 @@
+use self::get_span::{GetSpan, GetSpanBase, GetSpanInner};
use crate::{IdentFragment, ToTokens, TokenStreamExt};
use core::fmt;
use core::iter;
use core::ops::BitOr;
+use proc_macro2::{Group, Ident, Punct, Spacing, TokenTree};
pub use core::option::Option;
-pub use proc_macro2::*;
+pub use proc_macro2::{Delimiter, Span, TokenStream};
pub use std::format;
pub struct HasIterator; // True
@@ -164,6 +166,62 @@ impl<T: ToTokens> ToTokens for RepInterp<T> {
}
}
+#[inline]
+pub fn get_span<T>(span: T) -> GetSpan<T> {
+ GetSpan(GetSpanInner(GetSpanBase(span)))
+}
+
+mod get_span {
+ use core::ops::Deref;
+ use proc_macro2::extra::DelimSpan;
+ use proc_macro2::Span;
+
+ pub struct GetSpan<T>(pub(crate) GetSpanInner<T>);
+
+ pub struct GetSpanInner<T>(pub(crate) GetSpanBase<T>);
+
+ pub struct GetSpanBase<T>(pub(crate) T);
+
+ impl GetSpan<Span> {
+ #[inline]
+ pub fn __into_span(self) -> Span {
+ ((self.0).0).0
+ }
+ }
+
+ impl GetSpanInner<DelimSpan> {
+ #[inline]
+ pub fn __into_span(&self) -> Span {
+ (self.0).0.join()
+ }
+ }
+
+ impl<T> GetSpanBase<T> {
+ #[allow(clippy::unused_self)]
+ pub fn __into_span(&self) -> T {
+ unreachable!()
+ }
+ }
+
+ impl<T> Deref for GetSpan<T> {
+ type Target = GetSpanInner<T>;
+
+ #[inline]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+ }
+
+ impl<T> Deref for GetSpanInner<T> {
+ type Target = GetSpanBase<T>;
+
+ #[inline]
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+ }
+}
+
pub fn push_group(tokens: &mut TokenStream, delimiter: Delimiter, inner: TokenStream) {
tokens.append(Group::new(delimiter, inner));
}
diff --git a/vendor/quote/src/spanned.rs b/vendor/quote/src/spanned.rs
index f64c8f5df..efc2e8bce 100644
--- a/vendor/quote/src/spanned.rs
+++ b/vendor/quote/src/spanned.rs
@@ -1,7 +1,9 @@
use crate::ToTokens;
+use proc_macro2::extra::DelimSpan;
use proc_macro2::{Span, TokenStream};
-pub trait Spanned {
+// Not public API other than via the syn crate. Use syn::spanned::Spanned.
+pub trait Spanned: private::Sealed {
fn __span(&self) -> Span;
}
@@ -11,6 +13,12 @@ impl Spanned for Span {
}
}
+impl Spanned for DelimSpan {
+ fn __span(&self) -> Span {
+ self.join()
+ }
+}
+
impl<T: ?Sized + ToTokens> Spanned for T {
fn __span(&self) -> Span {
join_spans(self.into_token_stream())
@@ -41,3 +49,14 @@ fn join_spans(tokens: TokenStream) -> Span {
.and_then(|last| first.join(last))
.unwrap_or(first)
}
+
+mod private {
+ use crate::ToTokens;
+ use proc_macro2::extra::DelimSpan;
+ use proc_macro2::Span;
+
+ pub trait Sealed {}
+ impl Sealed for Span {}
+ impl Sealed for DelimSpan {}
+ impl<T: ?Sized + ToTokens> Sealed for T {}
+}
diff --git a/vendor/quote/tests/test.rs b/vendor/quote/tests/test.rs
index 52ec7bcfb..eab4f55aa 100644
--- a/vendor/quote/tests/test.rs
+++ b/vendor/quote/tests/test.rs
@@ -1,14 +1,17 @@
#![allow(
clippy::disallowed_names,
+ clippy::let_underscore_untyped,
clippy::shadow_unrelated,
clippy::unseparated_literal_suffix,
clippy::used_underscore_binding
)]
+extern crate proc_macro;
+
use std::borrow::Cow;
use std::collections::BTreeSet;
-use proc_macro2::{Ident, Span, TokenStream};
+use proc_macro2::{Delimiter, Group, Ident, Span, TokenStream};
use quote::{format_ident, quote, quote_spanned, TokenStreamExt};
struct X;
@@ -517,3 +520,30 @@ fn test_quote_raw_id() {
let id = quote!(r#raw_id);
assert_eq!(id.to_string(), "r#raw_id");
}
+
+#[test]
+fn test_type_inference_for_span() {
+ trait CallSite {
+ fn get() -> Self;
+ }
+
+ impl CallSite for Span {
+ fn get() -> Self {
+ Span::call_site()
+ }
+ }
+
+ let span = Span::call_site();
+ let _ = quote_spanned!(span=> ...);
+
+ let delim_span = Group::new(Delimiter::Parenthesis, TokenStream::new()).delim_span();
+ let _ = quote_spanned!(delim_span=> ...);
+
+ let inferred = CallSite::get();
+ let _ = quote_spanned!(inferred=> ...);
+
+ if false {
+ let proc_macro_span = proc_macro::Span::call_site();
+ let _ = quote_spanned!(proc_macro_span.into()=> ...);
+ }
+}
diff --git a/vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr b/vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr
index 8087879af..57d8bf0bd 100644
--- a/vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr
+++ b/vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
8 | quote!(#(#nonrep #nonrep)*);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
- | expected struct `HasIterator`, found struct `ThereIsNoIteratorInRepetition`
+ | expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
| expected due to this
|
= note: this error originates in the macro `$crate::quote_token_with_context` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr b/vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr
index 2dcf206dd..8ec2d40ef 100644
--- a/vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr
+++ b/vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
8 | quote!(#(#nonrep)*);
| ^^^^^^^^^^^^^^^^^^^
| |
- | expected struct `HasIterator`, found struct `ThereIsNoIteratorInRepetition`
+ | expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
| expected due to this
|
= note: this error originates in the macro `$crate::quote_token_with_context` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/quote/tests/ui/does-not-have-iter-separated.stderr b/vendor/quote/tests/ui/does-not-have-iter-separated.stderr
index 87a19fe07..7c6e30f2b 100644
--- a/vendor/quote/tests/ui/does-not-have-iter-separated.stderr
+++ b/vendor/quote/tests/ui/does-not-have-iter-separated.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
4 | quote!(#(a b),*);
| ^^^^^^^^^^^^^^^^
| |
- | expected struct `HasIterator`, found struct `ThereIsNoIteratorInRepetition`
+ | expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
| expected due to this
|
= note: this error originates in the macro `$crate::quote_token_with_context` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/quote/tests/ui/does-not-have-iter.stderr b/vendor/quote/tests/ui/does-not-have-iter.stderr
index 32aa62d9b..0b13e5cb7 100644
--- a/vendor/quote/tests/ui/does-not-have-iter.stderr
+++ b/vendor/quote/tests/ui/does-not-have-iter.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
4 | quote!(#(a b)*);
| ^^^^^^^^^^^^^^^
| |
- | expected struct `HasIterator`, found struct `ThereIsNoIteratorInRepetition`
+ | expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
| expected due to this
|
= note: this error originates in the macro `$crate::quote_token_with_context` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/vendor/quote/tests/ui/not-quotable.rs b/vendor/quote/tests/ui/not-quotable.rs
index 220542d84..f991c1883 100644
--- a/vendor/quote/tests/ui/not-quotable.rs
+++ b/vendor/quote/tests/ui/not-quotable.rs
@@ -3,5 +3,5 @@ use std::net::Ipv4Addr;
fn main() {
let ip = Ipv4Addr::LOCALHOST;
- _ = quote! { #ip };
+ let _ = quote! { #ip };
}
diff --git a/vendor/quote/tests/ui/not-quotable.stderr b/vendor/quote/tests/ui/not-quotable.stderr
index c323d99b7..79d46548d 100644
--- a/vendor/quote/tests/ui/not-quotable.stderr
+++ b/vendor/quote/tests/ui/not-quotable.stderr
@@ -1,11 +1,11 @@
error[E0277]: the trait bound `Ipv4Addr: ToTokens` is not satisfied
- --> tests/ui/not-quotable.rs:6:9
+ --> tests/ui/not-quotable.rs:6:13
|
-6 | _ = quote! { #ip };
- | ^^^^^^^^^^^^^^
- | |
- | the trait `ToTokens` is not implemented for `Ipv4Addr`
- | required by a bound introduced by this call
+6 | let _ = quote! { #ip };
+ | ^^^^^^^^^^^^^^
+ | |
+ | the trait `ToTokens` is not implemented for `Ipv4Addr`
+ | required by a bound introduced by this call
|
= help: the following other types implement trait `ToTokens`:
&'a T
diff --git a/vendor/quote/tests/ui/not-repeatable.rs b/vendor/quote/tests/ui/not-repeatable.rs
index c1debf5f8..a8f0fe773 100644
--- a/vendor/quote/tests/ui/not-repeatable.rs
+++ b/vendor/quote/tests/ui/not-repeatable.rs
@@ -4,5 +4,5 @@ struct Ipv4Addr;
fn main() {
let ip = Ipv4Addr;
- _ = quote! { #(#ip)* };
+ let _ = quote! { #(#ip)* };
}
diff --git a/vendor/quote/tests/ui/not-repeatable.stderr b/vendor/quote/tests/ui/not-repeatable.stderr
index 264a89f9e..2ed1da043 100644
--- a/vendor/quote/tests/ui/not-repeatable.stderr
+++ b/vendor/quote/tests/ui/not-repeatable.stderr
@@ -1,5 +1,5 @@
error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
- --> tests/ui/not-repeatable.rs:7:9
+ --> tests/ui/not-repeatable.rs:7:13
|
3 | struct Ipv4Addr;
| ---------------
@@ -10,8 +10,8 @@ error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its
| doesn't satisfy `Ipv4Addr: ext::RepIteratorExt`
| doesn't satisfy `Ipv4Addr: ext::RepToTokensExt`
...
-7 | _ = quote! { #(#ip)* };
- | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds
+7 | let _ = quote! { #(#ip)* };
+ | ^^^^^^^^^^^^^^^^^^ method cannot be called on `Ipv4Addr` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`Ipv4Addr: Iterator`
diff --git a/vendor/quote/tests/ui/wrong-type-span.stderr b/vendor/quote/tests/ui/wrong-type-span.stderr
index c774a4c3a..12ad30770 100644
--- a/vendor/quote/tests/ui/wrong-type-span.stderr
+++ b/vendor/quote/tests/ui/wrong-type-span.stderr
@@ -1,8 +1,10 @@
error[E0308]: mismatched types
- --> tests/ui/wrong-type-span.rs:6:20
+ --> tests/ui/wrong-type-span.rs:6:5
|
6 | quote_spanned!(span=> #x);
- | ---------------^^^^------
- | | |
- | | expected struct `Span`, found `&str`
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | expected `Span`, found `&str`
| expected due to this
+ |
+ = note: this error originates in the macro `quote_spanned` (in Nightly builds, run with -Z macro-backtrace for more info)