don't suggest turning crate-level attributes into outer style
This commit is contained in:
parent
70591dc15d
commit
22aa104bce
13 changed files with 70 additions and 53 deletions
|
@ -2898,6 +2898,17 @@ pub struct AttrItem {
|
|||
pub tokens: Option<LazyAttrTokenStream>,
|
||||
}
|
||||
|
||||
impl AttrItem {
|
||||
pub fn is_valid_for_outer_style(&self) -> bool {
|
||||
self.path == sym::cfg_attr
|
||||
|| self.path == sym::cfg
|
||||
|| self.path == sym::forbid
|
||||
|| self.path == sym::warn
|
||||
|| self.path == sym::allow
|
||||
|| self.path == sym::deny
|
||||
}
|
||||
}
|
||||
|
||||
/// `TraitRef`s appear in impls.
|
||||
///
|
||||
/// Resolution maps each `TraitRef`'s `ref_id` to its defining trait; that's all
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue