Files
rust/tests/ui/traits/mut-trait-in-struct-8249.rs

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

21 lines
256 B
Rust
Raw Normal View History

2025-07-13 16:56:31 -04:00
// https://github.com/rust-lang/rust/issues/8249
//@ run-pass
#![allow(dead_code)]
trait A {
fn dummy(&self) { }
}
struct B;
impl A for B {}
struct C<'a> {
2019-05-28 14:47:21 -04:00
foo: &'a mut (dyn A+'a),
}
2019-05-28 14:47:21 -04:00
fn foo(a: &mut dyn A) {
C{ foo: a };
}
pub fn main() {
}