Skip to content

Commit 4662f61

Browse files
authored
Update rust to v1.84.0 (#2107)
This PR updates the Rust version to 1.84.0. To fix some new clippy lints I had to upgrade `PyO3` to its latest version, this led to `PyO3` related changes. For the same reason I had to update `wasm_bindgen` to its latest version, but no further changes were required.
1 parent ca1bc18 commit 4662f61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+257
-262
lines changed

.ado/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ schedules:
1919

2020
variables:
2121
CARGO_TERM_COLOR: always
22-
RUST_TOOLCHAIN_VERSION: "1.82"
22+
RUST_TOOLCHAIN_VERSION: "1.84"
2323

2424
resources:
2525
repositories:

.github/workflows/bench-reports.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
CARGO_TERM_COLOR: always
99
NODE_VERSION: "18.17.1"
1010
PYTHON_VERSION: "3.11"
11-
RUST_TOOLCHAIN_VERSION: "1.82"
11+
RUST_TOOLCHAIN_VERSION: "1.84"
1212

1313
jobs:
1414
runBenchmark:

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
CARGO_TERM_COLOR: always
2121
NODE_VERSION: "18.17.1"
2222
PYTHON_VERSION: "3.11"
23-
RUST_TOOLCHAIN_VERSION: "1.82"
23+
RUST_TOOLCHAIN_VERSION: "1.84"
2424
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy
2525

2626
jobs:

.github/workflows/memory_profile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
CARGO_TERM_COLOR: always
1616
NODE_VERSION: "18.17.1"
1717
PYTHON_VERSION: "3.11"
18-
RUST_TOOLCHAIN_VERSION: "1.82"
18+
RUST_TOOLCHAIN_VERSION: "1.84"
1919
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy
2020

2121
jobs:

.github/workflows/publish-playground.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
env:
1313
CARGO_TERM_COLOR: always
14-
RUST_TOOLCHAIN_VERSION: "1.82"
14+
RUST_TOOLCHAIN_VERSION: "1.84"
1515
RUST_TOOLCHAIN_COMPONENTS: rustfmt clippy
1616

1717
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages

Cargo.lock

+47-44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ regex-lite = "0.1"
7373
rustc-hash = "1"
7474
serde = { version = "1.0", features = [ "derive" ] }
7575
serde-wasm-bindgen = "0.6"
76-
wasm-bindgen = "0.2"
76+
wasm-bindgen = "0.2.100"
7777
wasm-bindgen-futures = "0.4"
7878
rand = "0.8"
7979
serde_json = "1.0"
80-
pyo3 = "0.22"
80+
pyo3 = "0.23.4"
8181
quantum-sparse-sim = { git = "https://github.com/qir-alliance/qir-runner", rev = "562e2c11ad685dd01bfc1ae975e00d4133615995" }
8282
async-trait = "0.1"
8383
tokio = { version = "1.35", features = ["macros", "rt"] }

compiler/qsc/src/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ impl<E> WithStack<E> {
1919
WithStack { error, stack_trace }
2020
}
2121

22-
pub(super) fn stack_trace(&self) -> &Option<String> {
23-
&self.stack_trace
22+
pub(super) fn stack_trace(&self) -> Option<&String> {
23+
self.stack_trace.as_ref()
2424
}
2525

2626
pub fn error(&self) -> &E {

compiler/qsc/src/interpret.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ use thiserror::Error;
7171

7272
impl Error {
7373
#[must_use]
74-
pub fn stack_trace(&self) -> &Option<String> {
74+
pub fn stack_trace(&self) -> Option<&String> {
7575
match &self {
7676
Error::Eval(err) => err.stack_trace(),
77-
_ => &None,
77+
_ => None,
7878
}
7979
}
8080
}

compiler/qsc/src/interpret/debug/tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ fn stack_traces_can_cross_eval_session_and_file_boundaries() {
8989
Err(e) => {
9090
let stack_trace = e[0]
9191
.stack_trace()
92-
.as_ref()
9392
.expect("code should have a valid stack trace");
9493
let expectation = indoc! {r#"
9594
Error: division by zero
@@ -161,7 +160,6 @@ fn stack_traces_can_cross_file_and_entry_boundaries() {
161160
Err(e) => {
162161
let stack_trace = e[0]
163162
.stack_trace()
164-
.as_ref()
165163
.expect("code should have a valid stack trace");
166164
let expectation = indoc! {r#"
167165
Error: division by zero

0 commit comments

Comments
 (0)