Rename value field to expr to simplify later commits' diffs

This commit is contained in:
Oli Scherer 2024-12-02 11:27:57 +00:00 committed by Jonathan Dönszelmann
parent a611773d80
commit 53b2c7cc95
14 changed files with 28 additions and 30 deletions

View file

@ -896,8 +896,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
// This is an inert key-value attribute - it will never be visible to macros
// after it gets lowered to HIR. Therefore, we can extract literals to handle
// nonterminals in `#[doc]` (e.g. `#[doc = $e]`).
&AttrArgs::Eq { eq_span, ref value } => {
let expr = value.unwrap_ast();
&AttrArgs::Eq { eq_span, ref expr } => {
let expr = expr.unwrap_ast();
// In valid code the value always ends up as a single literal. Otherwise, a dummy
// literal suffices because the error is handled elsewhere.
let lit = if let ExprKind::Lit(token_lit) = expr.kind
@ -913,7 +913,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
span: DUMMY_SP,
}
};
AttrArgs::Eq { eq_span, value: AttrArgsEq::Hir(lit) }
AttrArgs::Eq { eq_span, expr: AttrArgsEq::Hir(lit) }
}
}
}