Skip to content

Commit

Permalink
Update error output for changes to chapter 10 listings
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Feb 18, 2021
1 parent e9ec18a commit fa10e20
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
$ cargo run
Compiling chapter10 v0.1.0 (file:///projects/chapter10)
error[E0369]: binary operation `>` cannot be applied to type `&T`
error[E0369]: binary operation `>` cannot be applied to type `T`
--> src/main.rs:5:17
|
5 | if item > largest {
| ---- ^ ------- &T
| ---- ^ ------- T
| |
| &T
| T
|
help: consider restricting type parameter `T`
|
1 | fn largest<T: std::cmp::PartialOrd>(list: &[T]) -> &T {
1 | fn largest<T: std::cmp::PartialOrd>(list: &[T]) -> T {
| ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
Expand Down

0 comments on commit fa10e20

Please sign in to comment.