]>
git.proxmox.com Git - rustc.git/blob - tests/ui/higher-ranked/trait-bounds/issue-57639.rs
1 // Regression test for #57639:
3 // In the move to universes, this test stopped working. The problem
4 // was that when the trait solver was asked to prove `for<'a> T::Item:
5 // Foo<'a>` as part of WF checking, it wound up "eagerly committing"
6 // to the where clause, which says that `T::Item: Foo<'a>`, but it
7 // should instead have been using the bound found in the trait
8 // declaration. Pre-universe, this used to work out ok because we got
9 // "eager errors" due to the leak check.
11 // See [this comment on GitHub][c] for more details.
15 // [c]: https://github.com/rust-lang/rust/issues/57639#issuecomment-455685861
20 type Item
: for<'a
> Foo
<'a
>;