Repository navigation
Remove rustc_hir's attribute re-exports - #163250
Conversation
|
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in compiler/rustc_sanitizers cc @rcvalle
cc @rust-lang/clippy These commits modify the If this was unintentional then you should revert the changes before this PR is merged.
cc @bjorn3 Some changes occurred in match lowering cc @Nadrieril Some changes occurred in compiler/rustc_codegen_llvm/src/builder/autodiff.rs cc @ZuseZ4 Some changes occurred in coverage instrumentation. cc @Zalathar Some changes occurred in match checking cc @Nadrieril |
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Rollup merge of #163250 - mejrs:hir_imports3, r=JonathanBrouwer Remove rustc_hir's attribute re-exports Followup to #160336, see also #163170, #163207 and rust-lang/rust-clippy/pull/17714 Very minor touchups here and there, nothing involving code changes. r? @JonathanBrouwer
…uwer Rollup of 3 pull requests Successful merges: - rust-lang/rust#163250 (Remove rustc_hir's attribute re-exports) - rust-lang/rust#163329 (Update mailmap for Clar Fon) - rust-lang/rust#163378 (use is_some_and / is_none_or in a few more places)
…uwer Rollup of 3 pull requests Successful merges: - rust-lang/rust#163250 (Remove rustc_hir's attribute re-exports) - rust-lang/rust#163329 (Update mailmap for Clar Fon) - rust-lang/rust#163378 (use is_some_and / is_none_or in a few more places)
Remove rustc_hir's attribute re-exports Followup to rust-lang#160336, see also rust-lang#163170, rust-lang#163207 and rust-lang/rust-clippy/pull/17714 Very minor touchups here and there, nothing involving code changes. r? @JonathanBrouwer
Remove rustc_hir's attribute re-exports Followup to rust-lang#160336, see also rust-lang#163170, rust-lang#163207 and rust-lang/rust-clippy/pull/17714 Very minor touchups here and there, nothing involving code changes. r? @JonathanBrouwer
Brings the pinned nightly from nightly-2026-09-25 to nightly-2026-10-11. The automated update has been failing since 09-26 (model-checking#4935). The range is about 1,500 rustc commits, but only a handful of changes affect Kani. One of them changes behaviour quietly, and it is the part worth reviewing. **The one that matters: `use` lists in HIR (rust-lang/rust#161349).** rustc used to lower `use a::{b, c};` into separate items, `use a::b;` and `use a::c;`. It now keeps a single item holding a tree of imports. Kani's path resolver (`kani_middle/resolve.rs`), which resolves the paths in `#[kani::stub]`, contracts and related attributes, found imported names by scanning those per-name items. Updating only the pattern would have compiled, but every name imported through a `{...}` list would have stopped resolving. `tests/kani/FunctionContracts/cross_module_multiple_impls.rs` would have caught it, because it imports its contract targets with `use crate::ty::{D, S};`. The resolver now walks each `use` tree at every level, looking for the name and collecting globs, with the same precedence as before: a named import wins over globs. The new `tests/kani/Stubbing/resolve_use_nested.rs` stubs through a list, a rename inside a list, a glob inside a list, and a list nested in a list. It passes on nightly-2026-09-25 as well, and on the new toolchain it fails with `failed to resolve` for four of its seven stubs if the walk doesn't recurse. **Mechanical API updates:** - `rustc_hir` no longer re-exports the attribute crate (rust-lang/rust#163250): `Attribute`, `AttrArgs` and `LangItem` now come from `rustc_attr_ir`. - `rustc_driver::run_compiler` is now `compiler_entrypoint` (rust-lang/rust#163647). - `mir::Terminator::attributes` is now `loop_hint_attrs`. It holds `#[unroll]` hints, which Kani-built terminators don't carry. - The `type_id` intrinsic moved to `core::intrinsics::reflection`. I also fixed the `needs_drop` panic message, which wrongly named `type_id`. - In nightly-2026-10-11, `loop_hint_attrs` moved again, from `Terminator` into `TerminatorKind::Goto` (rust-lang/rust#163931). - `rustc_abi::Float` gained `PpcF128` (rust-lang/rust#162156), PowerPC's double-double `long double`. It only exists on PowerPC targets, which Kani doesn't support, so it is reported as unsupported, like the existing `F16B` case. **Test updates.** Importing `copy`, `copy_nonoverlapping` and `write_bytes` through the accidentally stabilized `core::intrinsics` path is now a deny-by-default lint (rust-lang/rust#163160). Fifteen tests did that. They check Kani's model of the intrinsics themselves, and the `core::ptr` versions add extra debug assertions on top, so the tests now opt in to `core_intrinsics` instead of switching to `ptr`. Their expected output is unchanged. **Test updates, continued.** rustc's diagnostic for `ui/ice-size-overflow/large_array.rs` now also prints the enclosing `SizedTypeProperties` trait line, so its expected output gains two lines. Kani still reports the same E0080 there, without crashing. **Testing.** I ran `scripts/kani-regression.sh` and `scripts/kani-llbc-regression.sh` locally on nightly-2026-10-11 (Linux x86_64, CBMC 6.11.0), with `main` merged in, plus fmt and the three clippy gates (workspace, `--cfg=kani_sysroot`, `--features llbc`). Every suite passes. Charon builds unchanged. Locally I cap CBMC at 6 GB, which makes `push_slow.rs` and `cell_stub.rs` run out of memory on `main` as well; uncapped, both pass here. I also checked the other `rustc_public` changes in the range: `PassMode::IndirectUnsized` (Kani only compares against `PassMode::Ignore`) and a docs-only pointee-size change. Neither affects Kani. The earlier CI failures on this PR were the `zerocopy` 0.8.60 break (model-checking#4988), which zerocopy fixed in 0.8.61; the rerun on the previous head passed on Linux and macOS-14. Resolves model-checking#4935
Followup to #160336, see also #163170, #163207 and rust-lang/rust-clippy/pull/17714
Very minor touchups here and there, nothing involving code changes.
r? @JonathanBrouwer