2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the trait bound `X: Ord` is not satisfied
|
2022-12-11 22:49:50 +00:00
|
|
|
--> $DIR/issue-20162.rs:5:7
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | b.sort();
|
2022-12-11 22:49:50 +00:00
|
|
|
| ^^^^ the trait `Ord` is not implemented for `X`
|
2021-10-05 23:04:09 +00:00
|
|
|
|
|
|
|
|
note: required by a bound in `slice::<impl [T]>::sort`
|
|
|
|
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
|
2022-03-31 14:58:45 +00:00
|
|
|
help: consider annotating `X` with `#[derive(Ord)]`
|
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + #[derive(Ord)]
|
|
|
|
LL | struct X { x: i32 }
|
2022-03-31 14:58:45 +00:00
|
|
|
|
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|