Skip to content

Commit

Permalink
chore: update local Rust version
Browse files Browse the repository at this point in the history
To 1.72

    rustup update stable
    rustc --version # rustc 1.72.0 (5680fa18f 2023-08-23)
    cargo fix --allow-dirty # tells me to set resolver
    vim Cargo.toml # set the resolver
    cargo build
    cargo test # see snapshot failure
    UPDATE_SNAPSHOTS=1 cargo test # update snapshot
    cargo test # confirm snapshot failure is gone

Context for the resolver warning:

    warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
    note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
    note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

Context for the snapshot failure:

... I sure wish I could find the changelog entry or an issue or a commit
explaining why `std::fmt` (via `format!("{:#?}", ...)`) started
outputting "\0" as "\0" instead of "\u{0}", but I can't find it...

- https://releases.rs/
- https://doc.rust-lang.org/std/fmt/
- https://github.com/search?q=repo%3Arust-lang%2Frust+str%3A%3Afmt&type=issues

... no wait for it, wait for it!

Here it is:

- rust-lang/rust@2ac9efb
- https://github.com/rust-lang/rust/releases/tag/1.61.0 (first appeared
  in this version, but not mentioned in changelog)
- rust-lang/rust#95345
  • Loading branch information
wincent committed Sep 8, 2023
1 parent 2bf1fc2 commit ac6ff32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ members = [
"exe",
"libs/*"
]
resolver = "2"
4 changes: 2 additions & 2 deletions libs/docvim_parser/tests/snapshots/corpus.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4943,7 +4943,7 @@ Block(
"match",
),
CookedStr(
"\u{0}",
"\0",
),
],
},
Expand Down Expand Up @@ -6667,7 +6667,7 @@ Block(
"match",
),
CookedStr(
"\u{0}",
"\0",
),
],
},
Expand Down

0 comments on commit ac6ff32

Please sign in to comment.