Skip to content

Commit dac5234

Browse files
committed
Rust 1.85/2024 Edition: manual regeneration changes
1 parent 080147a commit dac5234

File tree

15 files changed

+91
-85
lines changed

15 files changed

+91
-85
lines changed

Cargo.lock

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["packages/tools"]
2+
members = [ "listings/ch02-guessing-game-tutorial/no-listing-01-cargo-new", "listings/ch11-writing-automated-tests/listing-11-01","packages/tools"]
33
default-members = ["packages/tools"]
44
resolver = "2"
55
exclude = [

ci/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ durations
151151
ebook
152152
ebooks
153153
Edsger
154+
efdcd
154155
egular
155156
ElementRef
156157
else's

listings/ch02-guessing-game-tutorial/listing-02-02/Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

listings/ch02-guessing-game-tutorial/listing-02-02/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ edition = "2024"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
rand = "0.8.5"
9+
rand = "0.8.4"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
$ cargo run
22
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
3-
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s
4-
Running `target/debug/guessing_game`
3+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
4+
Running `file:///projects/guessing_game/target/debug/guessing_game`
55
Hello, world!

listings/ch11-writing-automated-tests/listing-11-01/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ cargo test
22
Compiling adder v0.1.0 (file:///projects/adder)
33
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.57s
4-
Running unittests src/lib.rs (target/debug/deps/adder-f533075b22f9175f)
4+
Running unittests src/lib.rs (file:///projects/adder/target/debug/deps/adder-40313d497ef8f64e)
55

66
running 1 test
77
test tests::it_works ... ok

src/ch02-00-guessing-game-tutorial.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -380,29 +380,25 @@ cargo build -->
380380

381381
```console
382382
$ cargo build
383-
Updating crates.io index
384-
Locking 16 packages to latest compatible versions
385-
Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.3+wasi-0.2.2)
386-
Adding zerocopy v0.7.35 (latest: v0.8.9)
387-
Adding zerocopy-derive v0.7.35 (latest: v0.8.9)
388-
Downloaded syn v2.0.87
389-
Downloaded 1 crate (278.1 KB) in 0.16s
390-
Compiling proc-macro2 v1.0.89
391-
Compiling unicode-ident v1.0.13
392-
Compiling libc v0.2.161
393-
Compiling cfg-if v1.0.0
394-
Compiling byteorder v1.5.0
395-
Compiling getrandom v0.2.15
396-
Compiling rand_core v0.6.4
397-
Compiling quote v1.0.37
398-
Compiling syn v2.0.87
399-
Compiling zerocopy-derive v0.7.35
400-
Compiling zerocopy v0.7.35
401-
Compiling ppv-lite86 v0.2.20
402-
Compiling rand_chacha v0.3.1
403-
Compiling rand v0.8.5
404-
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
405-
Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.69s
383+
Updating crates.io index
384+
Locking 15 packages to latest Rust 1.85.0 compatible versions
385+
Adding rand v0.8.5 (available: v0.9.0)
386+
Compiling proc-macro2 v1.0.93
387+
Compiling unicode-ident v1.0.17
388+
Compiling libc v0.2.170
389+
Compiling cfg-if v1.0.0
390+
Compiling byteorder v1.5.0
391+
Compiling getrandom v0.2.15
392+
Compiling rand_core v0.6.4
393+
Compiling quote v1.0.38
394+
Compiling syn v2.0.98
395+
Compiling zerocopy-derive v0.7.35
396+
Compiling zerocopy v0.7.35
397+
Compiling ppv-lite86 v0.2.20
398+
Compiling rand_chacha v0.3.1
399+
Compiling rand v0.8.5
400+
Compiling guessing_game v0.1.0 (file:///projects/guessing_game)
401+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.48s
406402
```
407403

408404
</Listing>
@@ -487,7 +483,8 @@ as a guide to creating the hypothetical output shown here -->
487483
```console
488484
$ cargo update
489485
Updating crates.io index
490-
Updating rand v0.8.5 -> v0.8.6
486+
Locking 1 package to latest Rust 1.85.0 compatible version
487+
Updating rand v0.8.5 -> v0.8.6 (available: v0.9.0)
491488
```
492489

493490
Cargo ignores the 0.9.0 release. At this point, you would also notice a change
@@ -804,7 +801,9 @@ You guessed: 59
804801
You win!
805802
Please input your guess.
806803
quit
807-
thread 'main' panicked at 'Please type a number!: ParseIntError { kind: InvalidDigit }', src/main.rs:28:47
804+
805+
thread 'main' panicked at src/main.rs:28:47:
806+
Please type a number!: ParseIntError { kind: InvalidDigit }
808807
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
809808
```
810809

src/ch09-01-unrecoverable-errors-with-panic.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,21 @@ thread 'main' panicked at src/main.rs:4:6:
127127
index out of bounds: the len is 3 but the index is 99
128128
stack backtrace:
129129
0: rust_begin_unwind
130-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/std/src/panicking.rs:662:5
130+
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
131131
1: core::panicking::panic_fmt
132-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:74:14
132+
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
133133
2: core::panicking::panic_bounds_check
134-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/panicking.rs:276:5
134+
at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:273:5
135135
3: <usize as core::slice::index::SliceIndex<[T]>>::index
136-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/index.rs:302:10
136+
at file:///home/.rustup/toolchains/1.85/lib/rustlib/src/rust/library/core/src/slice/index.rs:274:10
137137
4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
138-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/slice/index.rs:16:9
138+
at file:///home/.rustup/toolchains/1.85/lib/rustlib/src/rust/library/core/src/slice/index.rs:16:9
139139
5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
140-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/alloc/src/vec/mod.rs:2920:9
140+
at file:///home/.rustup/toolchains/1.85/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:3361:9
141141
6: panic::main
142142
at ./src/main.rs:4:6
143143
7: core::ops::function::FnOnce::call_once
144-
at /rustc/f6e511eec7342f59a25f7c0534f1dbea00d01b14/library/core/src/ops/function.rs:250:5
144+
at file:///home/.rustup/toolchains/1.85/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
145145
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
146146
```
147147

src/ch14-02-publishing-to-crates-io.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ Even if you’ve chosen a unique name, when you run `cargo publish` to publish
306306
the crate at this point, you’ll get a warning and then an error:
307307

308308
<!-- manual-regeneration
309-
cd listings/ch14-more-about-cargo/listing-14-01/
309+
Create a new package with an unregistered name, making no further modifications
310+
to the generated package, so it is missing the description and license fields.
310311
cargo publish
311312
copy just the relevant lines below
312313
-->
@@ -320,7 +321,7 @@ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for
320321
error: failed to publish to registry at https://crates.io
321322

322323
Caused by:
323-
the remote server responded with an error (status 400 Bad Request): missing or empty metadata fields: description, license. Please see https://doc.rust-lang.org/cargo/reference/manifest.html for more information on configuring these field
324+
the remote server responded with an error (status 400 Bad Request): missing or empty metadata fields: description, license. Please see https://doc.rust-lang.org/cargo/reference/manifest.html for more information on configuring these fields
324325
```
325326

326327
This errors because you’re missing some crucial information: a description and

0 commit comments

Comments
 (0)