• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0038]: the trait `Trait` cannot be made into an object
2  --> tests/ui/no-attribute-macro.rs:12:12
3   |
412 |     let _: &dyn Trait;
5   |            ^^^^^^^^^^ `Trait` cannot be made into an object
6   |
7note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
8  --> tests/ui/no-attribute-macro.rs:2:14
9   |
101  | pub trait Trait {
11   |           ----- this trait cannot be made into an object...
122  |     async fn method(&self);
13   |              ^^^^^^ ...because method `method` is `async`
14   = help: consider moving `method` to another trait
15