Skip to content

Commit dc5a59f

Browse files
committed
update original
1 parent bcd8591 commit dc5a59f

14 files changed

Lines changed: 23 additions & 29 deletions

File tree

rustbook-en/.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.85 -c rust-docs
16-
rustup default 1.85
15+
rustup toolchain install 1.87 -c rust-docs
16+
rustup default 1.87
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.85 -c rust-docs
51-
rustup default 1.85
50+
rustup toolchain install 1.87 -c rust-docs
51+
rustup default 1.87
5252
- name: Run `tools` package tests
5353
run: |
5454
cargo test

rustbook-en/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/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/cmp.rs:964:8
21+
--> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/cmp.rs:975: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

rustbook-en/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,5 @@ help: instead, you are more likely to want to return an owned value
1717
5 + fn dangle() -> String {
1818
|
1919

20-
error[E0515]: cannot return reference to local variable `s`
21-
--> src/main.rs:8:5
22-
|
23-
8 | &s
24-
| ^^ returns a reference to data owned by the current function
25-
26-
Some errors have detailed explanations: E0106, E0515.
27-
For more information about an error, try `rustc --explain E0106`.
28-
error: could not compile `ownership` (bin "ownership") due to 2 previous errors
20+
For more information about this error, try `rustc --explain E0106`.
21+
error: could not compile `ownership` (bin "ownership") due to 1 previous error

rustbook-en/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/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/option.rs:572:1
11-
::: /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/core/src/option.rs:576:5
10+
--> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/option.rs:572:1
11+
::: /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/core/src/option.rs:576:5
1212
|
1313
= note: not covered
1414
= note: the matched value is of type `Option<i32>`

rustbook-en/listings/ch07-managing-growing-projects/listing-07-12/output.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
$ cargo build
22
Compiling restaurant v0.1.0 (file:///projects/restaurant)
3-
error[E0433]: failed to resolve: use of undeclared crate or module `hosting`
3+
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `hosting`
44
--> src/lib.rs:11:9
55
|
66
11 | hosting::add_to_waitlist();
7-
| ^^^^^^^ use of undeclared crate or module `hosting`
7+
| ^^^^^^^ use of unresolved module or unlinked crate `hosting`
88
|
9+
= help: if you wanted to use a crate named `hosting`, use `cargo add hosting` to add it to your `Cargo.toml`
910
help: consider importing this module through its public re-export
1011
|
1112
10 + use crate::hosting;

rustbook-en/listings/ch09-error-handling/listing-09-10/output.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
88
4 | let greeting_file = File::open("hello.txt")?;
99
| ^ cannot use the `?` operator in a function that returns `()`
1010
|
11-
= help: the trait `FromResidual<Result<Infallible, std::io::Error>>` is not implemented for `()`
1211
help: consider adding return type
1312
|
1413
3 ~ fn main() -> Result<(), Box<dyn std::error::Error>> {

rustbook-en/listings/ch15-smart-pointers/listing-15-09/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0614]: type `MyBox<{integer}>` cannot be dereferenced
44
--> src/main.rs:14:19
55
|
66
14 | assert_eq!(5, *y);
7-
| ^^
7+
| ^^ can't be dereferenced
88

99
For more information about this error, try `rustc --explain E0614`.
1010
error: could not compile `deref-example` (bin "deref-example") due to 1 previous error

rustbook-en/listings/ch15-smart-pointers/listing-15-15/output.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ error[E0040]: explicit use of destructor method
88
|
99
help: consider using `drop` function
1010
|
11-
16 | drop(c);
12-
| +++++ ~
11+
16 - c.drop();
12+
16 + drop(c);
13+
|
1314

1415
For more information about this error, try `rustc --explain E0040`.
1516
error: could not compile `drop-example` (bin "drop-example") due to 1 previous error

rustbook-en/listings/ch16-fearless-concurrency/listing-16-14/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ note: required because it's used within this closure
2222
11 | let handle = thread::spawn(move || {
2323
| ^^^^^^^
2424
note: required by a bound in `spawn`
25-
--> /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/std/src/thread/mod.rs:728:1
25+
--> /rustc/17067e9ac6d7ecb70e50f92c1944e545188d2359/library/std/src/thread/mod.rs:723:1
2626

2727
For more information about this error, try `rustc --explain E0277`.
2828
error: could not compile `shared-state` (bin "shared-state") due to 1 previous error

rustbook-en/listings/ch17-async-await/listing-17-23/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fn main() {
4242
tx.send(val).unwrap();
4343
trpl::sleep(Duration::from_secs(1)).await;
4444
}
45-
// ANCHOR: here
45+
// ANCHOR: here
4646
};
4747

4848
let futures: Vec<Box<dyn Future<Output = ()>>> =

0 commit comments

Comments
 (0)