2013-06-19 17:55:30 +00:00
|
|
|
trait Foo {
|
2021-04-16 09:06:51 +00:00
|
|
|
fn dummy(&self) {}
|
2013-06-19 17:55:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This should emit the less confusing error, not the more confusing one.
|
|
|
|
|
2014-06-14 18:03:34 +00:00
|
|
|
fn foo(_x: Foo + Send) {
|
2018-07-10 21:10:13 +00:00
|
|
|
//~^ ERROR the size for values of type
|
2019-05-28 18:46:13 +00:00
|
|
|
//~| WARN trait objects without an explicit `dyn` are deprecated
|
2021-06-16 12:27:44 +00:00
|
|
|
//~| WARN this is accepted in the current edition
|
2013-06-19 17:55:30 +00:00
|
|
|
}
|
2023-12-20 01:03:05 +00:00
|
|
|
fn bar(_x: (dyn Foo + Send)) {
|
|
|
|
//~^ ERROR the size for values of type
|
|
|
|
}
|
2013-06-19 17:55:30 +00:00
|
|
|
|
2021-04-16 09:06:51 +00:00
|
|
|
fn main() {}
|