mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
fix: forward missing lint attributes passed to #[component] macro (#3989)
This commit is contained in:
committed by
Greg Johnston
parent
89cbf86595
commit
c8df5b75ef
@@ -667,7 +667,13 @@ impl Parse for DummyModel {
|
||||
let mut attrs = input.call(Attribute::parse_outer)?;
|
||||
// Drop unknown attributes like #[deprecated]
|
||||
drain_filter(&mut attrs, |attr| {
|
||||
!(attr.path().is_ident("doc") || attr.path().is_ident("allow"))
|
||||
let path = attr.path();
|
||||
!(path.is_ident("doc")
|
||||
|| path.is_ident("allow")
|
||||
|| path.is_ident("expect")
|
||||
|| path.is_ident("warn")
|
||||
|| path.is_ident("deny")
|
||||
|| path.is_ident("forbid"))
|
||||
});
|
||||
|
||||
let vis: Visibility = input.parse()?;
|
||||
@@ -956,13 +962,20 @@ impl UnknownAttrs {
|
||||
let attrs = attrs
|
||||
.iter()
|
||||
.filter_map(|attr| {
|
||||
if attr.path().is_ident("doc") {
|
||||
let path = attr.path();
|
||||
|
||||
if path.is_ident("doc") {
|
||||
if let Meta::NameValue(_) = &attr.meta {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
if attr.path().is_ident("allow") {
|
||||
if path.is_ident("allow")
|
||||
|| path.is_ident("expect")
|
||||
|| path.is_ident("warn")
|
||||
|| path.is_ident("deny")
|
||||
|| path.is_ident("forbid")
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user