Skip to content

Commit

Permalink
feat: update to Rust 1.83 (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Nov 28, 2024
1 parent 57071d7 commit 34eb152
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
rust: ["stable"]
include:
- os: "ubuntu-latest"
rust: "1.82" # MSRV
rust: "1.83" # MSRV
- os: "ubuntu-latest"
rust: "nightly"
steps:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resolver = "2"
[workspace.package]
version = "0.1.0"
edition = "2021"
rust-version = "1.82" # MSRV
rust-version = "1.83" # MSRV
authors = ["DaniPopes <57450786+DaniPopes@users.noreply.github.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/solar"
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
msrv = "1.82"
msrv = "1.83"
allow-dbg-in-tests = true
3 changes: 1 addition & 2 deletions crates/interface/src/source_map/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ impl std::error::Error for OffsetOverflowError {}

impl From<OffsetOverflowError> for io::Error {
fn from(e: OffsetOverflowError) -> Self {
// TODO(MSRV-1.83): Use `FileTooLarge`.
Self::new(io::ErrorKind::Other, e)
Self::new(io::ErrorKind::FileTooLarge, e)
}
}

Expand Down
11 changes: 1 addition & 10 deletions crates/sema/src/builtins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ macro_rules! builtin_range_slice {
let mut i = $first;
let mut out = [Builtin::Blockhash; $last - $first];
while i < $last {
out[i - $first] = Builtin::from_index_unwrap(i);
out[i - $first] = Builtin::from_index(i).unwrap();
i += 1;
}
out
Expand Down Expand Up @@ -276,15 +276,6 @@ impl Builtin {
}
}

// TODO(MSRV-1.83): Replace with .unwrap()
#[inline]
const fn from_index_unwrap(i: usize) -> Self {
match Self::from_index(i) {
Some(b) => b,
None => panic!(),
}
}

/// Returns the global builtins.
pub fn global() -> &'static [Self] {
builtin_range_slice!(Self::FIRST_GLOBAL, Self::LAST_GLOBAL)
Expand Down

0 comments on commit 34eb152

Please sign in to comment.