diff options
| author | Michael Goulet <michael@errs.io> | 2025-02-24 19:21:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 19:21:47 -0500 |
| commit | 8f729e9cff08e6a4c1c1b341cd4a1bf4d85e06c4 (patch) | |
| tree | 67b0387df6d7bbc1eeefbdb50678a254a4e09fec /compiler/rustc_middle/src/ty | |
| parent | 828a3a41b3f18d183f4487701abfd9cd39bced3a (diff) | |
| parent | 6eea027aa9453b685ac636ea40fc826267afab2a (diff) | |
| download | rust-8f729e9cff08e6a4c1c1b341cd4a1bf4d85e06c4.tar.gz rust-8f729e9cff08e6a4c1c1b341cd4a1bf4d85e06c4.zip | |
Rollup merge of #137489 - RalfJung:no-more-rustc_intrinsic_must_be_overridden, r=oli-obk
remove `#[rustc_intrinsic_must_be_overridde]` In https://github.com/rust-lang/rust/pull/135031, we gained support for just leaving away the body. Now that the bootstrap compiler got bumped, stop using the old style and remove support for it. r? `@oli-obk` There are a few more mentions of this attribute in RA code that I didn't touch; Cc `@rust-lang/rust-analyzer`
Diffstat (limited to 'compiler/rustc_middle/src/ty')
| -rw-r--r-- | compiler/rustc_middle/src/ty/util.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_middle/src/ty/util.rs b/compiler/rustc_middle/src/ty/util.rs index 88d57498542..c153f6bb7d7 100644 --- a/compiler/rustc_middle/src/ty/util.rs +++ b/compiler/rustc_middle/src/ty/util.rs @@ -1755,13 +1755,12 @@ pub fn intrinsic_raw(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::Intrinsi && (matches!(tcx.fn_sig(def_id).skip_binder().abi(), ExternAbi::RustIntrinsic) || tcx.has_attr(def_id, sym::rustc_intrinsic)) { - let must_be_overridden = tcx.has_attr(def_id, sym::rustc_intrinsic_must_be_overridden) - || match tcx.hir_node_by_def_id(def_id) { - hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn { has_body, .. }, .. }) => { - !has_body - } - _ => true, - }; + let must_be_overridden = match tcx.hir_node_by_def_id(def_id) { + hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn { has_body, .. }, .. }) => { + !has_body + } + _ => true, + }; Some(ty::IntrinsicDef { name: tcx.item_name(def_id.into()), must_be_overridden, |
