Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rust 1.53. #2797

Merged
merged 2 commits into from
Jul 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- name: Install Rust
run: |
rustup set profile minimal
rustup toolchain install 1.52 -c rust-docs
rustup default 1.52
rustup toolchain install 1.53 -c rust-docs
rustup default 1.53
- name: Install mdbook
run: |
mkdir bin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fn main() {
let a = [10, 20, 30, 40, 50];

for element in a.iter() {
for element in a {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎊

println!("the value is: {}", element);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ error[E0384]: cannot assign twice to immutable variable `x`
| -
| |
| first assignment to `x`
| help: make this binding mutable: `mut x`
| help: consider making this binding mutable: `mut x`
3 | println!("The value of x is: {}", x);
4 | x = 6;
| ^^^^^ cannot assign twice to immutable variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ running 2 tests
test expensive_test ... ignored
test it_works ... ok

test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 1 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.02s

Doc-tests adder

Expand Down
2 changes: 1 addition & 1 deletion listings/ch12-an-io-project/listing-12-16/output.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ cargo test
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished test [unoptimized + debuginfo] target(s) in 0.97s
Running target/debug/deps/minigrep-4672b652f7794785
Running unittests (target/debug/deps/minigrep-9cd200e5fac0fc94)

running 1 test
test tests::one_result ... FAILED
Expand Down
4 changes: 2 additions & 2 deletions listings/ch12-an-io-project/listing-12-19/output.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
$ cargo test
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished test [unoptimized + debuginfo] target(s) in 1.22s
Running target/debug/deps/minigrep-4672b652f7794785
Running unittests (target/debug/deps/minigrep-9cd200e5fac0fc94)

running 1 test
test tests::one_result ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Running target/debug/deps/minigrep-4672b652f7794785
Running unittests (target/debug/deps/minigrep-9cd200e5fac0fc94)

running 0 tests

Expand Down
4 changes: 2 additions & 2 deletions listings/ch12-an-io-project/listing-12-21/output.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
$ cargo test
Compiling minigrep v0.1.0 (file:///projects/minigrep)
Finished test [unoptimized + debuginfo] target(s) in 1.33s
Running target/debug/deps/minigrep-4672b652f7794785
Running unittests (target/debug/deps/minigrep-9cd200e5fac0fc94)

running 2 tests
test tests::case_insensitive ... ok
test tests::case_sensitive ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Running target/debug/deps/minigrep-4672b652f7794785
Running unittests (target/debug/deps/minigrep-9cd200e5fac0fc94)

running 0 tests

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ cargo test
Compiling cacher v0.1.0 (file:///projects/cacher)
Finished test [unoptimized + debuginfo] target(s) in 0.72s
Running target/debug/deps/cacher-4116485fb32b3fff
Running unittests (target/debug/deps/cacher-074d7c200c000afa)

running 1 test
test tests::call_with_different_values ... FAILED
Expand Down
2 changes: 1 addition & 1 deletion listings/ch15-smart-pointers/listing-15-23/output.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ cargo test
Compiling limit-tracker v0.1.0 (file:///projects/limit-tracker)
Finished test [unoptimized + debuginfo] target(s) in 0.91s
Running target/debug/deps/limit_tracker-d1b2637139dca6ca
Running unittests (target/debug/deps/limit_tracker-e599811fa246dbde)

running 1 test
test tests::it_sends_an_over_75_percent_warning_message ... FAILED
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.52
1.53
2 changes: 1 addition & 1 deletion src/title-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.52 or later with
This version of the text assumes you’re using Rust 1.53 or later with
`edition="2018"` in *Cargo.toml* of all projects to use Rust 2018 Edition
idioms. See the [“Installation” section of Chapter 1][install]<!-- ignore -->
to install or update Rust, and see the new [Appendix E][editions]<!-- ignore
Expand Down