File tree 2 files changed +11
-3
lines changed
compiler/rustc_trait_selection/src/traits
tests/ui/traits/next-solver
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>(
340
340
let mut predicates: Vec < _ > = util:: elaborate (
341
341
tcx,
342
342
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 ( ) {
344
344
return predicate;
345
345
}
346
346
@@ -405,8 +405,6 @@ pub fn normalize_param_env_or_error<'tcx>(
405
405
// compatibility. Eventually when lazy norm is implemented this can just be removed.
406
406
// We do not normalize types here as there is no backwards compatibility requirement
407
407
// for us to do so.
408
- //
409
- // FIXME(-Znext-solver): remove this hack since we have deferred projection equality
410
408
predicate. fold_with ( & mut ConstNormalizer ( tcx) )
411
409
} ) ,
412
410
)
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