]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.rs
Auto merge of #55519 - fhartwig:hashmap-index-example, r=Centril
[rust.git] / src / test / 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 }