Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
This commit is contained in:
9
vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.rs
vendored
Normal file
9
vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.rs
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
use quote::quote;
|
||||
|
||||
fn main() {
|
||||
let nonrep = "";
|
||||
|
||||
// Without some protection against repetitions with no iterator somewhere
|
||||
// inside, this would loop infinitely.
|
||||
quote!(#(#nonrep #nonrep)*);
|
||||
}
|
11
vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr
vendored
Normal file
11
vendor/quote/tests/ui/does-not-have-iter-interpolated-dup.stderr
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/does-not-have-iter-interpolated-dup.rs:8:5
|
||||
|
|
||||
8 | quote!(#(#nonrep #nonrep)*);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
|
||||
| expected due to this
|
||||
| here the type of `has_iter` is inferred to be `ThereIsNoIteratorInRepetition`
|
||||
|
|
||||
= 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)
|
9
vendor/quote/tests/ui/does-not-have-iter-interpolated.rs
vendored
Normal file
9
vendor/quote/tests/ui/does-not-have-iter-interpolated.rs
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
use quote::quote;
|
||||
|
||||
fn main() {
|
||||
let nonrep = "";
|
||||
|
||||
// Without some protection against repetitions with no iterator somewhere
|
||||
// inside, this would loop infinitely.
|
||||
quote!(#(#nonrep)*);
|
||||
}
|
11
vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr
vendored
Normal file
11
vendor/quote/tests/ui/does-not-have-iter-interpolated.stderr
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/does-not-have-iter-interpolated.rs:8:5
|
||||
|
|
||||
8 | quote!(#(#nonrep)*);
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| expected `HasIterator`, found `ThereIsNoIteratorInRepetition`
|
||||
| expected due to this
|
||||
| here the type of `has_iter` is inferred to be `ThereIsNoIteratorInRepetition`
|
||||
|
|
||||
= 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)
|
5
vendor/quote/tests/ui/does-not-have-iter-separated.rs
vendored
Normal file
5
vendor/quote/tests/ui/does-not-have-iter-separated.rs
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
use quote::quote;
|
||||
|
||||
fn main() {
|
||||
quote!(#(a b),*);
|
||||
}
|
10
vendor/quote/tests/ui/does-not-have-iter-separated.stderr
vendored
Normal file
10
vendor/quote/tests/ui/does-not-have-iter-separated.stderr
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/does-not-have-iter-separated.rs:4:5
|
||||
|
|
||||
4 | quote!(#(a b),*);
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| 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)
|
5
vendor/quote/tests/ui/does-not-have-iter.rs
vendored
Normal file
5
vendor/quote/tests/ui/does-not-have-iter.rs
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
use quote::quote;
|
||||
|
||||
fn main() {
|
||||
quote!(#(a b)*);
|
||||
}
|
10
vendor/quote/tests/ui/does-not-have-iter.stderr
vendored
Normal file
10
vendor/quote/tests/ui/does-not-have-iter.stderr
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/does-not-have-iter.rs:4:5
|
||||
|
|
||||
4 | quote!(#(a b)*);
|
||||
| ^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| 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)
|
7
vendor/quote/tests/ui/not-quotable.rs
vendored
Normal file
7
vendor/quote/tests/ui/not-quotable.rs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
use quote::quote;
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
fn main() {
|
||||
let ip = Ipv4Addr::LOCALHOST;
|
||||
let _ = quote! { #ip };
|
||||
}
|
20
vendor/quote/tests/ui/not-quotable.stderr
vendored
Normal file
20
vendor/quote/tests/ui/not-quotable.stderr
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
error[E0277]: the trait bound `Ipv4Addr: ToTokens` is not satisfied
|
||||
--> tests/ui/not-quotable.rs:6:13
|
||||
|
|
||||
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`:
|
||||
bool
|
||||
char
|
||||
isize
|
||||
i8
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
i128
|
||||
and $N others
|
||||
= note: this error originates in the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
|
8
vendor/quote/tests/ui/not-repeatable.rs
vendored
Normal file
8
vendor/quote/tests/ui/not-repeatable.rs
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
use quote::quote;
|
||||
|
||||
struct Ipv4Addr;
|
||||
|
||||
fn main() {
|
||||
let ip = Ipv4Addr;
|
||||
let _ = quote! { #(#ip)* };
|
||||
}
|
35
vendor/quote/tests/ui/not-repeatable.stderr
vendored
Normal file
35
vendor/quote/tests/ui/not-repeatable.stderr
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
error[E0599]: the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
|
||||
--> tests/ui/not-repeatable.rs:7:13
|
||||
|
|
||||
3 | struct Ipv4Addr;
|
||||
| ---------------
|
||||
| |
|
||||
| method `quote_into_iter` not found for this struct
|
||||
| doesn't satisfy `Ipv4Addr: Iterator`
|
||||
| doesn't satisfy `Ipv4Addr: ToTokens`
|
||||
| doesn't satisfy `Ipv4Addr: ext::RepIteratorExt`
|
||||
| doesn't satisfy `Ipv4Addr: ext::RepToTokensExt`
|
||||
...
|
||||
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`
|
||||
which is required by `Ipv4Addr: ext::RepIteratorExt`
|
||||
`&Ipv4Addr: Iterator`
|
||||
which is required by `&Ipv4Addr: ext::RepIteratorExt`
|
||||
`Ipv4Addr: ToTokens`
|
||||
which is required by `Ipv4Addr: ext::RepToTokensExt`
|
||||
`&mut Ipv4Addr: Iterator`
|
||||
which is required by `&mut Ipv4Addr: ext::RepIteratorExt`
|
||||
note: the traits `ToTokens` and `Iterator` must be implemented
|
||||
--> src/to_tokens.rs
|
||||
|
|
||||
| pub trait ToTokens {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
::: $RUST/core/src/iter/traits/iterator.rs
|
||||
|
|
||||
| pub trait Iterator {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `$crate::quote_bind_into_iter` which comes from the expansion of the macro `quote` (in Nightly builds, run with -Z macro-backtrace for more info)
|
7
vendor/quote/tests/ui/wrong-type-span.rs
vendored
Normal file
7
vendor/quote/tests/ui/wrong-type-span.rs
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
use quote::quote_spanned;
|
||||
|
||||
fn main() {
|
||||
let span = "";
|
||||
let x = 0i32;
|
||||
quote_spanned!(span=> #x);
|
||||
}
|
10
vendor/quote/tests/ui/wrong-type-span.stderr
vendored
Normal file
10
vendor/quote/tests/ui/wrong-type-span.stderr
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
error[E0308]: mismatched types
|
||||
--> tests/ui/wrong-type-span.rs:6:5
|
||||
|
|
||||
6 | quote_spanned!(span=> #x);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| 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)
|
Reference in New Issue
Block a user