diff options
| author | bors <bors@rust-lang.org> | 2022-06-14 10:51:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-14 10:51:16 +0000 |
| commit | edab34ab2abbafc16a78daedf71dbacd2eb0b7bf (patch) | |
| tree | 2d763273c835911f568f489ccc1c4cf8bb3b7195 /compiler/rustc_symbol_mangling/src | |
| parent | da895e7938e8d6f8d221fce2876d225bf58df865 (diff) | |
| parent | 27f78051ada9d1290a62ff34d9fe014ca940d4e9 (diff) | |
| download | rust-edab34ab2abbafc16a78daedf71dbacd2eb0b7bf.tar.gz rust-edab34ab2abbafc16a78daedf71dbacd2eb0b7bf.zip | |
Auto merge of #98091 - Dylan-DPC:rollup-ueb6b5x, r=Dylan-DPC
Rollup of 5 pull requests Successful merges: - #97869 (BTree: tweak internal comments) - #97935 (Rename the `ConstS::val` field as `kind`.) - #97948 (lint: add diagnostic translation migration lints) - #98042 (Fix compat_fn option method on miri) - #98069 (rustdoc: remove link on slice brackets) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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 |
