diff options
Diffstat (limited to 'compiler/rustc_symbol_mangling/src')
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/legacy.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_symbol_mangling/src/v0.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_symbol_mangling/src/legacy.rs b/compiler/rustc_symbol_mangling/src/legacy.rs index b3773d5be28..2f7e413b087 100644 --- a/compiler/rustc_symbol_mangling/src/legacy.rs +++ b/compiler/rustc_symbol_mangling/src/legacy.rs @@ -228,9 +228,9 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> { self.write_str("[")?; self = self.print_type(ty)?; self.write_str("; ")?; - if let Some(size) = size.val().try_to_bits(self.tcx().data_layout.pointer_size) { + if let Some(size) = size.kind().try_to_bits(self.tcx().data_layout.pointer_size) { write!(self, "{}", size)? - } else if let ty::ConstKind::Param(param) = size.val() { + } else if let ty::ConstKind::Param(param) = size.kind() { self = param.print(self)? } else { self.write_str("_")? @@ -260,7 +260,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolPrinter<'tcx> { fn print_const(self, ct: ty::Const<'tcx>) -> Result<Self::Const, Self::Error> { // only print integers - match (ct.val(), ct.ty().kind()) { + match (ct.kind(), ct.ty().kind()) { ( ty::ConstKind::Value(ConstValue::Scalar(Scalar::Int(scalar))), ty::Int(_) | ty::Uint(_), diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index dc1946bcdc2..f79f7a4ebdf 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -582,7 +582,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> { fn print_const(mut self, ct: ty::Const<'tcx>) -> Result<Self::Const, Self::Error> { // We only mangle a typed value if the const can be evaluated. let ct = ct.eval(self.tcx, ty::ParamEnv::reveal_all()); - match ct.val() { + match ct.kind() { ty::ConstKind::Value(_) => {} // Placeholders (should be demangled as `_`). @@ -630,7 +630,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> { // handle `&str` and include both `&` ("R") and `str` ("e") prefixes. ty::Ref(_, ty, hir::Mutability::Not) if *ty == self.tcx.types.str_ => { self.push("R"); - match ct.val() { + match ct.kind() { ty::ConstKind::Value(ConstValue::Slice { data, start, end }) => { // NOTE(eddyb) the following comment was kept from `ty::print::pretty`: // The `inspect` here is okay since we checked the bounds, and there are no |
