diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-07-29 08:20:25 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-08-02 15:38:00 +0000 |
| commit | 4fec845c3f971c0ec77fccf460fe981fc50a7a12 (patch) | |
| tree | c0228ce7b0bc834b714e174fd63d7e46bcc7faf6 /compiler/rustc_trait_selection/src/traits/specialize/mod.rs | |
| parent | 7637653b9fdd2b2f2dc3b378891eb5cf6aea9f5d (diff) | |
| download | rust-4fec845c3f971c0ec77fccf460fe981fc50a7a12.tar.gz rust-4fec845c3f971c0ec77fccf460fe981fc50a7a12.zip | |
Remove constness from `TraitPredicate`
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/specialize/mod.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/specialize/mod.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs index 61e631c438d..729cf2f3313 100644 --- a/compiler/rustc_trait_selection/src/traits/specialize/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/specialize/mod.rs @@ -500,16 +500,12 @@ pub(crate) fn to_pretty_impl_header(tcx: TyCtxt<'_>, impl_def_id: DefId) -> Opti let mut pretty_predicates = Vec::with_capacity(predicates.len() + types_without_default_bounds.len()); - for (mut p, _) in predicates { + for (p, _) in predicates { if let Some(poly_trait_ref) = p.as_trait_clause() { if Some(poly_trait_ref.def_id()) == sized_trait { types_without_default_bounds.remove(&poly_trait_ref.self_ty().skip_binder()); continue; } - - if ty::BoundConstness::ConstIfConst == poly_trait_ref.skip_binder().constness { - p = p.without_const(tcx); - } } pretty_predicates.push(p.to_string()); } |
