rust/tests/ui/issues/issue-11677.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
335 B
Rust
Raw Normal View History

// 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!() }
}
2019-05-28 18:47:21 +00:00
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) };
}