chore: update attribute-derive (#2438)
This commit is contained in:
parent
97fd8ff6c4
commit
4e578e335b
|
@ -13,7 +13,7 @@ rust-version.workspace = true
|
|||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
attribute-derive = { version = "0.8", features = ["syn-full"] }
|
||||
attribute-derive = { version = "0.9", features = ["syn-full"]}
|
||||
cfg-if = "1"
|
||||
html-escape = "0.2"
|
||||
itertools = "0.12"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use attribute_derive::Attribute as AttributeDerive;
|
||||
use attribute_derive::FromAttr;
|
||||
use convert_case::{
|
||||
Case::{Pascal, Snake},
|
||||
Casing,
|
||||
|
@ -808,7 +808,7 @@ impl Docs {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, AttributeDerive)]
|
||||
#[derive(Clone, Debug, FromAttr)]
|
||||
#[attribute(ident = prop)]
|
||||
struct PropOpt {
|
||||
#[attribute(conflicts = [optional_no_strip, strip_option])]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::component::{
|
||||
convert_from_snake_case, drain_filter, is_option, unwrap_option, Docs,
|
||||
};
|
||||
use attribute_derive::Attribute as AttributeDerive;
|
||||
use attribute_derive::FromAttr;
|
||||
use proc_macro2::{Ident, TokenStream};
|
||||
use quote::{quote, ToTokens, TokenStreamExt};
|
||||
use syn::{
|
||||
|
@ -179,7 +179,7 @@ impl Prop {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, AttributeDerive)]
|
||||
#[derive(Clone, Debug, FromAttr)]
|
||||
#[attribute(ident = prop)]
|
||||
struct PropOpt {
|
||||
#[attribute(conflicts = [optional_no_strip, strip_option])]
|
||||
|
|
|
@ -38,7 +38,9 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
|
|||
30 | #[prop(optional_no_strip, strip_option)] conflicting: bool,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unexpected end of input, expected assignment `=`
|
||||
error: unexpected end of input, expected `=` or `(`
|
||||
|
||||
= help: try `#[prop(default = 5 * 10)]`
|
||||
--> tests/ui/component.rs:36:40
|
||||
|
|
||||
36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView {
|
||||
|
@ -46,7 +48,7 @@ error: unexpected end of input, expected assignment `=`
|
|||
|
||||
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
||||
|
||||
= help: try `#[prop(default=5 * 10)]`
|
||||
= help: try `#[prop(default = 5 * 10)]`
|
||||
--> tests/ui/component.rs:42:22
|
||||
|
|
||||
42 | #[prop(default= |)] default: bool,
|
||||
|
|
|
@ -30,7 +30,9 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
|
|||
25 | #[prop(optional_no_strip, strip_option)] conflicting: bool,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unexpected end of input, expected assignment `=`
|
||||
error: unexpected end of input, expected `=` or `(`
|
||||
|
||||
= help: try `#[prop(default = 5 * 10)]`
|
||||
--> tests/ui/component_absolute.rs:32:19
|
||||
|
|
||||
32 | #[prop(default)] default: bool,
|
||||
|
@ -38,7 +40,7 @@ error: unexpected end of input, expected assignment `=`
|
|||
|
||||
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
|
||||
|
||||
= help: try `#[prop(default=5 * 10)]`
|
||||
= help: try `#[prop(default = 5 * 10)]`
|
||||
--> tests/ui/component_absolute.rs:39:22
|
||||
|
|
||||
39 | #[prop(default= |)] default: bool,
|
||||
|
|
Loading…
Reference in New Issue