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