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

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

15 lines
287 B
Rust
Raw Normal View History

use std::sync::mpsc::channel;
use std::thread::spawn;
use std::marker::PhantomData;
struct Foo<T> {foo: PhantomData<T>}
fn main() {
let (tx, rx) =
2022-02-14 12:25:26 +00:00
channel();
spawn(move || {
2022-02-14 12:25:26 +00:00
tx.send(Foo{ foo: PhantomData });
//~^ ERROR type annotations needed
});
}