2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2015-03-22 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
trait A {
|
|
|
|
fn dummy(&self) { }
|
|
|
|
}
|
2013-08-15 14:22:36 -07:00
|
|
|
struct B;
|
|
|
|
impl A for B {}
|
|
|
|
|
2013-12-09 23:16:18 -08:00
|
|
|
struct C<'a> {
|
2019-05-28 14:47:21 -04:00
|
|
|
foo: &'a mut (dyn A+'a),
|
2013-08-15 14:22:36 -07:00
|
|
|
}
|
|
|
|
|
2019-05-28 14:47:21 -04:00
|
|
|
fn foo(a: &mut dyn A) {
|
2013-08-15 14:22:36 -07:00
|
|
|
C{ foo: a };
|
|
|
|
}
|
|
|
|
|
2013-09-25 00:43:37 -07:00
|
|
|
pub fn main() {
|
2013-08-15 14:22:36 -07:00
|
|
|
}
|