2014-08-27 20:46:52 -05:00
|
|
|
fn foo<T:'static>() {
|
2018-06-09 18:53:36 -05:00
|
|
|
1.bar::<T>(); //~ ERROR `T` cannot be sent between threads safely
|
2012-03-16 10:25:36 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
trait Bar {
|
2013-07-10 16:43:25 -05:00
|
|
|
fn bar<T:Send>(&self);
|
2012-07-11 17:00:40 -05:00
|
|
|
}
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
impl Bar for usize {
|
2013-07-10 16:43:25 -05:00
|
|
|
fn bar<T:Send>(&self) {
|
2012-03-16 10:25:36 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|