Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//@ compile-flags: -Znext-solver

// Regression test for #155977: the new solver used to ICE while normalizing
// a higher-ranked where-clause in the param env.
// Fixed by eager param-env normalization in #156976.

trait Trait<Input> {
type Output;
}

fn walk2<F>()
//~^ ERROR the trait bound
where
for<'a> F: 'a,
for<'a> <F as Trait<&'a u32>>::Output: 'a,
{
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
error[E0277]: the trait bound `for<'a> F: Trait<&'a u32>` is not satisfied
--> $DIR/higher-ranked-param-env-normalization-155977.rs:11:1
|
LL | / fn walk2<F>()
LL | |
LL | | where
LL | | for<'a> F: 'a,
LL | | for<'a> <F as Trait<&'a u32>>::Output: 'a,
| |______________________________________________^ the trait `for<'a> Trait<&'a u32>` is not implemented for `F`
|
help: consider further restricting type parameter `F` with trait `Trait`
|
LL | for<'a> F: 'a + for<'a> Trait<&'a u32>,
| ++++++++++++++++++++++++

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
Loading