about summary refs log tree commit diff
path: root/tests/ui/traits/error-reporting/ambiguity-in-dropck-err-reporting.rs
blob: ad313823fe40e72b43a5ce9b5ac62e9a67625987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Regression test for #143481, where we were calling `predicates_of` on
// a Crate HIR node because we were using a dummy obligation cause's body id
// without checking that it was meaningful first.

trait Role {
    type Inner;
}
struct HandshakeCallback<C>(C);
impl<C: Clone> Role for HandshakeCallback {
    //~^ ERROR missing generics
    type Inner = usize;
}
struct Handshake<R: Role>(R::Inner);
fn accept() -> Handshake<HandshakeCallback<()>> {
    todo!()
}

fn main() {}