Skip to content

Rollup of 9 pull requests #139482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9f089e0
Add `{ast,hir,thir}::PatKind::Missing` variants.
nnethercote Mar 26, 2025
909f449
Remove `kw::Extra` checks that are no longer necessary.
nnethercote Mar 27, 2025
3123df8
Implement `super let`.
m-ou-se Mar 27, 2025
f02e278
Fix typo in pretty printing super let.
m-ou-se Apr 2, 2025
3e6cc76
Boolean hate.
m-ou-se Apr 2, 2025
b9babad
Add feature gate test for cfg'd out super let.
m-ou-se Apr 4, 2025
6c3417d
fixup! Implement `super let`.
m-ou-se Apr 4, 2025
0522ed0
Default auto traits: fix perf
Bryanskiy Apr 4, 2025
ccbef74
Add tests for super let.
m-ou-se Apr 4, 2025
de57c05
Let `const_to_pat` handle the `ExpandedConstant` wrapping
Nadrieril Mar 29, 2025
090d764
Remove the `is_inline` field from `PatKind::ExpandedConstant`
Nadrieril Mar 29, 2025
50e10b3
Tweak `lower_pat_expr`
Nadrieril Mar 29, 2025
961c746
Add the inline const type annotation in pattern lowering
Nadrieril Mar 29, 2025
d912c03
Reuse `parent_args`
Nadrieril Mar 29, 2025
5eb535c
remove compiler support for `extern "rust-intrinsic"` blocks
Skgland Apr 6, 2025
51b51b5
remove rust-analyser support for `extern "rust-intrinsic"` blocks
Skgland Apr 6, 2025
6dfb296
update docs
Skgland Apr 6, 2025
7dd57f0
update/bless tests
Skgland Apr 6, 2025
c8649a3
Stop calling source_span query in significant drop order code
compiler-errors Apr 6, 2025
d111aa8
Trivial tweaks to stop tracking source span directly
compiler-errors Apr 7, 2025
4322b6e
coverage: Build the CGU's global file table as late as possible
Zalathar Mar 31, 2025
d6467d3
handle sret for scalar autodiff
ZuseZ4 Apr 7, 2025
ca5bea3
move old tests, add sret test
ZuseZ4 Apr 7, 2025
82df622
Rollup merge of #139035 - nnethercote:PatKind-Missing, r=oli-obk
Zalathar Apr 7, 2025
9955b76
Rollup merge of #139108 - Nadrieril:simplify-expandedconstant, r=oli-obk
Zalathar Apr 7, 2025
27c6e40
Rollup merge of #139112 - m-ou-se:super-let, r=lcnr
Zalathar Apr 7, 2025
f4c429f
Rollup merge of #139365 - Bryanskiy:leak-perf, r=lcnr
Zalathar Apr 7, 2025
ddf099f
Rollup merge of #139397 - Zalathar:virtual, r=jieyouxu
Zalathar Apr 7, 2025
9209c5e
Rollup merge of #139455 - Skgland:remove_rust-intrinsic_ABI, r=oli-obk
Zalathar Apr 7, 2025
0178254
Rollup merge of #139461 - compiler-errors:significant-drop-span, r=ol…
Zalathar Apr 7, 2025
5863b42
Rollup merge of #139465 - EnzymeAD:autodiff-sret, r=oli-obk
Zalathar Apr 7, 2025
6e0b674
Rollup merge of #139466 - compiler-errors:trivial-incr-tainting, r=ol…
Zalathar Apr 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove rust-analyser support for extern "rust-intrinsic" blocks
  • Loading branch information
