summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_symbol_mangling/src/v0.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_symbol_mangling/src/v0.rs')
-rw-r--r--compiler/rustc_symbol_mangling/src/v0.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs
index ecfe6861e..2cca480f2 100644
--- a/compiler/rustc_symbol_mangling/src/v0.rs
+++ b/compiler/rustc_symbol_mangling/src/v0.rs
@@ -218,7 +218,7 @@ impl<'tcx> SymbolMangler<'tcx> {
let lifetimes = regions
.into_iter()
.map(|br| match br {
- ty::BrAnon(i) => i,
+ ty::BrAnon(i, _) => i,
_ => bug!("symbol_names: non-anonymized region `{:?}` in `{:?}`", br, value),
})
.max()
@@ -335,7 +335,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
// Late-bound lifetimes use indices starting at 1,
// see `BinderLevel` for more details.
- ty::ReLateBound(debruijn, ty::BoundRegion { kind: ty::BrAnon(i), .. }) => {
+ ty::ReLateBound(debruijn, ty::BoundRegion { kind: ty::BrAnon(i, _), .. }) => {
let binder = &self.binders[self.binders.len() - 1 - debruijn.index()];
let depth = binder.lifetime_depths.start + i;
@@ -502,7 +502,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
fn print_dyn_existential(
mut self,
- predicates: &'tcx ty::List<ty::Binder<'tcx, ty::ExistentialPredicate<'tcx>>>,
+ predicates: &'tcx ty::List<ty::PolyExistentialPredicate<'tcx>>,
) -> Result<Self::DynExistential, Self::Error> {
// Okay, so this is a bit tricky. Imagine we have a trait object like
// `dyn for<'a> Foo<'a, Bar = &'a ()>`. When we mangle this, the
@@ -575,6 +575,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
// a path), even for it we still need to encode a placeholder, as
// the path could refer back to e.g. an `impl` using the constant.
ty::ConstKind::Unevaluated(_)
+ | ty::ConstKind::Expr(_)
| ty::ConstKind::Param(_)
| ty::ConstKind::Infer(_)
| ty::ConstKind::Bound(..)
@@ -621,7 +622,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
});
match inner_ty.kind() {
- ty::Str if *mutbl == hir::Mutability::Not => {
+ ty::Str if mutbl.is_not() => {
match ct.kind() {
ty::ConstKind::Value(valtree) => {
let slice =
@@ -654,8 +655,7 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
.builtin_deref(true)
.expect("tried to dereference on non-ptr type")
.ty;
- let dereferenced_const =
- self.tcx.mk_const(ty::ConstS { kind: ct.kind(), ty: pointee_ty });
+ let dereferenced_const = self.tcx.mk_const(ct.kind(), pointee_ty);
self = dereferenced_const.print(self)?;
}
}
@@ -690,15 +690,15 @@ impl<'tcx> Printer<'tcx> for &mut SymbolMangler<'tcx> {
self.push("V");
self = self.print_def_path(variant_def.def_id, substs)?;
- match variant_def.ctor_kind {
- CtorKind::Const => {
+ match variant_def.ctor_kind() {
+ Some(CtorKind::Const) => {
self.push("U");
}
- CtorKind::Fn => {
+ Some(CtorKind::Fn) => {
self.push("T");
self = print_field_list(self)?;
}
- CtorKind::Fictive => {
+ None => {
self.push("S");
for (field_def, field) in iter::zip(&variant_def.fields, fields) {
// HACK(eddyb) this mimics `path_append`,