]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / closures / closure-bounds-cant-promote-superkind-in-struct.rs
1 struct X<F> where F: FnOnce() + 'static + Send {
2     field: F,
3 }
4
5 fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
6     //~^ ERROR `F` cannot be sent between threads safely
7     return X { field: blk };
8 }
9
10 fn main() {
11 }