Skip to content

Commit f660f34

Browse files
committed
Update to Rust 1.90
1 parent 6c890c7 commit f660f34

File tree

20 files changed

+66
-45
lines changed

20 files changed

+66
-45
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
- name: Install Rust
1313
run: |
1414
rustup set profile minimal
15-
rustup toolchain install 1.89 -c rust-docs
16-
rustup default 1.89
15+
rustup toolchain install 1.90 -c rust-docs
16+
rustup default 1.90
1717
- name: Install mdbook
1818
run: |
1919
mkdir bin
@@ -47,8 +47,8 @@ jobs:
4747
- name: Install Rust
4848
run: |
4949
rustup set profile minimal
50-
rustup toolchain install 1.89 -c rust-docs
51-
rustup default 1.89
50+
rustup toolchain install 1.90 -c rust-docs
51+
rustup default 1.90
5252
- name: Run `tools` package tests
5353
run: |
5454
cargo test

listings/ch02-guessing-game-tutorial/listing-02-04/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
1818
= note: expected reference `&String`
1919
found reference `&{integer}`
2020
note: method defined here
21-
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/cmp.rs:976:8
21+
--> /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/cmp.rs:979:8
2222

2323
For more information about this error, try `rustc --explain E0308`.
2424
error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error

listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ error[E0277]: `Rectangle` doesn't implement `Debug`
1313
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
1414
help: consider annotating `Rectangle` with `#[derive(Debug)]`
1515
|
16-
1 + #[derive(Debug)]
17-
2 | struct Rectangle {
16+
1 + #[derive(Debug)]
17+
2 | struct Rectangle {
1818
|
1919

2020
For more information about this error, try `rustc --explain E0277`.

listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ error[E0004]: non-exhaustive patterns: `None` not covered
77
| ^ pattern `None` not covered
88
|
99
note: `Option<i32>` defined here
10-
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:591:1
11-
::: /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:595:5
10+
--> /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/option.rs:593:1
11+
::: /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/option.rs:597:5
1212
|
1313
= note: not covered
1414
= note: the matched value is of type `Option<i32>`

listings/ch07-managing-growing-projects/listing-07-03/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ error[E0603]: module `hosting` is private
2525
note: the module `hosting` is defined here
2626
--> src/lib.rs:2:5
2727
|
28-
2 | mod hosting {
28+
2 | mod hosting {
2929
| ^^^^^^^^^^^
3030

3131
For more information about this error, try `rustc --explain E0603`.

listings/ch07-managing-growing-projects/listing-07-05/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ error[E0603]: function `add_to_waitlist` is private
99
note: the function `add_to_waitlist` is defined here
1010
--> src/lib.rs:3:9
1111
|
12-
3 | fn add_to_waitlist() {}
12+
3 | fn add_to_waitlist() {}
1313
| ^^^^^^^^^^^^^^^^^^^^
1414

1515
error[E0603]: function `add_to_waitlist` is private
@@ -21,7 +21,7 @@ error[E0603]: function `add_to_waitlist` is private
2121
note: the function `add_to_waitlist` is defined here
2222
--> src/lib.rs:3:9
2323
|
24-
3 | fn add_to_waitlist() {}
24+
3 | fn add_to_waitlist() {}
2525
| ^^^^^^^^^^^^^^^^^^^^
2626

2727
For more information about this error, try `rustc --explain E0603`.

listings/ch13-functional-features/listing-13-03/output.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ error[E0308]: mismatched types
44
--> src/main.rs:5:29
55
|
66
5 | let n = example_closure(5);
7-
| --------------- ^- help: try using a conversion method: `.to_string()`
8-
| | |
9-
| | expected `String`, found integer
7+
| --------------- ^ expected `String`, found integer
8+
| |
109
| arguments to this function are incorrect
1110
|
1211
note: expected because the closure was earlier called with an argument of type `String`
@@ -21,6 +20,10 @@ note: closure parameter defined here
2120
|
2221
2 | let example_closure = |x| x;
2322
| ^
23+
help: try using a conversion method
24+
|
25+
5 | let n = example_closure(5.to_string());
26+
| ++++++++++++
2427

2528
For more information about this error, try `rustc --explain E0308`.
2629
error: could not compile `closure-example` (bin "closure-example") due to 1 previous error

listings/ch13-functional-features/listing-13-08/output.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ error[E0507]: cannot move out of `value`, a captured variable in an `FnMut` clos
44
--> src/main.rs:18:30
55
|
66
15 | let value = String::from("closure called");
7-
| ----- captured outer variable
7+
| ----- ------------------------------ move occurs because `value` has type `String`, which does not implement the `Copy` trait
8+
| |
9+
| captured outer variable
810
16 |
911
17 | list.sort_by_key(|r| {
1012
| --- captured by this `FnMut` closure
1113
18 | sort_operations.push(value);
12-
| ^^^^^ move occurs because `value` has type `String`, which does not implement the `Copy` trait
14+
| ^^^^^ `value` is moved here
1315
|
1416
help: consider cloning the value if the performance cost is acceptable
1517
|

listings/ch15-smart-pointers/listing-15-17/output.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@ $ cargo run
33
error[E0382]: use of moved value: `a`
44
--> src/main.rs:11:30
55
|
6-
9 | let a = Cons(5, Box::new(Cons(10, Box::new(Nil))));
6+
9 | let a = Cons(5, Box::new(Cons(10, Box::new(Nil))));
77
| - move occurs because `a` has type `List`, which does not implement the `Copy` trait
88
10 | let b = Cons(3, Box::new(a));
99
| - value moved here
1010
11 | let c = Cons(4, Box::new(a));
1111
| ^ value used here after move
12+
|
13+
note: if `List` implemented `Clone`, you could clone the value
14+
--> src/main.rs:1:1
15+
|
16+
1 | enum List {
17+
| ^^^^^^^^^ consider implementing `Clone` for this type
18+
...
19+
10 | let b = Cons(3, Box::new(a));
20+
| - you could clone this value
1221

1322
For more information about this error, try `rustc --explain E0382`.
1423
error: could not compile `cons-list` (bin "cons-list") due to 1 previous error

listings/ch15-smart-pointers/listing-15-21/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ error[E0596]: cannot borrow `self.sent_messages` as mutable, as it is behind a `
88
|
99
help: consider changing this to be a mutable reference in the `impl` method and the `trait` definition
1010
|
11-
2 ~ fn send(&mut self, msg: &str);
12-
3 | }
11+
2 ~ fn send(&mut self, msg: &str);
12+
3 | }
1313
...
1414
56 | impl Messenger for MockMessenger {
1515
57 ~ fn send(&mut self, message: &str) {

0 commit comments

Comments
 (0)