]> git.proxmox.com Git - rustc.git/blame - src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / doc / book / listings / ch10-generic-types-traits-and-lifetimes / listing-10-05 / output.txt
CommitLineData
74b04a01
XL
1$ cargo run
2 Compiling chapter10 v0.1.0 (file:///projects/chapter10)
6a06907d 3error[E0369]: binary operation `>` cannot be applied to type `T`
74b04a01
XL
4 --> src/main.rs:5:17
5 |
65 | if item > largest {
6a06907d 7 | ---- ^ ------- T
74b04a01 8 | |
6a06907d 9 | T
74b04a01 10 |
fc512014
XL
11help: consider restricting type parameter `T`
12 |
6a06907d 131 | fn largest<T: std::cmp::PartialOrd>(list: &[T]) -> T {
fc512014 14 | ^^^^^^^^^^^^^^^^^^^^^^
74b04a01
XL
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0369`.
fc512014 19error: could not compile `chapter10`
74b04a01
XL
20
21To learn more, run the command again with --verbose.