]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt
New upstream version 1.57.0+dfsg1
[rustc.git] / src / doc / book / listings / ch10-generic-types-traits-and-lifetimes / listing-10-05 / output.txt
1 $ cargo run
2 Compiling chapter10 v0.1.0 (file:///projects/chapter10)
3 error[E0369]: binary operation `>` cannot be applied to type `T`
4 --> src/main.rs:5:17
5 |
6 5 | if item > largest {
7 | ---- ^ ------- T
8 | |
9 | T
10 |
11 help: consider restricting type parameter `T`
12 |
13 1 | fn largest<T: std::cmp::PartialOrd>(list: &[T]) -> T {
14 | ^^^^^^^^^^^^^^^^^^^^^^
15
16 For more information about this error, try `rustc --explain E0369`.
17 error: could not compile `chapter10` due to previous error