diff --git a/compiler/hash-exhaustiveness/src/deconstruct.rs b/compiler/hash-exhaustiveness/src/deconstruct.rs index a1fe10578..3199d8b4f 100644 --- a/compiler/hash-exhaustiveness/src/deconstruct.rs +++ b/compiler/hash-exhaustiveness/src/deconstruct.rs @@ -176,8 +176,10 @@ impl ExhaustivenessChecker<'_, E> { fn collect_unreachable_pats(&self, pat: &DeconstructedPat, spans: &mut Vec) { // We don't look at sub-patterns if we // already reported the whole pattern as unreachable. - if !pat.is_reachable() && pat.id.is_some() { - spans.push(pat.id.unwrap()); + if let Some(id) = pat.id + && !pat.is_reachable() + { + spans.push(id); } else { for p in pat.fields.iter_patterns() { let p = self.get_pat(p); diff --git a/compiler/hash-semantics/src/passes/inference/mod.rs b/compiler/hash-semantics/src/passes/inference/mod.rs index 332d0ed16..add922760 100644 --- a/compiler/hash-semantics/src/passes/inference/mod.rs +++ b/compiler/hash-semantics/src/passes/inference/mod.rs @@ -36,7 +36,8 @@ impl InferencePass<'_, E> { infer_subject: impl Fn(T) -> TcResult, subject_has_holes: impl Fn(T) -> Option, ) -> TcResult { - let subject = self.try_or_add_error(try { infer_subject(orig_subject)? }); + let subject = + self.try_or_add_error(try { infer_subject(orig_subject).map_err(Into::into)? }); // If we have an error, in diagnostics mode, exit. if self.has_errors() { diff --git a/compiler/hash-utils/src/lib.rs b/compiler/hash-utils/src/lib.rs index f41399ad6..e687fdea7 100644 --- a/compiler/hash-utils/src/lib.rs +++ b/compiler/hash-utils/src/lib.rs @@ -1,5 +1,5 @@ //! Hash compiler general utilities -#![feature(array_windows, cfg_select, decl_macro, impl_trait_in_assoc_type, type_alias_impl_trait)] +#![feature(cfg_select, decl_macro, impl_trait_in_assoc_type, type_alias_impl_trait)] pub mod assert; pub mod counter; diff --git a/compiler/hash-utils/src/printing.rs b/compiler/hash-utils/src/printing.rs index 1220ecb7e..afb30412f 100644 --- a/compiler/hash-utils/src/printing.rs +++ b/compiler/hash-utils/src/printing.rs @@ -216,8 +216,10 @@ impl<'a, T: fmt::Display + 'a> fmt::Display for SequenceDisplay<'a, T> { // If we overflowed, and the limit is specified then we will // print the specified number of missing variants - if self.options.limit.is_some() && overflow { - let count = self.items.len() - self.options.limit.unwrap(); + if let Some(limit) = self.options.limit + && overflow + { + let count = self.items.len() - limit; write!(f, " {} {count} more", self.options.mode.as_conjunctive())?; } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 75d09c7ef..5baab4ccc 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "nightly-2025-10-30" +channel = "nightly-2025-12-12" components = ["rustfmt", "clippy", "rustfmt"] profile = "minimal" diff --git a/tests/testing-macros/src/lib.rs b/tests/testing-macros/src/lib.rs index cee0ba07d..d528ba522 100644 --- a/tests/testing-macros/src/lib.rs +++ b/tests/testing-macros/src/lib.rs @@ -2,7 +2,7 @@ //! resources on the disk. This file primarily has the `generate_tests` macro //! that will read a directory and generate various test cases from the provided //! `case.hash` files and names of the directories that contain the cases. -#![feature(iter_intersperse, try_find, track_path)] +#![feature(iter_intersperse, try_find, proc_macro_tracked_path)] extern crate proc_macro; @@ -211,7 +211,7 @@ pub fn generate_tests(input: TokenStream) -> TokenStream { // We need to specify that the file that the macro provides should be tracked // by `cargo` in order to pickup changes to the tree, or the contents of the // directory. - proc_macro::tracked_path::path(&input.path); + proc_macro::tracked::path(&input.path); let test_func = input.func; let test_path = PathBuf::from(&input.path);