This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
compiler/rustc_trait_selection/src/traits
tests/ui/traits/next-solver Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,7 @@ pub fn normalize_param_env_or_error<'tcx>(
340340 let mut predicates: Vec < _ > = util:: elaborate (
341341 tcx,
342342 unnormalized_env. caller_bounds ( ) . into_iter ( ) . map ( |predicate| {
343- if tcx. features ( ) . generic_const_exprs ( ) {
343+ if tcx. features ( ) . generic_const_exprs ( ) || tcx . next_trait_solver_globally ( ) {
344344 return predicate;
345345 }
346346
@@ -405,8 +405,6 @@ pub fn normalize_param_env_or_error<'tcx>(
405405 // compatibility. Eventually when lazy norm is implemented this can just be removed.
406406 // We do not normalize types here as there is no backwards compatibility requirement
407407 // for us to do so.
408- //
409- // FIXME(-Znext-solver): remove this hack since we have deferred projection equality
410408 predicate. fold_with ( & mut ConstNormalizer ( tcx) )
411409 } ) ,
412410 )
Original file line number Diff line number Diff line change 1+ //@ check-pass
2+ //@ compile-flags: -Znext-solver
3+
4+ // Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/213>.
5+
6+ use std:: ops:: Deref ;
7+
8+ trait Trait : Deref < Target = [ u8 ; { 1 + 1 } ] > { }
9+
10+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments