1
Fork 0

Rollup merge of #83054 - tmiasko:rustc_layout_scalar_valid_range, r=davidtwco

Validate rustc_layout_scalar_valid_range_{start,end} attributes

Fixes #82251, fixes #82981.
This commit is contained in:
Dylan DPC 2021-03-15 16:22:51 +01:00 committed by GitHub
commit b8622f2b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 91 additions and 1 deletions

View file

@ -120,6 +120,7 @@ impl NestedMetaItem {
}
impl Attribute {
#[inline]
pub fn has_name(&self, name: Symbol) -> bool {
match self.kind {
AttrKind::Normal(ref item, _) => item.path == name,