fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0038]: the trait `Bar` cannot be made into an object 2 --> $DIR/object-safety-mentions-Self.rs:22:30 3 | 4LL | trait Bar { 5 | --- this trait cannot be made into an object... 6LL | fn bar(&self, x: &Self); 7 | ----- ...because method `bar` references the `Self` type in this parameter 8... 9LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar { 10 | ^^^^^^^^ the trait `Bar` cannot be made into an object 11 | 12 = help: consider moving `bar` to another trait 13 14error[E0038]: the trait `Baz` cannot be made into an object 15 --> $DIR/object-safety-mentions-Self.rs:28:30 16 | 17LL | trait Baz { 18 | --- this trait cannot be made into an object... 19LL | fn baz(&self) -> Self; 20 | ---- ...because method `baz` references the `Self` type in its return type 21... 22LL | fn make_baz<T:Baz>(t: &T) -> &dyn Baz { 23 | ^^^^^^^^ the trait `Baz` cannot be made into an object 24 | 25 = help: consider moving `baz` to another trait 26 27error: aborting due to 2 previous errors 28 29For more information about this error, try `rustc --explain E0038`.