Skgland committed Apr 6, 2025
commit 51b51b51d7931da85280382a81c4dd80c73ca754
3 changes: 0 additions & 3 deletions src/tools/rust-analyzer/crates/hir-ty/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ pub enum FnAbi {
Rust,
RustCall,
RustCold,
RustIntrinsic,
Stdcall,
StdcallUnwind,
System,
Expand Down Expand Up @@ -457,7 +456,6 @@ impl FnAbi {
s if *s == sym::riscv_dash_interrupt_dash_s => FnAbi::RiscvInterruptS,
s if *s == sym::rust_dash_call => FnAbi::RustCall,
s if *s == sym::rust_dash_cold => FnAbi::RustCold,
s if *s == sym::rust_dash_intrinsic => FnAbi::RustIntrinsic,
s if *s == sym::Rust => FnAbi::Rust,
s if *s == sym::stdcall_dash_unwind => FnAbi::StdcallUnwind,
s if *s == sym::stdcall => FnAbi::Stdcall,
Expand Down Expand Up @@ -500,7 +498,6 @@ impl FnAbi {
FnAbi::Rust => "Rust",
FnAbi::RustCall => "rust-call",
FnAbi::RustCold => "rust-cold",
FnAbi::RustIntrinsic => "rust-intrinsic",
FnAbi::Stdcall => "stdcall",
FnAbi::StdcallUnwind => "stdcall-unwind",
FnAbi::System => "system",
Expand Down
14 changes: 1 addition & 13 deletions src/tools/rust-analyzer/crates/hir-ty/src/mir/eval/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,7 @@ impl Evaluator<'_> {

let function_data = self.db.function_data(def);
let attrs = self.db.attrs(def.into());
let is_intrinsic = attrs.by_key(&sym::rustc_intrinsic).exists()
// Keep this around for a bit until extern "rustc-intrinsic" abis are no longer used
|| (match &function_data.abi {
Some(abi) => *abi == sym::rust_dash_intrinsic,
None => match def.lookup(self.db.upcast()).container {
hir_def::ItemContainerId::ExternBlockId(block) => {
let id = block.lookup(self.db.upcast()).id;
id.item_tree(self.db.upcast())[id.value].abi.as_ref()
== Some(&sym::rust_dash_intrinsic)
}
_ => false,
},
});
let is_intrinsic = attrs.by_key(&sym::rustc_intrinsic).exists();

if is_intrinsic {
return self.exec_intrinsic(
Expand Down
26 changes: 6 additions & 20 deletions src/tools/rust-analyzer/crates/hir-ty/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use hir_def::{
TypeOrConstParamId,
};
use hir_expand::name::Name;
use intern::sym;
use rustc_abi::TargetDataLayout;
use rustc_hash::FxHashSet;
use smallvec::{smallvec, SmallVec};
Expand Down Expand Up @@ -303,26 +302,13 @@ pub fn is_fn_unsafe_to_call(

let loc = func.lookup(db.upcast());
match loc.container {
hir_def::ItemContainerId::ExternBlockId(block) => {
let id = block.lookup(db.upcast()).id;
let is_intrinsic_block =
id.item_tree(db.upcast())[id.value].abi.as_ref() == Some(&sym::rust_dash_intrinsic);
if is_intrinsic_block {
// legacy intrinsics
// extern "rust-intrinsic" intrinsics are unsafe unless they have the rustc_safe_intrinsic attribute
if db.attrs(func.into()).by_key(&sym::rustc_safe_intrinsic).exists() {
Unsafety::Safe
} else {
Unsafety::Unsafe
}
hir_def::ItemContainerId::ExternBlockId(_block) => {
// Function in an `extern` block are always unsafe to call, except when
// it is marked as `safe`.
if data.is_safe() {
Unsafety::Safe
} else {
// Function in an `extern` block are always unsafe to call, except when
// it is marked as `safe`.
if data.is_safe() {
Unsafety::Safe
} else {
Unsafety::Unsafe
}
Unsafety::Unsafe
}
}
_ => Unsafety::Safe,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const SUPPORTED_CALLING_CONVENTIONS: &[&str] = &[
"wasm",
"system",
"system-unwind",
"rust-intrinsic",
"rust-call",
"unadjusted",
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ define_symbols! {
riscv_dash_interrupt_dash_s = "riscv-interrupt-s",
rust_dash_call = "rust-call",
rust_dash_cold = "rust-cold",
rust_dash_intrinsic = "rust-intrinsic",
stdcall_dash_unwind = "stdcall-unwind",
system_dash_unwind = "system-unwind",
sysv64_dash_unwind = "sysv64-unwind",
Expand Down