]> git.proxmox.com Git - rustc.git/blob - tests/ui/associated-inherent-types/bugs/ice-substitution.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / ui / associated-inherent-types / bugs / ice-substitution.rs
1 // known-bug: unknown
2 // failure-status: 101
3 // normalize-stderr-test "note: .*\n\n" -> ""
4 // normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
5 // rustc-env:RUST_BACKTRACE=0
6
7 // FIXME: I presume a type variable that couldn't be solved by `resolve_vars_if_possible`
8 // escapes the InferCtxt snapshot.
9
10 #![feature(inherent_associated_types)]
11 #![allow(incomplete_features)]
12
13 struct Cont<T>(T);
14
15 impl<T: Copy> Cont<T> {
16 type Out = Vec<T>;
17 }
18
19 pub fn weird<T: Copy>(x: T) {
20 let _: Cont<_>::Out = vec![true];
21 }
22
23 fn main() {}