Skip to content

Commit

Permalink
Update to Rust 1.75, fix clippy lints (#1021)
Browse files Browse the repository at this point in the history
This change updates the minimum version of Rust supported for local dev
and used in the pipelines to 1.75. It also fixes one remaining clippy
lint that is new to 1.75.
  • Loading branch information
swernli authored Jan 17, 2024
1 parent dc8e4d3 commit 70b1272
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pr: none

variables:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN_VERSION: "1.73"
RUST_TOOLCHAIN_VERSION: "1.75"

# variables set by pipeline
# - BASE_IMAGE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
CARGO_TERM_COLOR: always
NODE_VERSION: "18.17.1"
PYTHON_VERSION: "3.11"
RUST_TOOLCHAIN_VERSION: "1.73"
RUST_TOOLCHAIN_VERSION: "1.75"
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN_VERSION: "1.73"
RUST_TOOLCHAIN_VERSION: "1.75"
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand Down
9 changes: 9 additions & 0 deletions compiler/qsc_fir/src/fir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,15 @@ impl PackageStore {
}
}

impl<'a> IntoIterator for &'a PackageStore {
type IntoIter = qsc_data_structures::index_map::Iter<'a, PackageId, Package>;
type Item = (PackageId, &'a Package);

fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}

/// A trait to find elements in a package.
pub trait PackageLookup {
/// Gets a block.
Expand Down
6 changes: 3 additions & 3 deletions prereqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
import functools

python_ver = (3, 11) # Python support for Windows on ARM64 requires v3.11 or later
rust_ver = (1, 73) # Ensure Rust version 1.73 or later is installed
rust_ver = (1, 75) # Ensure Rust version 1.75 or later is installed
node_ver = (
18,
17,
)
wasmpack_ver = (0, 12, 1) # Latest tested wasm-pack version
rust_fmt_ver = (1, 6, 0) # Current version when Rust 1.73 shipped
clippy_ver = (0, 1, 69)
rust_fmt_ver = (1, 7, 0) # Current version when Rust 1.75 shipped
clippy_ver = (0, 1, 75)

# Disable buffered output so that the log statements and subprocess output get interleaved in proper order
print = functools.partial(print, flush=True)
Expand Down

0 comments on commit 70b1272

Please sign in to comment.