mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
4fa5fb684e
this prevents higher ranked goals from guiding selection
19 lines
383 B
Rust
19 lines
383 B
Rust
//@ revisions: old next
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
// cc #119820
|
|
|
|
trait Trait<T, U> {}
|
|
|
|
// using this impl results in a higher-ranked region error.
|
|
impl<'a> Trait<&'a str, &'a str> for () {}
|
|
|
|
impl<'a> Trait<&'a str, String> for () {}
|
|
|
|
fn impls_trait<T: for<'a> Trait<&'a str, U>, U>() {}
|
|
|
|
fn main() {
|
|
impls_trait::<(), _>();
|
|
//~^ ERROR type annotations needed
|
|
}
|