about summary refs log tree commit diff
path: root/tests/ui/issues/issue-11677.rs
blob: 32e129b2c01d6aebf5b1834fe2515d0eea3dce0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//@ run-pass
#![allow(unused_imports)]

#![allow(dead_code)]

// this code used to cause an ICE

use std::marker;

trait X<T> {
    fn dummy(&self) -> T { panic!() }
}

struct S<T> {f: Box<dyn X<T>+'static>,
             g: Box<dyn X<T>+'static>}

struct F;
impl X<isize> for F {
}

fn main() {
  S {f: Box::new(F), g: Box::new(F) };
}