2020-05-17 03:22:48 -05:00
|
|
|
warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:5:12
|
|
|
|
|
|
|
|
|
LL | #![feature(specialization)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
= note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
|
2020-10-13 18:35:32 -05:00
|
|
|
= help: consider using `min_specialization` instead, which is more stable and complete
|
2020-05-17 03:22:48 -05:00
|
|
|
|
2020-09-26 16:20:14 -05:00
|
|
|
error[E0599]: the method `foo_one` exists for struct `MyStruct`, but its trait bounds were not satisfied
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:22:29
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct MyStruct;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ---------------
|
2022-06-20 10:43:20 -05:00
|
|
|
| | |
|
|
|
|
| | method `foo_one` not found for this struct
|
2020-02-18 18:35:47 -06:00
|
|
|
| doesn't satisfy `MyStruct: Foo`
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
|
|
|
LL | println!("{}", MyStruct.foo_one());
|
2020-09-26 16:20:14 -05:00
|
|
|
| ^^^^^^^ method cannot be called on `MyStruct` due to unsatisfied trait bounds
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2021-10-13 08:58:41 -05:00
|
|
|
note: trait bound `MyStruct: Foo` was not satisfied
|
2022-02-13 09:27:59 -06:00
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:14:1
|
2021-10-13 09:28:28 -05:00
|
|
|
|
|
|
|
|
LL | default impl<T> Foo for T {
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^---^^^^^-
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2021-09-28 09:48:54 -05:00
|
|
|
note: the following trait must be implemented
|
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:7:1
|
|
|
|
|
|
2022-02-13 09:27:59 -06:00
|
|
|
LL | trait Foo {
|
|
|
|
| ^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
2020-02-24 20:55:51 -06:00
|
|
|
note: `Foo` defines an item `foo_one`, perhaps you need to implement it
|
|
|
|
--> $DIR/specialization-trait-not-implemented.rs:7:1
|
|
|
|
|
|
|
|
|
LL | trait Foo {
|
|
|
|
| ^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-05-17 03:22:48 -05:00
|
|
|
error: aborting due to previous error; 1 warning emitted
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|