|  | 
|  | 1 | +error[E0038]: the trait `NonObjectSafe1` cannot be made into an object | 
|  | 2 | +  --> $DIR/feature-gate-object_safe_for_dispatch.rs:18:1 | 
|  | 3 | +   | | 
|  | 4 | +LL | fn takes_non_object_safe_ref<T>(obj: &dyn NonObjectSafe1) { | 
|  | 5 | +   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonObjectSafe1` cannot be made into an object | 
|  | 6 | +   | | 
|  | 7 | +   = note: the trait cannot require that `Self : Sized` | 
|  | 8 | + | 
|  | 9 | +error[E0038]: the trait `NonObjectSafe2` cannot be made into an object | 
|  | 10 | +  --> $DIR/feature-gate-object_safe_for_dispatch.rs:22:1 | 
|  | 11 | +   | | 
|  | 12 | +LL | fn return_non_object_safe_ref() -> &'static dyn NonObjectSafe2 { | 
|  | 13 | +   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonObjectSafe2` cannot be made into an object | 
|  | 14 | +   | | 
|  | 15 | +   = note: method `static_fn` has no receiver | 
|  | 16 | + | 
|  | 17 | +error[E0038]: the trait `NonObjectSafe3` cannot be made into an object | 
|  | 18 | +  --> $DIR/feature-gate-object_safe_for_dispatch.rs:27:1 | 
|  | 19 | +   | | 
|  | 20 | +LL | fn takes_non_object_safe_box(obj: Box<NonObjectSafe3>) { | 
|  | 21 | +   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonObjectSafe3` cannot be made into an object | 
|  | 22 | +   | | 
|  | 23 | +   = note: method `foo` has generic type parameters | 
|  | 24 | + | 
|  | 25 | +error[E0038]: the trait `NonObjectSafe4` cannot be made into an object | 
|  | 26 | +  --> $DIR/feature-gate-object_safe_for_dispatch.rs:31:1 | 
|  | 27 | +   | | 
|  | 28 | +LL | fn return_non_object_safe_rc() -> std::rc::Rc<NonObjectSafe4> { | 
|  | 29 | +   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NonObjectSafe4` cannot be made into an object | 
|  | 30 | +   | | 
|  | 31 | +   = note: method `foo` references the `Self` type in its arguments or return type | 
|  | 32 | + | 
|  | 33 | +error[E0038]: the trait `NonObjectSafe1` cannot be made into an object | 
|  | 34 | +  --> $DIR/feature-gate-object_safe_for_dispatch.rs:38:6 | 
|  | 35 | +   | | 
|  | 36 | +LL | impl Trait for NonObjectSafe1 {} | 
|  | 37 | +   |      ^^^^^ the trait `NonObjectSafe1` cannot be made into an object | 
|  | 38 | +   | | 
|  | 39 | +   = note: the trait cannot require that `Self : Sized` | 
|  | 40 | + | 
|  | 41 | +error: aborting due to 5 previous errors | 
|  | 42 | + | 
|  | 43 | +For more information about this error, try `rustc --explain E0038`. | 
0 commit comments