Auto merge of #131235 - codemountains:rename-nestedmetaitem-to-metaitemlnner, r=nnethercote
Rename `NestedMetaItem` to `MetaItemInner` Fixes #131087 r? `@nnethercote`
This commit is contained in:
commit
0b16baa570
43 changed files with 186 additions and 191 deletions
|
@ -39,7 +39,7 @@ fn parse_cfg<'a>(
|
|||
cx: &ExtCtxt<'a>,
|
||||
span: Span,
|
||||
tts: TokenStream,
|
||||
) -> PResult<'a, ast::NestedMetaItem> {
|
||||
) -> PResult<'a, ast::MetaItemInner> {
|
||||
let mut p = cx.new_parser_from_tts(tts);
|
||||
|
||||
if p.token == token::Eof {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use rustc_ast as ast;
|
||||
use rustc_ast::{GenericParamKind, ItemKind, MetaItemKind, NestedMetaItem, StmtKind};
|
||||
use rustc_ast::{GenericParamKind, ItemKind, MetaItemInner, MetaItemKind, StmtKind};
|
||||
use rustc_expand::base::{
|
||||
Annotatable, DeriveResolution, ExpandResult, ExtCtxt, Indeterminate, MultiItemModifier,
|
||||
};
|
||||
|
@ -49,9 +49,9 @@ impl MultiItemModifier for Expander {
|
|||
let mut resolutions = match &meta_item.kind {
|
||||
MetaItemKind::List(list) => {
|
||||
list.iter()
|
||||
.filter_map(|nested_meta| match nested_meta {
|
||||
NestedMetaItem::MetaItem(meta) => Some(meta),
|
||||
NestedMetaItem::Lit(lit) => {
|
||||
.filter_map(|meta_item_inner| match meta_item_inner {
|
||||
MetaItemInner::MetaItem(meta) => Some(meta),
|
||||
MetaItemInner::Lit(lit) => {
|
||||
// Reject `#[derive("Debug")]`.
|
||||
report_unexpected_meta_item_lit(sess, lit);
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue