| error[E0046]: not all trait items implemented, missing: `b` | |
| --> $DIR/default-impl-not-an-impl.rs:22:1 | |
| | | |
| LL | fn b(&self) -> u32; | |
| | ------------------- `b` from trait | |
| ... | |
| LL | impl Gapped for u8 {} | |
| | ^^^^^^^^^^^^^^^^^^ missing `b` in implementation | |
| error[E0277]: the trait bound `u32: Foo` is not satisfied | |
| --> $DIR/default-impl-not-an-impl.rs:57:14 | |
| | | |
| LL | need_foo(&0u32); | |
| | -------- ^^^^^ the trait `Foo` is not implemented for `u32` | |
| | | | |
| | required by a bound introduced by this call | |
| | | |
| note: required by a bound in `need_foo` | |
| --> $DIR/default-impl-not-an-impl.rs:37:16 | |
| | | |
| LL | fn need_foo<T: Foo>(t: &T) -> u32 { | |
| | ^^^ required by this bound in `need_foo` | |
| error[E0599]: no method named `f` found for type `u32` in the current scope | |
| --> $DIR/default-impl-not-an-impl.rs:61:10 | |
| | | |
| LL | 0u32.f(); | |
| | ^ method not found in `u32` | |
| | | |
| = help: items from traits can only be used if the trait is implemented and in scope | |
| note: `Foo` defines an item `f`, perhaps you need to implement it | |
| --> $DIR/default-impl-not-an-impl.rs:27:1 | |
| | | |
| LL | trait Foo { | |
| | ^^^^^^^^^ | |
| LL | fn f(&self) -> u32; | |
| | | |
| error[E0277]: the trait bound `u32: Foo` is not satisfied | |
| --> $DIR/default-impl-not-an-impl.rs:65:23 | |
| | | |
| LL | let _: &dyn Foo = &0u32; | |
| | ^^^^^ the trait `Foo` is not implemented for `u32` | |
| | | |
| = note: required for the cast from `&u32` to `&dyn Foo` | |
| error[E0277]: the trait bound `i64: Bar` is not satisfied | |
| --> $DIR/default-impl-not-an-impl.rs:69:14 | |
| | | |
| LL | need_bar(&0i64); | |
| | -------- ^^^^^ the trait `Foo` is not implemented for `i64` | |
| | | | |
| | required by a bound introduced by this call | |
| | | |
| note: required for `i64` to implement `Bar` | |
| --> $DIR/default-impl-not-an-impl.rs:45:14 | |
| | | |
| LL | impl<T: Foo> Bar for T { | |
| | --- ^^^ ^ | |
| | | | |
| | unsatisfied trait bound introduced here | |
| note: required by a bound in `need_bar` | |
| --> $DIR/default-impl-not-an-impl.rs:51:16 | |
| | | |
| LL | fn need_bar<T: Bar>(t: &T) -> u32 { | |
| | ^^^ required by this bound in `need_bar` | |
| error: aborting due to 5 previous errors | |
| Some errors have detailed explanations: E0046, E0277, E0599. | |
| For more information about an error, try `rustc --explain E0046`. |