mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 23:25:14 +00:00
Switch to Rust 2024 edition (#18129)
This commit is contained in:
parent
e67b35743a
commit
9ae698fe30
1082 changed files with 4211 additions and 3300 deletions
|
@ -271,15 +271,24 @@ fn parse_field_attributes(attribute: &Attribute) -> syn::Result<FieldAttributes>
|
|||
})?;
|
||||
|
||||
let Some(default) = default else {
|
||||
return Err(syn::Error::new(attribute.span(), "Mandatory `default` field is missing in `#[option]` attribute. Specify the default using `#[option(default=\"..\")]`."));
|
||||
return Err(syn::Error::new(
|
||||
attribute.span(),
|
||||
"Mandatory `default` field is missing in `#[option]` attribute. Specify the default using `#[option(default=\"..\")]`.",
|
||||
));
|
||||
};
|
||||
|
||||
let Some(value_type) = value_type else {
|
||||
return Err(syn::Error::new(attribute.span(), "Mandatory `value_type` field is missing in `#[option]` attribute. Specify the value type using `#[option(value_type=\"..\")]`."));
|
||||
return Err(syn::Error::new(
|
||||
attribute.span(),
|
||||
"Mandatory `value_type` field is missing in `#[option]` attribute. Specify the value type using `#[option(value_type=\"..\")]`.",
|
||||
));
|
||||
};
|
||||
|
||||
let Some(example) = example else {
|
||||
return Err(syn::Error::new(attribute.span(), "Mandatory `example` field is missing in `#[option]` attribute. Add an example using `#[option(example=\"..\")]`."));
|
||||
return Err(syn::Error::new(
|
||||
attribute.span(),
|
||||
"Mandatory `example` field is missing in `#[option]` attribute. Add an example using `#[option(example=\"..\")]`.",
|
||||
));
|
||||
};
|
||||
|
||||
Ok(FieldAttributes {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue