Skip to content

Commit 6c890c7

Browse files
committed
Update to Rust 1.89
1 parent c143e8d commit 6c890c7

File tree

19 files changed

+32
-31
lines changed

19 files changed

+32
-31
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.88 -c rust-docs
16-
rustup default 1.88
15+
rustup toolchain install 1.89 -c rust-docs
16+
rustup default 1.89
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.88 -c rust-docs
51-
rustup default 1.88
50+
rustup toolchain install 1.89 -c rust-docs
51+
rustup default 1.89
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/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/cmp.rs:975:8
21+
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/cmp.rs:976: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/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
$ cargo run
22
Compiling ownership v0.1.0 (file:///projects/ownership)
33
error[E0382]: borrow of moved value: `s1`
4-
--> src/main.rs:5:15
4+
--> src/main.rs:5:16
55
|
66
2 | let s1 = String::from("hello");
77
| -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait
88
3 | let s2 = s1;
99
| -- value moved here
1010
4 |
1111
5 | println!("{s1}, world!");
12-
| ^^^^ value borrowed here after move
12+
| ^^ value borrowed here after move
1313
|
1414
= 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)
1515
help: consider cloning the value if the performance cost is acceptable

listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ error[E0499]: cannot borrow `s` as mutable more than once at a time
99
| ^^^^^^ second mutable borrow occurs here
1010
6 |
1111
7 | println!("{r1}, {r2}");
12-
| ---- first borrow later used here
12+
| -- first borrow later used here
1313

1414
For more information about this error, try `rustc --explain E0499`.
1515
error: could not compile `ownership` (bin "ownership") due to 1 previous error

listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
1010
| ^^^^^^ mutable borrow occurs here
1111
7 |
1212
8 | println!("{r1}, {r2}, and {r3}");
13-
| ---- immutable borrow later used here
13+
| -- immutable borrow later used here
1414

1515
For more information about this error, try `rustc --explain E0502`.
1616
error: could not compile `ownership` (bin "ownership") due to 1 previous error

listings/ch04-understanding-ownership/no-listing-19-slice-error/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta
1010
| ^^^^^^^^^ mutable borrow occurs here
1111
19 |
1212
20 | println!("the first word is: {word}");
13-
| ------ immutable borrow later used here
13+
| ---- immutable borrow later used here
1414

1515
For more information about this error, try `rustc --explain E0502`.
1616
error: could not compile `ownership` (bin "ownership") due to 1 previous error

listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
$ cargo run
22
Compiling rectangles v0.1.0 (file:///projects/rectangles)
33
error[E0277]: `Rectangle` doesn't implement `std::fmt::Display`
4-
--> src/main.rs:12:24
4+
--> src/main.rs:12:25
55
|
66
12 | println!("rect1 is {rect1}");
7-
| ^^^^^^^ `Rectangle` cannot be formatted with the default formatter
7+
| -^^^^^-
8+
| ||
9+
| |`Rectangle` cannot be formatted with the default formatter
10+
| required by this formatting parameter
811
|
912
= help: the trait `std::fmt::Display` is not implemented for `Rectangle`
1013
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ error[E0277]: `Rectangle` doesn't implement `Debug`
44
--> src/main.rs:12:31
55
|
66
12 | println!("rect1 is {:?}", rect1);
7-
| ^^^^^ `Rectangle` cannot be formatted using `{:?}`
7+
| ---- ^^^^^ `Rectangle` cannot be formatted using `{:?}` because it doesn't implement `Debug`
8+
| |
9+
| required by this formatting parameter
810
|
911
= help: the trait `Debug` is not implemented for `Rectangle`
1012
= note: add `#[derive(Debug)]` to `Rectangle` or manually `impl Debug for Rectangle`

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/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/option.rs:589:1
11-
::: /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/option.rs:593:5
10+
--> /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:591:1
11+
::: /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/core/src/option.rs:595:5
1212
|
1313
= note: not covered
1414
= note: the matched value is of type `Option<i32>`

listings/ch08-common-collections/listing-08-06/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta
1010
| ^^^^^^^^^ mutable borrow occurs here
1111
7 |
1212
8 | println!("The first element is: {first}");
13-
| ------- immutable borrow later used here
13+
| ----- immutable borrow later used here
1414

1515
For more information about this error, try `rustc --explain E0502`.
1616
error: could not compile `collections` (bin "collections") due to 1 previous error

0 commit comments

Comments
 (0)