about summary refs log tree commit diff
path: root/compiler/rustc_passes/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-11-23 15:39:42 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2022-11-28 15:18:49 +1100
commite4a9150872a08db286208d07f5a6a90e466ca39c (patch)
tree4ccd691623b0747027b11cebbadb2804ee9ee0e2 /compiler/rustc_passes/src
parentaa10aad1ac5058e8278d8871c1cb4473134d3d54 (diff)
downloadrust-e4a9150872a08db286208d07f5a6a90e466ca39c.tar.gz
rust-e4a9150872a08db286208d07f5a6a90e466ca39c.zip
Rename `ast::Lit` as `ast::MetaItemLit`.
Diffstat (limited to 'compiler/rustc_passes/src')
-rw-r--r--compiler/rustc_passes/src/check_attr.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs
index acb9bd8e78a..c3794660d5c 100644
--- a/compiler/rustc_passes/src/check_attr.rs
+++ b/compiler/rustc_passes/src/check_attr.rs
@@ -8,7 +8,7 @@ use crate::errors::{
     self, AttrApplication, DebugVisualizerUnreadable, InvalidAttrAtCrateLevel, ObjectLifetimeErr,
     OnlyHasEffectOn, TransparentIncompatible, UnrecognizedReprHint,
 };
-use rustc_ast::{ast, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
+use rustc_ast::{ast, AttrStyle, Attribute, LitKind, MetaItemKind, MetaItemLit, NestedMetaItem};
 use rustc_data_structures::fx::FxHashMap;
 use rustc_errors::{fluent, Applicability, MultiSpan};
 use rustc_expand::base::resolve_path;
@@ -1355,7 +1355,10 @@ impl CheckAttrVisitor<'_> {
             return false;
         };
 
-        if matches!(&list[..], &[NestedMetaItem::Literal(Lit { kind: LitKind::Int(..), .. })]) {
+        if matches!(
+            &list[..],
+            &[NestedMetaItem::Literal(MetaItemLit { kind: LitKind::Int(..), .. })]
+        ) {
             true
         } else {
             self.tcx.sess.emit_err(errors::RustcLayoutScalarValidRangeArg { attr_span: attr.span });