Rename the ConstS::val
field as kind
.
And likewise for the `Const::val` method. Because its type is called `ConstKind`. Also `val` is a confusing name because `ConstKind` is an enum with seven variants, one of which is called `Value`. Also, this gives consistency with `TyS` and `PredicateS` which have `kind` fields. The commit also renames a few `Const` variables from `val` to `c`, to avoid confusion with the `ConstKind::Value` variant.
This commit is contained in:
parent
ca122c7ebb
commit
93e4b6ef06
74 changed files with 173 additions and 169 deletions
|
@ -474,7 +474,7 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
|
|||
let err = ConstEvalErr::new(&self.ecx, error, Some(c.span));
|
||||
if let Some(lint_root) = self.lint_root(source_info) {
|
||||
let lint_only = match c.literal {
|
||||
ConstantKind::Ty(ct) => match ct.val() {
|
||||
ConstantKind::Ty(ct) => match ct.kind() {
|
||||
// Promoteds must lint and not error as the user didn't ask for them
|
||||
ConstKind::Unevaluated(ty::Unevaluated {
|
||||
def: _,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue