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

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

18 lines
227 B
Rust
Raw Normal View History

use std::rc::Rc;
use std::sync::Arc;
struct Foo(Arc<Bar>);
enum Bar {
A(Rc<Foo>),
B(Option<Foo>),
}
fn f<T: Send>(_: T) {}
fn main() {
f(Foo(Arc::new(Bar::B(None))));
//~^ ERROR E0277
//~| ERROR E0277
}