Skip to content

pin clippy/rust-toolchain versions to 1.75 #67

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

Merged
merged 3 commits into from
May 26, 2024
Merged

Conversation

zaidoon1
Copy link
Owner

No description provided.

cratelyn and others added 3 commits May 25, 2024 20:00
in CI, we specify the rust version as 1.70.0...

```yaml
on: [push, pull_request]
env:
  RUST_VERSION: 1.70.0
```

likewise, the package manifest pins the rust version...

```toml
rust-version = "1.70.0"
```

..but this version is not pinned by cargo, via a `rust-toolchain`. this
means that testing this project using the stable toolchain by default
(_at time of writing, this is 1.78.0_) will see test failures due to
error messages not matching the expected snapshots, due to `rustc`
itself making changes to its diagnostics:

```
test tests/fail/snapshot_outlive_db.rs ... mismatch

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0597]: `db` does not live long enough
 --> tests/fail/snapshot_outlive_db.rs:6:9
  |
4 |     let _snapshot = {
  |         --------- borrow later stored here
5 |         let db = DB::open_default("foo").unwrap();
  |             -- binding `db` declared here
6 |         db.snapshot()
  |         ^^^^^^^^^^^^^ borrowed value does not live long enough
7 |     };
  |     - `db` dropped here while still borrowed
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0597]: `db` does not live long enough
 --> tests/fail/snapshot_outlive_db.rs:6:9
  |
4 |     let _snapshot = {
  |         --------- borrow later stored here
5 |         let db = DB::open_default("foo").unwrap();
  |             -- binding `db` declared here
6 |         db.snapshot()
  |         ^^ borrowed value does not live long enough
7 |     };
  |     - `db` dropped here while still borrowed
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
note: If the actual output is the correct output you can bless it by rerunning
      your test with the environment variable TRYBUILD=overwrite
```

this commit introduces a `rust-toolchain.toml` file so that the correct
version of rust is used by those building or contributing to this
project.
@zaidoon1 zaidoon1 merged commit 368922d into master May 26, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants