mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
18 lines
487 B
Plaintext
18 lines
487 B
Plaintext
error[E0277]: the trait bound `X: Ord` is not satisfied
|
|
--> $DIR/issue-20162.rs:5:7
|
|
|
|
|
LL | b.sort();
|
|
| ^^^^ the trait `Ord` is not implemented for `X`
|
|
|
|
|
note: required by a bound in `slice::<impl [T]>::sort`
|
|
--> $SRC_DIR/alloc/src/slice.rs:LL:COL
|
|
help: consider annotating `X` with `#[derive(Ord)]`
|
|
|
|
|
LL + #[derive(Ord)]
|
|
LL | struct X { x: i32 }
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|