diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ef0ade2bd..ec1ab4b08a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,8 @@ jobs: - name: Install Rust run: | rustup set profile minimal - rustup toolchain install 1.75 -c rust-docs - rustup default 1.75 + rustup toolchain install 1.76 -c rust-docs + rustup default 1.76 - name: Install mdbook run: | mkdir bin diff --git a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt index 90dc4ba829..9ae3a32d0c 100644 --- a/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt +++ b/listings/ch02-guessing-game-tutorial/listing-02-04/output.txt @@ -18,7 +18,7 @@ error[E0308]: mismatched types = note: expected reference `&String` found reference `&{integer}` note: method defined here - --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/cmp.rs:811:8 + --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/cmp.rs:814:8 For more information about this error, try `rustc --explain E0308`. -error: could not compile `guessing_game` (bin "guessing_game") due to previous error +error: could not compile `guessing_game` (bin "guessing_game") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/no-listing-01-variables-are-immutable/output.txt b/listings/ch03-common-programming-concepts/no-listing-01-variables-are-immutable/output.txt index 554b764fc5..73ca9d62fb 100644 --- a/listings/ch03-common-programming-concepts/no-listing-01-variables-are-immutable/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-01-variables-are-immutable/output.txt @@ -13,4 +13,4 @@ error[E0384]: cannot assign twice to immutable variable `x` | ^^^^^ cannot assign twice to immutable variable For more information about this error, try `rustc --explain E0384`. -error: could not compile `variables` (bin "variables") due to previous error +error: could not compile `variables` (bin "variables") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/no-listing-05-mut-cant-change-types/output.txt b/listings/ch03-common-programming-concepts/no-listing-05-mut-cant-change-types/output.txt index 95773d11d4..2ddd39ff6e 100644 --- a/listings/ch03-common-programming-concepts/no-listing-05-mut-cant-change-types/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-05-mut-cant-change-types/output.txt @@ -15,4 +15,4 @@ help: try removing the method call | For more information about this error, try `rustc --explain E0308`. -error: could not compile `variables` (bin "variables") due to previous error +error: could not compile `variables` (bin "variables") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/output.txt b/listings/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/output.txt index 33c3811911..504fdd6ec7 100644 --- a/listings/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-19-statements-vs-expressions/output.txt @@ -22,4 +22,4 @@ help: remove these parentheses | warning: `functions` (bin "functions") generated 1 warning -error: could not compile `functions` (bin "functions") due to previous error; 1 warning emitted +error: could not compile `functions` (bin "functions") due to 1 previous error; 1 warning emitted diff --git a/listings/ch03-common-programming-concepts/no-listing-23-statements-dont-return-values/output.txt b/listings/ch03-common-programming-concepts/no-listing-23-statements-dont-return-values/output.txt index 337c5daf3a..18fdfd1b41 100644 --- a/listings/ch03-common-programming-concepts/no-listing-23-statements-dont-return-values/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-23-statements-dont-return-values/output.txt @@ -11,4 +11,4 @@ error[E0308]: mismatched types | - help: remove this semicolon to return this value For more information about this error, try `rustc --explain E0308`. -error: could not compile `functions` (bin "functions") due to previous error +error: could not compile `functions` (bin "functions") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/no-listing-28-if-condition-must-be-bool/output.txt b/listings/ch03-common-programming-concepts/no-listing-28-if-condition-must-be-bool/output.txt index 9b7296f1f5..c9c0b0c469 100644 --- a/listings/ch03-common-programming-concepts/no-listing-28-if-condition-must-be-bool/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-28-if-condition-must-be-bool/output.txt @@ -7,4 +7,4 @@ error[E0308]: mismatched types | ^^^^^^ expected `bool`, found integer For more information about this error, try `rustc --explain E0308`. -error: could not compile `branches` (bin "branches") due to previous error +error: could not compile `branches` (bin "branches") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/no-listing-31-arms-must-return-same-type/output.txt b/listings/ch03-common-programming-concepts/no-listing-31-arms-must-return-same-type/output.txt index debd0b9ca2..7fb857f035 100644 --- a/listings/ch03-common-programming-concepts/no-listing-31-arms-must-return-same-type/output.txt +++ b/listings/ch03-common-programming-concepts/no-listing-31-arms-must-return-same-type/output.txt @@ -9,4 +9,4 @@ error[E0308]: `if` and `else` have incompatible types | expected because of this For more information about this error, try `rustc --explain E0308`. -error: could not compile `branches` (bin "branches") due to previous error +error: could not compile `branches` (bin "branches") due to 1 previous error diff --git a/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt b/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt index 1329f9d73f..ee6a979432 100644 --- a/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt +++ b/listings/ch03-common-programming-concepts/output-only-01-no-type-annotations/output.txt @@ -13,4 +13,4 @@ help: consider giving `guess` an explicit type | ++++++++++++ For more information about this error, try `rustc --explain E0284`. -error: could not compile `no_type_annotations` (bin "no_type_annotations") due to previous error +error: could not compile `no_type_annotations` (bin "no_type_annotations") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/listing-04-06/output.txt b/listings/ch04-understanding-ownership/listing-04-06/output.txt index 3f47171879..c78cd5d3de 100644 --- a/listings/ch04-understanding-ownership/listing-04-06/output.txt +++ b/listings/ch04-understanding-ownership/listing-04-06/output.txt @@ -12,4 +12,4 @@ help: consider changing this to be a mutable reference | +++ For more information about this error, try `rustc --explain E0596`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt b/listings/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt index 17aea46a6e..8f9e017980 100644 --- a/listings/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-04-cant-use-after-move/output.txt @@ -18,4 +18,4 @@ help: consider cloning the value if the performance cost is acceptable | ++++++++ For more information about this error, try `rustc --explain E0382`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt b/listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt index 1a4ea26b7a..97be4a2586 100644 --- a/listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-10-multiple-mut-not-allowed/output.txt @@ -12,4 +12,4 @@ error[E0499]: cannot borrow `s` as mutable more than once at a time | -- first borrow later used here For more information about this error, try `rustc --explain E0499`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt b/listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt index 3884c6e118..4548823230 100644 --- a/listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-12-immutable-and-mutable-not-allowed/output.txt @@ -13,4 +13,4 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta | -- immutable borrow later used here For more information about this error, try `rustc --explain E0502`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt b/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt index 72bfe4c510..70e58af8b5 100644 --- a/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-14-dangling-reference/output.txt @@ -7,10 +7,15 @@ error[E0106]: missing lifetime specifier | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from -help: consider using the `'static` lifetime +help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | 5 | fn dangle() -> &'static String { | +++++++ +help: instead, you are more likely to want to return an owned value + | +5 - fn dangle() -> &String { +5 + fn dangle() -> String { + | For more information about this error, try `rustc --explain E0106`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch04-understanding-ownership/no-listing-19-slice-error/output.txt b/listings/ch04-understanding-ownership/no-listing-19-slice-error/output.txt index 5adc2d0a77..be05d65283 100644 --- a/listings/ch04-understanding-ownership/no-listing-19-slice-error/output.txt +++ b/listings/ch04-understanding-ownership/no-listing-19-slice-error/output.txt @@ -13,4 +13,4 @@ error[E0502]: cannot borrow `s` as mutable because it is also borrowed as immuta | ---- immutable borrow later used here For more information about this error, try `rustc --explain E0502`. -error: could not compile `ownership` (bin "ownership") due to previous error +error: could not compile `ownership` (bin "ownership") due to 1 previous error diff --git a/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt b/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt index 0e008b130b..ee169726d0 100644 --- a/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt +++ b/listings/ch05-using-structs-to-structure-related-data/listing-05-11/output.txt @@ -11,4 +11,4 @@ error[E0277]: `Rectangle` doesn't implement `std::fmt::Display` = 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) For more information about this error, try `rustc --explain E0277`. -error: could not compile `rectangles` (bin "rectangles") due to previous error +error: could not compile `rectangles` (bin "rectangles") due to 1 previous error diff --git a/listings/ch05-using-structs-to-structure-related-data/no-listing-05-dbg-macro/output.txt b/listings/ch05-using-structs-to-structure-related-data/no-listing-05-dbg-macro/output.txt index 2685859954..bfb88ebee6 100644 --- a/listings/ch05-using-structs-to-structure-related-data/no-listing-05-dbg-macro/output.txt +++ b/listings/ch05-using-structs-to-structure-related-data/no-listing-05-dbg-macro/output.txt @@ -2,8 +2,8 @@ $ cargo run Compiling rectangles v0.1.0 (file:///projects/rectangles) Finished dev [unoptimized + debuginfo] target(s) in 0.61s Running `target/debug/rectangles` -[src/main.rs:10] 30 * scale = 60 -[src/main.rs:14] &rect1 = Rectangle { +[src/main.rs:10:16] 30 * scale = 60 +[src/main.rs:14:5] &rect1 = Rectangle { width: 60, height: 50, } diff --git a/listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/output.txt b/listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/output.txt index 57bf3c7bc9..71de1f7bd3 100644 --- a/listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/output.txt +++ b/listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/output.txt @@ -16,4 +16,4 @@ help: consider annotating `Rectangle` with `#[derive(Debug)]` | For more information about this error, try `rustc --explain E0277`. -error: could not compile `rectangles` (bin "rectangles") due to previous error +error: could not compile `rectangles` (bin "rectangles") due to 1 previous error diff --git a/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt b/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt index ba140f07ed..fa202e6212 100644 --- a/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt +++ b/listings/ch06-enums-and-pattern-matching/no-listing-07-cant-use-option-directly/output.txt @@ -14,4 +14,4 @@ error[E0277]: cannot add `Option` to `i8` <&i8 as Add<&i8>> For more information about this error, try `rustc --explain E0277`. -error: could not compile `enums` (bin "enums") due to previous error +error: could not compile `enums` (bin "enums") due to 1 previous error diff --git a/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt b/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt index e609de51e2..4ec05abf05 100644 --- a/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt +++ b/listings/ch06-enums-and-pattern-matching/no-listing-10-non-exhaustive-match/output.txt @@ -7,8 +7,8 @@ error[E0004]: non-exhaustive patterns: `None` not covered | ^ pattern `None` not covered | note: `Option` defined here - --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:569:1 - ::: /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/option.rs:573:5 + --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:570:1 + ::: /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/option.rs:574:5 | = note: not covered = note: the matched value is of type `Option` @@ -19,4 +19,4 @@ help: ensure that all possible cases are being handled by adding a match arm wit | For more information about this error, try `rustc --explain E0004`. -error: could not compile `enums` (bin "enums") due to previous error +error: could not compile `enums` (bin "enums") due to 1 previous error diff --git a/listings/ch07-managing-growing-projects/listing-07-12/output.txt b/listings/ch07-managing-growing-projects/listing-07-12/output.txt index 9e73ebf6ae..0eda253125 100644 --- a/listings/ch07-managing-growing-projects/listing-07-12/output.txt +++ b/listings/ch07-managing-growing-projects/listing-07-12/output.txt @@ -21,4 +21,4 @@ warning: unused import: `crate::front_of_house::hosting` For more information about this error, try `rustc --explain E0433`. warning: `restaurant` (lib) generated 1 warning -error: could not compile `restaurant` (lib) due to previous error; 1 warning emitted +error: could not compile `restaurant` (lib) due to 1 previous error; 1 warning emitted diff --git a/listings/ch08-common-collections/listing-08-06/output.txt b/listings/ch08-common-collections/listing-08-06/output.txt index a38194b63b..f98ab1cde7 100644 --- a/listings/ch08-common-collections/listing-08-06/output.txt +++ b/listings/ch08-common-collections/listing-08-06/output.txt @@ -13,4 +13,4 @@ error[E0502]: cannot borrow `v` as mutable because it is also borrowed as immuta | ------- immutable borrow later used here For more information about this error, try `rustc --explain E0502`. -error: could not compile `collections` (bin "collections") due to previous error +error: could not compile `collections` (bin "collections") due to 1 previous error diff --git a/listings/ch08-common-collections/listing-08-19/output.txt b/listings/ch08-common-collections/listing-08-19/output.txt index bc4c679052..de20b73edf 100644 --- a/listings/ch08-common-collections/listing-08-19/output.txt +++ b/listings/ch08-common-collections/listing-08-19/output.txt @@ -1,10 +1,10 @@ $ cargo run Compiling collections v0.1.0 (file:///projects/collections) error[E0277]: the type `String` cannot be indexed by `{integer}` - --> src/main.rs:3:13 + --> src/main.rs:3:16 | 3 | let h = s1[0]; - | ^^^^^ `String` cannot be indexed by `{integer}` + | ^ `String` cannot be indexed by `{integer}` | = help: the trait `Index<{integer}>` is not implemented for `String` = help: the following other types implement trait `Index`: @@ -16,4 +16,4 @@ error[E0277]: the type `String` cannot be indexed by `{integer}` >> For more information about this error, try `rustc --explain E0277`. -error: could not compile `collections` (bin "collections") due to previous error +error: could not compile `collections` (bin "collections") due to 1 previous error diff --git a/listings/ch09-error-handling/listing-09-10/output.txt b/listings/ch09-error-handling/listing-09-10/output.txt index e1570745cf..dbc9bb13dc 100644 --- a/listings/ch09-error-handling/listing-09-10/output.txt +++ b/listings/ch09-error-handling/listing-09-10/output.txt @@ -11,4 +11,4 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu = help: the trait `FromResidual>` is not implemented for `()` For more information about this error, try `rustc --explain E0277`. -error: could not compile `error-handling` (bin "error-handling") due to previous error +error: could not compile `error-handling` (bin "error-handling") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt index 0857a1434f..05b96ca173 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/output.txt @@ -14,4 +14,4 @@ help: consider restricting type parameter `T` | ++++++++++++++++++++++ For more information about this error, try `rustc --explain E0369`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-07/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-07/output.txt index ddebf76685..5f6c3f4657 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-07/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-07/output.txt @@ -7,4 +7,4 @@ error[E0308]: mismatched types | ^^^ expected integer, found floating-point number For more information about this error, try `rustc --explain E0308`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt index 8173b5527a..6afb5b0c2a 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-16/output.txt @@ -14,4 +14,4 @@ error[E0597]: `x` does not live long enough | - borrow later used here For more information about this error, try `rustc --explain E0597`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-20/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-20/output.txt index 36a6d83cf1..a6783b2ccd 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-20/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-20/output.txt @@ -13,4 +13,4 @@ help: consider introducing a named lifetime parameter | ++++ ++ ++ ++ For more information about this error, try `rustc --explain E0106`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt index c28b056b82..471347c68f 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-23/output.txt @@ -13,4 +13,4 @@ error[E0597]: `string2` does not live long enough | ------ borrow later used here For more information about this error, try `rustc --explain E0597`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch10-generic-types-traits-and-lifetimes/no-listing-09-unrelated-lifetime/output.txt b/listings/ch10-generic-types-traits-and-lifetimes/no-listing-09-unrelated-lifetime/output.txt index fbff3e27fe..9b9ef2338c 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/no-listing-09-unrelated-lifetime/output.txt +++ b/listings/ch10-generic-types-traits-and-lifetimes/no-listing-09-unrelated-lifetime/output.txt @@ -10,4 +10,4 @@ error[E0515]: cannot return value referencing local variable `result` | `result` is borrowed here For more information about this error, try `rustc --explain E0515`. -error: could not compile `chapter10` (bin "chapter10") due to previous error +error: could not compile `chapter10` (bin "chapter10") due to 1 previous error diff --git a/listings/ch12-an-io-project/listing-12-01/output.txt b/listings/ch12-an-io-project/listing-12-01/output.txt index 529115f8d4..7017af1ab9 100644 --- a/listings/ch12-an-io-project/listing-12-01/output.txt +++ b/listings/ch12-an-io-project/listing-12-01/output.txt @@ -2,6 +2,6 @@ $ cargo run Compiling minigrep v0.1.0 (file:///projects/minigrep) Finished dev [unoptimized + debuginfo] target(s) in 0.61s Running `target/debug/minigrep` -[src/main.rs:5] args = [ +[src/main.rs:5:5] args = [ "target/debug/minigrep", ] diff --git a/listings/ch12-an-io-project/output-only-01-with-args/output.txt b/listings/ch12-an-io-project/output-only-01-with-args/output.txt index b48bb0e108..ef5743967e 100644 --- a/listings/ch12-an-io-project/output-only-01-with-args/output.txt +++ b/listings/ch12-an-io-project/output-only-01-with-args/output.txt @@ -2,7 +2,7 @@ $ cargo run -- needle haystack Compiling minigrep v0.1.0 (file:///projects/minigrep) Finished dev [unoptimized + debuginfo] target(s) in 1.57s Running `target/debug/minigrep needle haystack` -[src/main.rs:5] args = [ +[src/main.rs:5:5] args = [ "target/debug/minigrep", "needle", "haystack", diff --git a/listings/ch12-an-io-project/output-only-02-missing-lifetimes/output.txt b/listings/ch12-an-io-project/output-only-02-missing-lifetimes/output.txt index 340c48efec..7e46576b4a 100644 --- a/listings/ch12-an-io-project/output-only-02-missing-lifetimes/output.txt +++ b/listings/ch12-an-io-project/output-only-02-missing-lifetimes/output.txt @@ -13,4 +13,4 @@ help: consider introducing a named lifetime parameter | ++++ ++ ++ ++ For more information about this error, try `rustc --explain E0106`. -error: could not compile `minigrep` (lib) due to previous error +error: could not compile `minigrep` (lib) due to 1 previous error diff --git a/listings/ch13-functional-features/listing-13-03/output.txt b/listings/ch13-functional-features/listing-13-03/output.txt index fdc88f6388..16716c3ac1 100644 --- a/listings/ch13-functional-features/listing-13-03/output.txt +++ b/listings/ch13-functional-features/listing-13-03/output.txt @@ -23,4 +23,4 @@ note: closure parameter defined here | ^ For more information about this error, try `rustc --explain E0308`. -error: could not compile `closure-example` (bin "closure-example") due to previous error +error: could not compile `closure-example` (bin "closure-example") due to 1 previous error diff --git a/listings/ch13-functional-features/listing-13-08/output.txt b/listings/ch13-functional-features/listing-13-08/output.txt index f411d65223..4e5b0bec30 100644 --- a/listings/ch13-functional-features/listing-13-08/output.txt +++ b/listings/ch13-functional-features/listing-13-08/output.txt @@ -12,4 +12,4 @@ error[E0507]: cannot move out of `value`, a captured variable in an `FnMut` clos | ^^^^^ move occurs because `value` has type `String`, which does not implement the `Copy` trait For more information about this error, try `rustc --explain E0507`. -error: could not compile `rectangles` (bin "rectangles") due to previous error +error: could not compile `rectangles` (bin "rectangles") due to 1 previous error diff --git a/listings/ch15-smart-pointers/listing-15-03/output.txt b/listings/ch15-smart-pointers/listing-15-03/output.txt index 58eada3f24..9e54b51938 100644 --- a/listings/ch15-smart-pointers/listing-15-03/output.txt +++ b/listings/ch15-smart-pointers/listing-15-03/output.txt @@ -14,4 +14,4 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle | ++++ + For more information about this error, try `rustc --explain E0072`. -error: could not compile `cons-list` (bin "cons-list") due to previous error +error: could not compile `cons-list` (bin "cons-list") due to 1 previous error diff --git a/listings/ch15-smart-pointers/listing-15-09/output.txt b/listings/ch15-smart-pointers/listing-15-09/output.txt index 5999bbd5fb..a295d26284 100644 --- a/listings/ch15-smart-pointers/listing-15-09/output.txt +++ b/listings/ch15-smart-pointers/listing-15-09/output.txt @@ -7,4 +7,4 @@ error[E0614]: type `MyBox<{integer}>` cannot be dereferenced | ^^ For more information about this error, try `rustc --explain E0614`. -error: could not compile `deref-example` (bin "deref-example") due to previous error +error: could not compile `deref-example` (bin "deref-example") due to 1 previous error diff --git a/listings/ch15-smart-pointers/listing-15-15/output.txt b/listings/ch15-smart-pointers/listing-15-15/output.txt index c7c9342cb1..8a53b28520 100644 --- a/listings/ch15-smart-pointers/listing-15-15/output.txt +++ b/listings/ch15-smart-pointers/listing-15-15/output.txt @@ -12,4 +12,4 @@ help: consider using `drop` function | +++++ ~ For more information about this error, try `rustc --explain E0040`. -error: could not compile `drop-example` (bin "drop-example") due to previous error +error: could not compile `drop-example` (bin "drop-example") due to 1 previous error diff --git a/listings/ch15-smart-pointers/listing-15-17/output.txt b/listings/ch15-smart-pointers/listing-15-17/output.txt index 9596272eb1..757a65fb54 100644 --- a/listings/ch15-smart-pointers/listing-15-17/output.txt +++ b/listings/ch15-smart-pointers/listing-15-17/output.txt @@ -11,4 +11,4 @@ error[E0382]: use of moved value: `a` | ^ value used here after move For more information about this error, try `rustc --explain E0382`. -error: could not compile `cons-list` (bin "cons-list") due to previous error +error: could not compile `cons-list` (bin "cons-list") due to 1 previous error diff --git a/listings/ch15-smart-pointers/listing-15-21/output.txt b/listings/ch15-smart-pointers/listing-15-21/output.txt index f94f72f48c..3f00da3607 100644 --- a/listings/ch15-smart-pointers/listing-15-21/output.txt +++ b/listings/ch15-smart-pointers/listing-15-21/output.txt @@ -12,4 +12,4 @@ help: consider changing this to be a mutable reference | ~~~~~~~~~ For more information about this error, try `rustc --explain E0596`. -error: could not compile `limit-tracker` (lib test) due to previous error +error: could not compile `limit-tracker` (lib test) due to 1 previous error diff --git a/listings/ch15-smart-pointers/no-listing-01-cant-borrow-immutable-as-mutable/output.txt b/listings/ch15-smart-pointers/no-listing-01-cant-borrow-immutable-as-mutable/output.txt index a2e77d4d0c..95b9b68a82 100644 --- a/listings/ch15-smart-pointers/no-listing-01-cant-borrow-immutable-as-mutable/output.txt +++ b/listings/ch15-smart-pointers/no-listing-01-cant-borrow-immutable-as-mutable/output.txt @@ -12,4 +12,4 @@ help: consider changing this to be mutable | +++ For more information about this error, try `rustc --explain E0596`. -error: could not compile `borrowing` (bin "borrowing") due to previous error +error: could not compile `borrowing` (bin "borrowing") due to 1 previous error diff --git a/listings/ch15-smart-pointers/output-only-01-comparing-to-reference/output.txt b/listings/ch15-smart-pointers/output-only-01-comparing-to-reference/output.txt index c4c5ee6ef6..c7ed502b27 100644 --- a/listings/ch15-smart-pointers/output-only-01-comparing-to-reference/output.txt +++ b/listings/ch15-smart-pointers/output-only-01-comparing-to-reference/output.txt @@ -20,4 +20,4 @@ error[E0277]: can't compare `{integer}` with `&{integer}` = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0277`. -error: could not compile `deref-example` (bin "deref-example") due to previous error +error: could not compile `deref-example` (bin "deref-example") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/listing-16-03/output.txt b/listings/ch16-fearless-concurrency/listing-16-03/output.txt index c8624e2670..f90a9bcf4a 100644 --- a/listings/ch16-fearless-concurrency/listing-16-03/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-03/output.txt @@ -22,4 +22,4 @@ help: to force the closure to take ownership of `v` (and any other referenced va | ++++ For more information about this error, try `rustc --explain E0373`. -error: could not compile `threads` (bin "threads") due to previous error +error: could not compile `threads` (bin "threads") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/listing-16-09/output.txt b/listings/ch16-fearless-concurrency/listing-16-09/output.txt index a31a003e2e..b32885752b 100644 --- a/listings/ch16-fearless-concurrency/listing-16-09/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-09/output.txt @@ -17,4 +17,4 @@ help: consider cloning the value if the performance cost is acceptable | ++++++++ For more information about this error, try `rustc --explain E0382`. -error: could not compile `message-passing` (bin "message-passing") due to previous error +error: could not compile `message-passing` (bin "message-passing") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/listing-16-13/output.txt b/listings/ch16-fearless-concurrency/listing-16-13/output.txt index ac881aabe7..5405f76bcf 100644 --- a/listings/ch16-fearless-concurrency/listing-16-13/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-13/output.txt @@ -13,4 +13,4 @@ error[E0382]: borrow of moved value: `counter` | ^^^^^^^ value borrowed here after move For more information about this error, try `rustc --explain E0382`. -error: could not compile `shared-state` (bin "shared-state") due to previous error +error: could not compile `shared-state` (bin "shared-state") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/listing-16-14/output.txt b/listings/ch16-fearless-concurrency/listing-16-14/output.txt index a469f6e6b0..504826c1b8 100644 --- a/listings/ch16-fearless-concurrency/listing-16-14/output.txt +++ b/listings/ch16-fearless-concurrency/listing-16-14/output.txt @@ -22,7 +22,7 @@ note: required because it's used within this closure 11 | let handle = thread::spawn(move || { | ^^^^^^^ note: required by a bound in `spawn` - --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:682:1 + --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/mod.rs:678:1 For more information about this error, try `rustc --explain E0277`. -error: could not compile `shared-state` (bin "shared-state") due to previous error +error: could not compile `shared-state` (bin "shared-state") due to 1 previous error diff --git a/listings/ch16-fearless-concurrency/output-only-01-move-drop/output.txt b/listings/ch16-fearless-concurrency/output-only-01-move-drop/output.txt index 922e84d543..269f1a95e8 100644 --- a/listings/ch16-fearless-concurrency/output-only-01-move-drop/output.txt +++ b/listings/ch16-fearless-concurrency/output-only-01-move-drop/output.txt @@ -15,4 +15,4 @@ error[E0382]: use of moved value: `v` | ^ value used here after move For more information about this error, try `rustc --explain E0382`. -error: could not compile `threads` (bin "threads") due to previous error +error: could not compile `threads` (bin "threads") due to 1 previous error diff --git a/listings/ch17-oop/listing-17-10/output.txt b/listings/ch17-oop/listing-17-10/output.txt index 25ad7efcb0..78d7c39a32 100644 --- a/listings/ch17-oop/listing-17-10/output.txt +++ b/listings/ch17-oop/listing-17-10/output.txt @@ -10,4 +10,4 @@ error[E0277]: the trait bound `String: Draw` is not satisfied = note: required for the cast from `Box` to `Box` For more information about this error, try `rustc --explain E0277`. -error: could not compile `gui` (bin "gui") due to previous error +error: could not compile `gui` (bin "gui") due to 1 previous error diff --git a/listings/ch18-patterns-and-matching/listing-18-05/output.txt b/listings/ch18-patterns-and-matching/listing-18-05/output.txt index 6c59302e73..8002272a72 100644 --- a/listings/ch18-patterns-and-matching/listing-18-05/output.txt +++ b/listings/ch18-patterns-and-matching/listing-18-05/output.txt @@ -12,4 +12,4 @@ error[E0308]: mismatched types found tuple `(_, _)` For more information about this error, try `rustc --explain E0308`. -error: could not compile `patterns` (bin "patterns") due to previous error +error: could not compile `patterns` (bin "patterns") due to 1 previous error diff --git a/listings/ch18-patterns-and-matching/listing-18-08/output.txt b/listings/ch18-patterns-and-matching/listing-18-08/output.txt index 7c335384e4..6ce3dfc582 100644 --- a/listings/ch18-patterns-and-matching/listing-18-08/output.txt +++ b/listings/ch18-patterns-and-matching/listing-18-08/output.txt @@ -15,4 +15,4 @@ help: you might want to use `let else` to handle the variant that isn't matched | ++++++++++++++++ For more information about this error, try `rustc --explain E0005`. -error: could not compile `patterns` (bin "patterns") due to previous error +error: could not compile `patterns` (bin "patterns") due to 1 previous error diff --git a/listings/ch18-patterns-and-matching/listing-18-25/output.txt b/listings/ch18-patterns-and-matching/listing-18-25/output.txt index 09255c738b..bd5e0f9d7b 100644 --- a/listings/ch18-patterns-and-matching/listing-18-25/output.txt +++ b/listings/ch18-patterns-and-matching/listing-18-25/output.txt @@ -8,4 +8,4 @@ error: `..` can only be used once per tuple pattern | | | previously used here -error: could not compile `patterns` (bin "patterns") due to previous error +error: could not compile `patterns` (bin "patterns") due to 1 previous error diff --git a/listings/ch19-advanced-features/listing-19-05/output.txt b/listings/ch19-advanced-features/listing-19-05/output.txt index 9362fd3537..44bcc09135 100644 --- a/listings/ch19-advanced-features/listing-19-05/output.txt +++ b/listings/ch19-advanced-features/listing-19-05/output.txt @@ -14,4 +14,4 @@ error[E0499]: cannot borrow `*values` as mutable more than once at a time | returning this value requires that `*values` is borrowed for `'1` For more information about this error, try `rustc --explain E0499`. -error: could not compile `unsafe-example` (bin "unsafe-example") due to previous error +error: could not compile `unsafe-example` (bin "unsafe-example") due to 1 previous error diff --git a/listings/ch19-advanced-features/listing-19-20/output.txt b/listings/ch19-advanced-features/listing-19-20/output.txt index 19d978b8e7..3cb5961a1a 100644 --- a/listings/ch19-advanced-features/listing-19-20/output.txt +++ b/listings/ch19-advanced-features/listing-19-20/output.txt @@ -15,4 +15,4 @@ help: use the fully-qualified path to the only available implementation | +++++++ + For more information about this error, try `rustc --explain E0790`. -error: could not compile `traits-example` (bin "traits-example") due to previous error +error: could not compile `traits-example` (bin "traits-example") due to 1 previous error diff --git a/listings/ch19-advanced-features/no-listing-02-impl-outlineprint-for-point/output.txt b/listings/ch19-advanced-features/no-listing-02-impl-outlineprint-for-point/output.txt index f3c90e41aa..d5f2155f83 100644 --- a/listings/ch19-advanced-features/no-listing-02-impl-outlineprint-for-point/output.txt +++ b/listings/ch19-advanced-features/no-listing-02-impl-outlineprint-for-point/output.txt @@ -15,4 +15,4 @@ note: required by a bound in `OutlinePrint` | ^^^^^^^^^^^^ required by this bound in `OutlinePrint` For more information about this error, try `rustc --explain E0277`. -error: could not compile `traits-example` (bin "traits-example") due to previous error +error: could not compile `traits-example` (bin "traits-example") due to 1 previous error diff --git a/listings/ch19-advanced-features/no-listing-18-returns-closure/output.txt b/listings/ch19-advanced-features/no-listing-18-returns-closure/output.txt index 61349a7d0a..bc736bd689 100644 --- a/listings/ch19-advanced-features/no-listing-18-returns-closure/output.txt +++ b/listings/ch19-advanced-features/no-listing-18-returns-closure/output.txt @@ -17,4 +17,4 @@ help: box the return type, and wrap all of the returned values in `Box::new` | For more information about this error, try `rustc --explain E0746`. -error: could not compile `functions-example` (lib) due to previous error +error: could not compile `functions-example` (lib) due to 1 previous error diff --git a/listings/ch19-advanced-features/output-only-01-missing-unsafe/output.txt b/listings/ch19-advanced-features/output-only-01-missing-unsafe/output.txt index 0d61d2a9b2..b2ed043a10 100644 --- a/listings/ch19-advanced-features/output-only-01-missing-unsafe/output.txt +++ b/listings/ch19-advanced-features/output-only-01-missing-unsafe/output.txt @@ -9,4 +9,4 @@ error[E0133]: call to unsafe function is unsafe and requires unsafe function or = note: consult the function's documentation for information on how to avoid undefined behavior For more information about this error, try `rustc --explain E0133`. -error: could not compile `unsafe-example` (bin "unsafe-example") due to previous error +error: could not compile `unsafe-example` (bin "unsafe-example") due to 1 previous error diff --git a/listings/ch20-web-server/listing-20-12/output.txt b/listings/ch20-web-server/listing-20-12/output.txt index a768404719..0faae99204 100644 --- a/listings/ch20-web-server/listing-20-12/output.txt +++ b/listings/ch20-web-server/listing-20-12/output.txt @@ -7,4 +7,4 @@ error[E0433]: failed to resolve: use of undeclared type `ThreadPool` | ^^^^^^^^^^ use of undeclared type `ThreadPool` For more information about this error, try `rustc --explain E0433`. -error: could not compile `hello` (bin "hello") due to previous error +error: could not compile `hello` (bin "hello") due to 1 previous error diff --git a/listings/ch20-web-server/listing-20-17/output.txt b/listings/ch20-web-server/listing-20-17/output.txt index 6272ad2898..cd06ca1b60 100644 --- a/listings/ch20-web-server/listing-20-17/output.txt +++ b/listings/ch20-web-server/listing-20-17/output.txt @@ -18,4 +18,4 @@ note: consider changing this parameter type in method `new` to borrow instead if | --- in this method ^^^^^^^^^^^^^^^^^^^ this parameter takes ownership of the value For more information about this error, try `rustc --explain E0382`. -error: could not compile `hello` (lib) due to previous error +error: could not compile `hello` (lib) due to 1 previous error diff --git a/listings/ch20-web-server/listing-20-22/output.txt b/listings/ch20-web-server/listing-20-22/output.txt index da1134cd25..35588617dd 100644 --- a/listings/ch20-web-server/listing-20-22/output.txt +++ b/listings/ch20-web-server/listing-20-22/output.txt @@ -9,7 +9,7 @@ error[E0507]: cannot move out of `worker.thread` which is behind a mutable refer | move occurs because `worker.thread` has type `JoinHandle<()>`, which does not implement the `Copy` trait | note: `JoinHandle::::join` takes ownership of the receiver `self`, which moves `worker.thread` - --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:1652:17 + --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/mod.rs:1649:17 For more information about this error, try `rustc --explain E0507`. -error: could not compile `hello` (lib) due to previous error +error: could not compile `hello` (lib) due to 1 previous error diff --git a/listings/ch20-web-server/no-listing-01-define-threadpool-struct/output.txt b/listings/ch20-web-server/no-listing-01-define-threadpool-struct/output.txt index 70e35665da..85ebfb8138 100644 --- a/listings/ch20-web-server/no-listing-01-define-threadpool-struct/output.txt +++ b/listings/ch20-web-server/no-listing-01-define-threadpool-struct/output.txt @@ -7,4 +7,4 @@ error[E0599]: no function or associated item named `new` found for struct `Threa | ^^^ function or associated item not found in `ThreadPool` For more information about this error, try `rustc --explain E0599`. -error: could not compile `hello` (bin "hello") due to previous error +error: could not compile `hello` (bin "hello") due to 1 previous error diff --git a/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt b/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt index 054b810cfc..667041862d 100644 --- a/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt +++ b/listings/ch20-web-server/no-listing-02-impl-threadpool-new/output.txt @@ -7,4 +7,4 @@ error[E0599]: no method named `execute` found for struct `ThreadPool` in the cur | -----^^^^^^^ method not found in `ThreadPool` For more information about this error, try `rustc --explain E0599`. -error: could not compile `hello` (bin "hello") due to previous error +error: could not compile `hello` (bin "hello") due to 1 previous error diff --git a/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt b/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt index 49f7193772..4a622de7f9 100644 --- a/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt +++ b/listings/ch20-web-server/no-listing-04-update-worker-definition/output.txt @@ -7,7 +7,7 @@ error[E0599]: no method named `join` found for enum `Option` in the current scop | ^^^^ method not found in `Option>` | note: the method `join` exists on the type `JoinHandle<()>` - --> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/thread/mod.rs:1652:5 + --> /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/thread/mod.rs:1649:5 help: consider using `Option::expect` to unwrap the `JoinHandle<()>` value, panicking if the value is an `Option::None` | 52 | worker.thread.expect("REASON").join().unwrap(); diff --git a/rust-toolchain b/rust-toolchain index 07cde98405..9242d8e7ab 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.75 +1.76 diff --git a/src/title-page.md b/src/title-page.md index 6127fa3fb4..4c9550040d 100644 --- a/src/title-page.md +++ b/src/title-page.md @@ -2,7 +2,7 @@ *by Steve Klabnik and Carol Nichols, with contributions from the Rust Community* -This version of the text assumes you’re using Rust 1.75.0 (released 2023-12-28) +This version of the text assumes you’re using Rust 1.76.0 (released 2024-02-08) or later. See the [“Installation” section of Chapter 1][install] to install or update Rust.