mirror of https://github.com/rwf2/Rocket.git
Update syn, transitively, to 2.0.
This commit is contained in:
parent
bbbb927ac2
commit
322f88e61a
|
@ -14,7 +14,7 @@ rust-version = "1.56"
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
devise = "0.3"
|
devise = "0.4"
|
||||||
quote = "1"
|
quote = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
@ -15,7 +15,7 @@ proc-macro = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
devise = "0.3"
|
devise = "0.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
version_check = "0.9"
|
version_check = "0.9"
|
||||||
|
|
|
@ -18,9 +18,9 @@ proc-macro = true
|
||||||
[dependencies]
|
[dependencies]
|
||||||
indexmap = "1.0"
|
indexmap = "1.0"
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
syn = { version = "1.0.72", features = ["full", "visit", "visit-mut", "extra-traits"] }
|
syn = { version = "2.0", features = ["full", "visit", "visit-mut", "extra-traits"] }
|
||||||
proc-macro2 = "1.0.27"
|
proc-macro2 = "1.0.27"
|
||||||
devise = "0.3.1"
|
devise = "0.4"
|
||||||
rocket_http = { version = "0.5.0-rc.2", path = "../http/" }
|
rocket_http = { version = "0.5.0-rc.2", path = "../http/" }
|
||||||
unicode-xid = "0.2"
|
unicode-xid = "0.2"
|
||||||
glob = "0.3"
|
glob = "0.3"
|
||||||
|
|
|
@ -23,7 +23,7 @@ pub fn _catch(
|
||||||
|
|
||||||
// Determine the number of parameters that will be passed in.
|
// Determine the number of parameters that will be passed in.
|
||||||
if catch.function.sig.inputs.len() > 2 {
|
if catch.function.sig.inputs.len() > 2 {
|
||||||
return Err(catch.function.sig.paren_token.span
|
return Err(catch.function.sig.paren_token.span.join()
|
||||||
.error("invalid number of arguments: must be zero, one, or two")
|
.error("invalid number of arguments: must be zero, one, or two")
|
||||||
.help("catchers optionally take `&Request` or `Status, &Request`"));
|
.help("catchers optionally take `&Request` or `Status, &Request`"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ impl Route {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the validity of function arguments.
|
// Check the validity of function arguments.
|
||||||
let span = handler.sig.paren_token.span;
|
let span = handler.sig.paren_token.span.join();
|
||||||
let mut arguments = Arguments { map: ArgumentMap::new(), span };
|
let mut arguments = Arguments { map: ArgumentMap::new(), span };
|
||||||
for arg in &handler.sig.inputs {
|
for arg in &handler.sig.inputs {
|
||||||
if let Some((ident, ty)) = arg.typed() {
|
if let Some((ident, ty)) = arg.typed() {
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
use proc_macro2::TokenStream;
|
use proc_macro2::TokenStream;
|
||||||
use syn::parse::{Parse, ParseStream, discouraged::Speculative};
|
use syn::parse::{Parse, ParseStream, discouraged::Speculative};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum Input {
|
pub enum Input {
|
||||||
Type(syn::Type, Option<(syn::Token![+], syn::Lifetime)>),
|
Type(syn::Type, Option<(syn::Token![+], syn::Lifetime)>),
|
||||||
Tokens(TokenStream)
|
Tokens(TokenStream)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
struct Invocation {
|
struct Invocation {
|
||||||
ty_stream_ty: syn::Path,
|
ty_stream_ty: syn::Path,
|
||||||
stream_mac: syn::Path,
|
stream_mac: syn::Path,
|
||||||
|
@ -38,11 +40,9 @@ impl Parse for Input {
|
||||||
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
|
fn parse(input: ParseStream<'_>) -> syn::Result<Self> {
|
||||||
let fork = input.fork();
|
let fork = input.fork();
|
||||||
if let Ok(mut ty) = fork.parse() {
|
if let Ok(mut ty) = fork.parse() {
|
||||||
input.advance_to(&fork);
|
|
||||||
|
|
||||||
// If there's an extra + '_, use it in the reinterpretation.
|
// If there's an extra + '_, use it in the reinterpretation.
|
||||||
let mut bound = match input.parse() {
|
let mut bound = match fork.parse() {
|
||||||
Ok(plus) => Some((plus, input.parse()?)),
|
Ok(plus) => Some((plus, fork.parse()?)),
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,10 +52,16 @@ impl Parse for Input {
|
||||||
bound = Some((plus, lt));
|
bound = Some((plus, lt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we have nothing else to parse, this must have been a type.
|
||||||
|
if fork.is_empty() {
|
||||||
|
input.advance_to(&fork);
|
||||||
Ok(Input::Type(ty, bound))
|
Ok(Input::Type(ty, bound))
|
||||||
} else {
|
} else {
|
||||||
Ok(Input::Tokens(input.parse()?))
|
Ok(Input::Tokens(input.parse()?))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Ok(Input::Tokens(input.parse()?))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +81,8 @@ impl Parse for Invocation {
|
||||||
/// eagerly on a single token, so something like `foo!(for x in 0..10 {})` will
|
/// eagerly on a single token, so something like `foo!(for x in 0..10 {})` will
|
||||||
/// match a `($ty)` branch as will anything that starts with a path.
|
/// match a `($ty)` branch as will anything that starts with a path.
|
||||||
pub fn _macro(input: proc_macro::TokenStream) -> devise::Result<TokenStream> {
|
pub fn _macro(input: proc_macro::TokenStream) -> devise::Result<TokenStream> {
|
||||||
let i: Invocation = syn::parse(input)?;
|
let tokens = proc_macro2::TokenStream::from(input);
|
||||||
|
let i: Invocation = syn::parse2(tokens)?;
|
||||||
let (s_ty, mac, s_trait) = (i.ty_stream_ty, i.stream_mac, i.stream_trait);
|
let (s_ty, mac, s_trait) = (i.ty_stream_ty, i.stream_mac, i.stream_trait);
|
||||||
let tokens = match i.input {
|
let tokens = match i.input {
|
||||||
Input::Tokens(tt) => quote!(#s_ty::from(#mac!(#tt))),
|
Input::Tokens(tt) => quote!(#s_ty::from(#mac!(#tt))),
|
||||||
|
|
|
@ -163,7 +163,7 @@ impl Parse for Args {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse arguments. Ensure both types of args were not used at once.
|
// Parse arguments. Ensure both types of args were not used at once.
|
||||||
let args: Punctuated<Arg, Token![,]> = input.parse_terminated(Arg::parse)?;
|
let args = input.parse_terminated(Arg::parse, Token![,])?;
|
||||||
let mut first_is_named = None;
|
let mut first_is_named = None;
|
||||||
for arg in &args {
|
for arg in &args {
|
||||||
if let Some(first_is_named) = first_is_named {
|
if let Some(first_is_named) = first_is_named {
|
||||||
|
@ -314,7 +314,7 @@ impl Parse for InternalUriParams {
|
||||||
|
|
||||||
let content;
|
let content;
|
||||||
syn::parenthesized!(content in input);
|
syn::parenthesized!(content in input);
|
||||||
let fn_args: Punctuated<FnArg, Token![,]> = content.parse_terminated(FnArg::parse)?;
|
let fn_args = content.parse_terminated(FnArg::parse, Token![,])?;
|
||||||
let fn_args = fn_args.into_iter().collect();
|
let fn_args = fn_args.into_iter().collect();
|
||||||
|
|
||||||
input.parse::<Token![,]>()?;
|
input.parse::<Token![,]>()?;
|
||||||
|
|
|
@ -73,7 +73,7 @@ fn context_type(input: Input<'_>) -> Result<(TokenStream, syn::Generics)> {
|
||||||
|
|
||||||
let lifetime = syn::parse_quote!('r);
|
let lifetime = syn::parse_quote!('r);
|
||||||
if !gen.replace_lifetime(0, &lifetime) {
|
if !gen.replace_lifetime(0, &lifetime) {
|
||||||
gen.insert_lifetime(syn::LifetimeDef::new(lifetime.clone()));
|
gen.insert_lifetime(syn::LifetimeParam::new(lifetime.clone()));
|
||||||
}
|
}
|
||||||
|
|
||||||
gen.add_where_predicates(generic_bounds(input)?);
|
gen.add_where_predicates(generic_bounds(input)?);
|
||||||
|
|
|
@ -39,7 +39,7 @@ pub fn derive_uri_display_query(input: proc_macro::TokenStream) -> TokenStream {
|
||||||
.validator(ValidatorBuild::new()
|
.validator(ValidatorBuild::new()
|
||||||
.enum_validate(|_, data| {
|
.enum_validate(|_, data| {
|
||||||
if data.variants().count() == 0 {
|
if data.variants().count() == 0 {
|
||||||
Err(data.brace_token.span.error(NO_EMPTY_ENUMS))
|
Err(data.brace_token.span.join().error(NO_EMPTY_ENUMS))
|
||||||
} else {
|
} else {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: expected identifier
|
error: expected identifier, found keyword `_`
|
||||||
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:63:18
|
--> tests/ui-fail-nightly/typed-uris-bad-params.rs:63:18
|
||||||
|
|
|
|
||||||
63 | uri!(ignored(_ = 10));
|
63 | uri!(ignored(_ = 10));
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error: expected identifier
|
error: unexpected token
|
||||||
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:10:28
|
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:10:16
|
||||||
|
|
|
|
||||||
10 | uri!(simple: id = 100, "Hello");
|
10 | uri!(simple: id = 100, "Hello");
|
||||||
| ^^^^^^^
|
| ^
|
||||||
|
|
||||||
error: named and unnamed parameters cannot be mixed
|
error: named and unnamed parameters cannot be mixed
|
||||||
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:11:17
|
--> tests/ui-fail-nightly/typed-uris-invalid-syntax.rs:11:17
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
error: tuple structs are not supported
|
error: tuple structs are not supported
|
||||||
--> $DIR/from_form_field.rs:4:1
|
--> tests/ui-fail-stable/from_form_field.rs:4:1
|
||||||
|
|
|
|
||||||
4 | struct Foo1;
|
4 | struct Foo1;
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:3:10
|
--> tests/ui-fail-stable/from_form_field.rs:3:10
|
||||||
|
|
|
|
||||||
3 | #[derive(FromFormField)]
|
3 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -13,13 +13,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: tuple structs are not supported
|
error: tuple structs are not supported
|
||||||
--> $DIR/from_form_field.rs:7:1
|
--> tests/ui-fail-stable/from_form_field.rs:7:1
|
||||||
|
|
|
|
||||||
7 | struct Foo2(usize);
|
7 | struct Foo2(usize);
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:6:10
|
--> tests/ui-fail-stable/from_form_field.rs:6:10
|
||||||
|
|
|
|
||||||
6 | #[derive(FromFormField)]
|
6 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -27,13 +27,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: named structs are not supported
|
error: named structs are not supported
|
||||||
--> $DIR/from_form_field.rs:10:1
|
--> tests/ui-fail-stable/from_form_field.rs:10:1
|
||||||
|
|
|
|
||||||
10 | struct Foo3 {
|
10 | struct Foo3 {
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:9:10
|
--> tests/ui-fail-stable/from_form_field.rs:9:10
|
||||||
|
|
|
|
||||||
9 | #[derive(FromFormField)]
|
9 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -41,13 +41,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: variants cannot have fields
|
error: variants cannot have fields
|
||||||
--> $DIR/from_form_field.rs:16:6
|
--> tests/ui-fail-stable/from_form_field.rs:16:6
|
||||||
|
|
|
|
||||||
16 | A(usize),
|
16 | A(usize),
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:14:10
|
--> tests/ui-fail-stable/from_form_field.rs:14:10
|
||||||
|
|
|
|
||||||
14 | #[derive(FromFormField)]
|
14 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -55,13 +55,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: enum must have at least one variant
|
error: enum must have at least one variant
|
||||||
--> $DIR/from_form_field.rs:20:1
|
--> tests/ui-fail-stable/from_form_field.rs:20:1
|
||||||
|
|
|
|
||||||
20 | enum Foo5 { }
|
20 | enum Foo5 { }
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:19:10
|
--> tests/ui-fail-stable/from_form_field.rs:19:10
|
||||||
|
|
|
|
||||||
19 | #[derive(FromFormField)]
|
19 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -69,13 +69,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: type generics are not supported
|
error: type generics are not supported
|
||||||
--> $DIR/from_form_field.rs:23:11
|
--> tests/ui-fail-stable/from_form_field.rs:23:11
|
||||||
|
|
|
|
||||||
23 | enum Foo6<T> {
|
23 | enum Foo6<T> {
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:22:10
|
--> tests/ui-fail-stable/from_form_field.rs:22:10
|
||||||
|
|
|
|
||||||
22 | #[derive(FromFormField)]
|
22 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -83,13 +83,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: invalid value: expected string literal
|
error: invalid value: expected string literal
|
||||||
--> $DIR/from_form_field.rs:29:21
|
--> tests/ui-fail-stable/from_form_field.rs:29:21
|
||||||
|
|
|
|
||||||
29 | #[field(value = 123)]
|
29 | #[field(value = 123)]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:27:10
|
--> tests/ui-fail-stable/from_form_field.rs:27:10
|
||||||
|
|
|
|
||||||
27 | #[derive(FromFormField)]
|
27 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -97,13 +97,13 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: expected literal, found bare path "value"
|
error: expected literal, found bare path "value"
|
||||||
--> $DIR/from_form_field.rs:35:13
|
--> tests/ui-fail-stable/from_form_field.rs:35:13
|
||||||
|
|
|
|
||||||
35 | #[field(value)]
|
35 | #[field(value)]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:33:10
|
--> tests/ui-fail-stable/from_form_field.rs:33:10
|
||||||
|
|
|
|
||||||
33 | #[derive(FromFormField)]
|
33 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -111,25 +111,25 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: variant has conflicting values
|
error: variant has conflicting values
|
||||||
--> $DIR/from_form_field.rs:41:5
|
--> tests/ui-fail-stable/from_form_field.rs:41:5
|
||||||
|
|
|
|
||||||
41 | #[field(value = "bar")]
|
41 | #[field(value = "bar")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] this value...
|
error: [note] this value...
|
||||||
--> $DIR/from_form_field.rs:41:21
|
--> tests/ui-fail-stable/from_form_field.rs:41:21
|
||||||
|
|
|
|
||||||
41 | #[field(value = "bar")]
|
41 | #[field(value = "bar")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] ...conflicts with this value
|
error: [note] ...conflicts with this value
|
||||||
--> $DIR/from_form_field.rs:42:21
|
--> tests/ui-fail-stable/from_form_field.rs:42:21
|
||||||
|
|
|
|
||||||
42 | #[field(value = "bar")]
|
42 | #[field(value = "bar")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:39:10
|
--> tests/ui-fail-stable/from_form_field.rs:39:10
|
||||||
|
|
|
|
||||||
39 | #[derive(FromFormField)]
|
39 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -137,25 +137,25 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field value conflicts with previous value
|
error: field value conflicts with previous value
|
||||||
--> $DIR/from_form_field.rs:50:21
|
--> tests/ui-fail-stable/from_form_field.rs:50:21
|
||||||
|
|
|
|
||||||
50 | #[field(value = "BAr")]
|
50 | #[field(value = "BAr")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [help] ...declared in this variant
|
error: [help] ...declared in this variant
|
||||||
--> $DIR/from_form_field.rs:50:5
|
--> tests/ui-fail-stable/from_form_field.rs:50:5
|
||||||
|
|
|
|
||||||
50 | #[field(value = "BAr")]
|
50 | #[field(value = "BAr")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] previous field with conflicting name
|
error: [note] previous field with conflicting name
|
||||||
--> $DIR/from_form_field.rs:48:5
|
--> tests/ui-fail-stable/from_form_field.rs:48:5
|
||||||
|
|
|
|
||||||
48 | #[field(value = "bar")]
|
48 | #[field(value = "bar")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:46:10
|
--> tests/ui-fail-stable/from_form_field.rs:46:10
|
||||||
|
|
|
|
||||||
46 | #[derive(FromFormField)]
|
46 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -163,25 +163,25 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field value conflicts with previous value
|
error: field value conflicts with previous value
|
||||||
--> $DIR/from_form_field.rs:57:21
|
--> tests/ui-fail-stable/from_form_field.rs:57:21
|
||||||
|
|
|
|
||||||
57 | #[field(value = "a")]
|
57 | #[field(value = "a")]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: [help] ...declared in this variant
|
error: [help] ...declared in this variant
|
||||||
--> $DIR/from_form_field.rs:57:5
|
--> tests/ui-fail-stable/from_form_field.rs:57:5
|
||||||
|
|
|
|
||||||
57 | #[field(value = "a")]
|
57 | #[field(value = "a")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] previous field with conflicting name
|
error: [note] previous field with conflicting name
|
||||||
--> $DIR/from_form_field.rs:56:5
|
--> tests/ui-fail-stable/from_form_field.rs:56:5
|
||||||
|
|
|
|
||||||
56 | A,
|
56 | A,
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:54:10
|
--> tests/ui-fail-stable/from_form_field.rs:54:10
|
||||||
|
|
|
|
||||||
54 | #[derive(FromFormField)]
|
54 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -189,25 +189,25 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: variant has conflicting values
|
error: variant has conflicting values
|
||||||
--> $DIR/from_form_field.rs:80:5
|
--> tests/ui-fail-stable/from_form_field.rs:80:5
|
||||||
|
|
|
|
||||||
80 | #[field(value = "FoO")]
|
80 | #[field(value = "FoO")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] this value...
|
error: [note] this value...
|
||||||
--> $DIR/from_form_field.rs:80:21
|
--> tests/ui-fail-stable/from_form_field.rs:80:21
|
||||||
|
|
|
|
||||||
80 | #[field(value = "FoO")]
|
80 | #[field(value = "FoO")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] ...conflicts with this value
|
error: [note] ...conflicts with this value
|
||||||
--> $DIR/from_form_field.rs:81:21
|
--> tests/ui-fail-stable/from_form_field.rs:81:21
|
||||||
|
|
|
|
||||||
81 | #[field(value = "foo")]
|
81 | #[field(value = "foo")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromFormField`
|
error: [note] error occurred while deriving `FromFormField`
|
||||||
--> $DIR/from_form_field.rs:78:10
|
--> tests/ui-fail-stable/from_form_field.rs:78:10
|
||||||
|
|
|
|
||||||
78 | #[derive(FromFormField)]
|
78 | #[derive(FromFormField)]
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
@ -215,25 +215,25 @@ error: [note] error occurred while deriving `FromFormField`
|
||||||
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromFormField` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field has conflicting names
|
error: field has conflicting names
|
||||||
--> $DIR/from_form_field.rs:87:5
|
--> tests/ui-fail-stable/from_form_field.rs:87:5
|
||||||
|
|
|
|
||||||
87 | #[field(name = "foo")]
|
87 | #[field(name = "foo")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] this field name...
|
error: [note] this field name...
|
||||||
--> $DIR/from_form_field.rs:87:20
|
--> tests/ui-fail-stable/from_form_field.rs:87:20
|
||||||
|
|
|
|
||||||
87 | #[field(name = "foo")]
|
87 | #[field(name = "foo")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] ...conflicts with this field name
|
error: [note] ...conflicts with this field name
|
||||||
--> $DIR/from_form_field.rs:88:28
|
--> tests/ui-fail-stable/from_form_field.rs:88:28
|
||||||
|
|
|
|
||||||
88 | #[field(name = uncased("FOO"))]
|
88 | #[field(name = uncased("FOO"))]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromForm`
|
error: [note] error occurred while deriving `FromForm`
|
||||||
--> $DIR/from_form_field.rs:85:10
|
--> tests/ui-fail-stable/from_form_field.rs:85:10
|
||||||
|
|
|
|
||||||
85 | #[derive(FromForm)]
|
85 | #[derive(FromForm)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
@ -241,25 +241,25 @@ error: [note] error occurred while deriving `FromForm`
|
||||||
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field name conflicts with previous name
|
error: field name conflicts with previous name
|
||||||
--> $DIR/from_form_field.rs:96:20
|
--> tests/ui-fail-stable/from_form_field.rs:96:20
|
||||||
|
|
|
|
||||||
96 | #[field(name = "foo")]
|
96 | #[field(name = "foo")]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: [help] declared in this field
|
error: [help] declared in this field
|
||||||
--> $DIR/from_form_field.rs:96:5
|
--> tests/ui-fail-stable/from_form_field.rs:96:5
|
||||||
|
|
|
|
||||||
96 | #[field(name = "foo")]
|
96 | #[field(name = "foo")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] previous field with conflicting name
|
error: [note] previous field with conflicting name
|
||||||
--> $DIR/from_form_field.rs:94:5
|
--> tests/ui-fail-stable/from_form_field.rs:94:5
|
||||||
|
|
|
|
||||||
94 | #[field(name = "foo")]
|
94 | #[field(name = "foo")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromForm`
|
error: [note] error occurred while deriving `FromForm`
|
||||||
--> $DIR/from_form_field.rs:92:10
|
--> tests/ui-fail-stable/from_form_field.rs:92:10
|
||||||
|
|
|
|
||||||
92 | #[derive(FromForm)]
|
92 | #[derive(FromForm)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
@ -267,25 +267,25 @@ error: [note] error occurred while deriving `FromForm`
|
||||||
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field name conflicts with previous name
|
error: field name conflicts with previous name
|
||||||
--> $DIR/from_form_field.rs:104:5
|
--> tests/ui-fail-stable/from_form_field.rs:104:5
|
||||||
|
|
|
|
||||||
104 | hello_there: usize,
|
104 | hello_there: usize,
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: [help] declared in this field
|
error: [help] declared in this field
|
||||||
--> $DIR/from_form_field.rs:104:5
|
--> tests/ui-fail-stable/from_form_field.rs:104:5
|
||||||
|
|
|
|
||||||
104 | hello_there: usize,
|
104 | hello_there: usize,
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: [note] previous field with conflicting name
|
error: [note] previous field with conflicting name
|
||||||
--> $DIR/from_form_field.rs:102:5
|
--> tests/ui-fail-stable/from_form_field.rs:102:5
|
||||||
|
|
|
|
||||||
102 | #[field(name = uncased("HELLO_THERE"))]
|
102 | #[field(name = uncased("HELLO_THERE"))]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromForm`
|
error: [note] error occurred while deriving `FromForm`
|
||||||
--> $DIR/from_form_field.rs:100:10
|
--> tests/ui-fail-stable/from_form_field.rs:100:10
|
||||||
|
|
|
|
||||||
100 | #[derive(FromForm)]
|
100 | #[derive(FromForm)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
@ -293,25 +293,25 @@ error: [note] error occurred while deriving `FromForm`
|
||||||
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
= note: this error originates in the derive macro `FromForm` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
|
|
||||||
error: field name conflicts with previous name
|
error: field name conflicts with previous name
|
||||||
--> $DIR/from_form_field.rs:111:5
|
--> tests/ui-fail-stable/from_form_field.rs:111:5
|
||||||
|
|
|
|
||||||
111 | hello_there: usize,
|
111 | hello_there: usize,
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: [help] declared in this field
|
error: [help] declared in this field
|
||||||
--> $DIR/from_form_field.rs:111:5
|
--> tests/ui-fail-stable/from_form_field.rs:111:5
|
||||||
|
|
|
|
||||||
111 | hello_there: usize,
|
111 | hello_there: usize,
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: [note] previous field with conflicting name
|
error: [note] previous field with conflicting name
|
||||||
--> $DIR/from_form_field.rs:109:5
|
--> tests/ui-fail-stable/from_form_field.rs:109:5
|
||||||
|
|
|
|
||||||
109 | #[field(name = "hello_there")]
|
109 | #[field(name = "hello_there")]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: [note] error occurred while deriving `FromForm`
|
error: [note] error occurred while deriving `FromForm`
|
||||||
--> $DIR/from_form_field.rs:107:10
|
--> tests/ui-fail-stable/from_form_field.rs:107:10
|
||||||
|
|
|
|
||||||
107 | #[derive(FromForm)]
|
107 | #[derive(FromForm)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
error: expected identifier
|
error: expected identifier, found keyword `_`
|
||||||
--> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18
|
--> tests/ui-fail-stable/typed-uris-bad-params.rs:63:18
|
||||||
|
|
|
|
||||||
63 | uri!(ignored(_ = 10));
|
63 | uri!(ignored(_ = 10));
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
error: expected identifier
|
error: unexpected token
|
||||||
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:10:28
|
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:10:16
|
||||||
|
|
|
|
||||||
10 | uri!(simple: id = 100, "Hello");
|
10 | uri!(simple: id = 100, "Hello");
|
||||||
| ^^^^^^^
|
| ^
|
||||||
|
|
||||||
error: named and unnamed parameters cannot be mixed
|
error: named and unnamed parameters cannot be mixed
|
||||||
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:11:17
|
--> tests/ui-fail-stable/typed-uris-invalid-syntax.rs:11:17
|
||||||
|
|
Loading…
Reference in New Issue