Skip to content

Commit

Permalink
feat: update to nightly-2024-08-30
Browse files Browse the repository at this point in the history
Now we need `#![feature(rustc_private)]` in the `main.rs`

See the original PR
rust-lang/rust#122362

And the PR in another tool that requires the same change
trailofbits/dylint#1298

Update lock file too
  • Loading branch information
hlisdero committed Aug 30, 2024
1 parent 5cc2d5c commit 0a82958
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Documentation: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file

[toolchain]
channel = "nightly-2024-07-16"
channel = "nightly-2024-08-30"
components = ["llvm-tools-preview", "rustc-dev", "rust-src"]
6 changes: 6 additions & 0 deletions src/bin/check-deadlock/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// This feature gate is necessary to access the internal crates of the compiler.
// It has existed for a long time and since the compiler internals will never be stabilized,
// the situation will probably stay like this.
// <https://doc.rust-lang.org/unstable-book/language-features/rustc-private.html>
#![feature(rustc_private)]

mod cargo_result;
mod check_deadlock;
mod cli;
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn extract_def_id_of_called_function_from_operand<'tcx>(
rustc_middle::mir::Operand::Constant(constant) => constant.ty(),
};
match function_type.kind() {
rustc_middle::ty::TyKind::FnPtr(_) => {
rustc_middle::ty::TyKind::FnPtr(_, _) => {
unimplemented!(
"TyKind::FnPtr not implemented yet. Function pointers are present in the MIR"
);
Expand Down

0 comments on commit 0a82958

Please sign in to comment.