about summary refs log tree commit diff
path: root/tests/ui/traits/winnowing/global-non-global-env-1.rs
blob: 75c184b65bf0435b0173069f8632e75c57d3037b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
//@ check-pass

// A regression test for an edge case of candidate selection
// in the old trait solver, see #132325 for more details.

trait Trait<T> {}
impl<T> Trait<T> for () {}

fn impls_trait<T: Trait<U>, U>(_: T) -> U { todo!() }
fn foo<T>() -> u32
where
    (): Trait<u32>,
    (): Trait<T>,
{
    impls_trait(())
}

fn main() {}