blob: 0f0002f7797e4ec7ee94173e75a2b713eccb0ca5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
//! This tries to prove the APIT's bounds in a canonical query,
//! which doesn't know anything about the defining scope of either
//! opaque type and thus makes a random choice as to which opaque type
//! becomes the hidden type of the other. When we leave the canonical
//! query, we attempt to actually check the defining anchor, but now we
//! have a situation where the RPIT gets constrained outside its anchor.
// revisions: current next
//[next] compile-flags: -Ztrait-solver=next
//[next] check-pass
//[current] known-bug: #108498
//[current] failure-status: 101
//[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId("
//[current] normalize-stderr-test: "(?m)note: .*$" -> ""
//[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> ""
//[current] normalize-stderr-test: "(?m)^ *at .*\n" -> ""
#![feature(type_alias_impl_trait)]
type Opaque = impl Sized;
fn get_rpit() -> impl Clone {}
fn query(_: impl FnOnce() -> Opaque) {}
fn test() -> Opaque {
query(get_rpit);
get_rpit()
}
fn main() {}
|