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