]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issue-54943-2.rs
Merge remote-tracking branch 'upstream/master'
[rust.git] / src / test / ui / issue-54943-2.rs
1 #![feature(nll)]
2
3 // This test is a minimal version of an ICE in the dropck-eyepatch tests
4 // found in the fix for #54943. In particular, this test is in unreachable
5 // code as the initial fix for this ICE only worked if the code was reachable.
6
7 // compile-pass
8
9 fn foo<T>(_t: T) {
10 }
11
12 fn main() {
13     return;
14
15     struct A<'a, B: 'a>(&'a B);
16     let (a1, a2): (String, A<_>) = (String::from("auto"), A(&"this"));
17     foo((a1, a2));
18 }