Skip to content

Rollup of 8 pull requests #136965

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
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f94ada1
Add cygwin target.
Berrysoft Jan 1, 2025
33d0f38
Apply suggestions
Berrysoft Feb 5, 2025
8e5207e
Reformat files
Berrysoft Feb 10, 2025
42ceb25
compiler/rustc_data_structures/src/sync.rs: these RwLock methods are …
safinaskar Feb 8, 2025
25b6761
compiler/rustc_data_structures/src/sync.rs: remove "impl Clone for Rw…
safinaskar Feb 9, 2025
c9c7b44
compiler/rustc_data_structures/src/sync.rs: delete MappedLockGuard
safinaskar Feb 11, 2025
8f684c9
compiler/rustc_data_structures/src/sync.rs: delete Weak
safinaskar Feb 11, 2025
4a2c7f4
compiler/rustc_data_structures/src/sync.rs: remove atomics, but not A…
safinaskar Feb 11, 2025
d79f9ca
compiler/rustc_data_structures/src/sync.rs: delete Sync and Send
safinaskar Feb 11, 2025
afa01c1
src/doc/rustc-dev-guide/src/parallel-rustc.md: remove Arc and Rc (it …
safinaskar Feb 11, 2025
851cc4b
compiler/rustc_codegen_gcc/src/back/lto.rs: delete "unsafe impl Sync/…
safinaskar Feb 11, 2025
51f49d8
compiler/rustc_codegen_llvm/src/lib.rs: remove "unsafe impl Send/Sync"
safinaskar Feb 11, 2025
0240690
compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsa…
safinaskar Feb 11, 2025
8506dd2
config.example.toml: remove "parallel-compiler"
safinaskar Feb 11, 2025
ffefb13
Always perform discr read for never pattern in EUV
compiler-errors Feb 11, 2025
5a76304
Nits
compiler-errors Feb 11, 2025
c917373
Fix import in bench for wasm
ehuss Feb 12, 2025
d1b35f9
Improved named region errors
compiler-errors Feb 4, 2025
659e20f
Remove `LLVMGetModuleContext`
Zalathar Feb 8, 2025
e7cef26
cg_llvm: Reduce visibility of all functions in the llvm module
dpaoliello Feb 11, 2025
c72d443
Use core stubs in some CMSE tests
compiler-errors Feb 6, 2025
516afd5
Implement and use BikeshedGuaranteedNoDrop for union/unsafe field val…
compiler-errors Feb 6, 2025
d0564fd
Use BikeshedGuaranteedNotDrop in unsafe binder type WF too
compiler-errors Feb 6, 2025
4bb0c3d
Split out the `extern_system_varargs` feature
workingjubilee Feb 12, 2025
6f671ad
Rollup merge of #134999 - Berrysoft:dev/new-cygwin-target, r=chenyuka…
jhpratt Feb 13, 2025
4e6605f
Rollup merge of #136559 - compiler-errors:resolve-regions-for-type-te…
jhpratt Feb 13, 2025
4ea2610
Rollup merge of #136660 - compiler-errors:BikeshedGuaranteedNoDrop, r…
jhpratt Feb 13, 2025
1f669fd
Rollup merge of #136858 - safinaskar:parallel-cleanup-2025-02-11-07-5…
jhpratt Feb 13, 2025
f7d5285
Rollup merge of #136881 - dpaoliello:cleanllvm3, r=Zalathar
jhpratt Feb 13, 2025
6fbca25
Rollup merge of #136888 - compiler-errors:never-read, r=Nadrieril
jhpratt Feb 13, 2025
36d3796
Rollup merge of #136948 - workingjubilee:split-off-extern-system-vara…
jhpratt Feb 13, 2025
f9142b0
Rollup merge of #136949 - ehuss:wasm-bench-time, r=jhpratt
jhpratt Feb 13, 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
2 changes: 0 additions & 2 deletions compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ impl ExternAbi {
// * C and Cdecl obviously support varargs.
// * C can be based on Aapcs, SysV64 or Win64, so they must support varargs.
// * EfiApi is based on Win64 or C, so it also supports it.
// * System falls back to C for functions with varargs.
//
// * Stdcall does not, because it would be impossible for the callee to clean
// up the arguments. (callee doesn't know how many arguments are there)
Expand All @@ -204,7 +203,6 @@ impl ExternAbi {
match self {
Self::C { .. }
| Self::Cdecl { .. }
| Self::System { .. }
| Self::Aapcs { .. }
| Self::Win64 { .. }
| Self::SysV64 { .. }
Expand Down
7 changes: 5 additions & 2 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,16 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
let type_test_span = type_test.span;

if let Some(lower_bound_region) = lower_bound_region {
let generic_ty = type_test.generic_kind.to_ty(self.infcx.tcx);
let generic_ty = self.regioncx.name_regions(
self.infcx.tcx,
type_test.generic_kind.to_ty(self.infcx.tcx),
);
let origin = RelateParamBound(type_test_span, generic_ty, None);
self.buffer_error(self.infcx.err_ctxt().construct_generic_bound_failure(
self.body.source.def_id().expect_local(),
type_test_span,
Some(origin),
type_test.generic_kind,
self.regioncx.name_regions(self.infcx.tcx, type_test.generic_kind),
lower_bound_region,
));
} else {
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_cranelift/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ impl<T: ?Sized> LegacyReceiver for Box<T> {}
#[lang = "copy"]
pub trait Copy {}

#[lang = "bikeshed_guaranteed_no_drop"]
pub trait BikeshedGuaranteedNoDrop {}

impl Copy for bool {}
impl Copy for u8 {}
impl Copy for u16 {}
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_gcc/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ impl<T: ?Sized, A: Allocator> LegacyReceiver for Box<T, A> {}
#[lang = "copy"]
pub trait Copy {}

#[lang = "bikeshed_guaranteed_no_drop"]
pub trait BikeshedGuaranteedNoDrop {}

impl Copy for bool {}
impl Copy for u8 {}
impl Copy for u16 {}
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_codegen_gcc/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,6 @@ pub struct ThinBuffer {
context: Arc<SyncContext>,
}

// TODO: check if this makes sense to make ThinBuffer Send and Sync.
unsafe impl Send for ThinBuffer {}
unsafe impl Sync for ThinBuffer {}

impl ThinBuffer {
pub(crate) fn new(context: &Arc<SyncContext>) -> Self {
Self { context: Arc::clone(context) }
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@ impl WriteBackendMethods for LlvmCodegenBackend {
}
}

unsafe impl Send for LlvmCodegenBackend {} // Llvm is on a per-thread basis
unsafe impl Sync for LlvmCodegenBackend {}

impl LlvmCodegenBackend {
pub fn new() -> Box<dyn CodegenBackend> {
Box::new(LlvmCodegenBackend(()))
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_llvm/src/llvm/archive_ro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl ArchiveRO {
///
/// If this archive is used with a mutable method, then an error will be
/// raised.
pub fn open(dst: &Path) -> Result<ArchiveRO, String> {
pub(crate) fn open(dst: &Path) -> Result<ArchiveRO, String> {
unsafe {
let s = path_to_c_string(dst);
let ar = super::LLVMRustOpenArchive(s.as_ptr()).ok_or_else(|| {
Expand All @@ -36,7 +36,7 @@ impl ArchiveRO {
}
}

pub fn iter(&self) -> Iter<'_> {
pub(crate) fn iter(&self) -> Iter<'_> {
unsafe { Iter { raw: super::LLVMRustArchiveIteratorNew(self.raw) } }
}
}
Expand Down Expand Up @@ -71,7 +71,7 @@ impl<'a> Drop for Iter<'a> {
}

impl<'a> Child<'a> {
pub fn name(&self) -> Option<&'a str> {
pub(crate) fn name(&self) -> Option<&'a str> {
unsafe {
let mut name_len = 0;
let name_ptr = super::LLVMRustArchiveChildName(self.raw, &mut name_len);
Expand Down
27 changes: 14 additions & 13 deletions compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(non_camel_case_types)]
#![expect(dead_code)]

use libc::{c_char, c_uint};

Expand All @@ -8,23 +9,23 @@ use crate::llvm::Bool;
#[link(name = "llvm-wrapper", kind = "static")]
extern "C" {
// Enzyme
pub fn LLVMRustHasMetadata(I: &Value, KindID: c_uint) -> bool;
pub fn LLVMRustEraseInstUntilInclusive(BB: &BasicBlock, I: &Value);
pub fn LLVMRustGetLastInstruction<'a>(BB: &BasicBlock) -> Option<&'a Value>;
pub fn LLVMRustDIGetInstMetadata(I: &Value) -> Option<&Metadata>;
pub fn LLVMRustEraseInstFromParent(V: &Value);
pub fn LLVMRustGetTerminator<'a>(B: &BasicBlock) -> &'a Value;
pub fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool;
pub(crate) fn LLVMRustHasMetadata(I: &Value, KindID: c_uint) -> bool;
pub(crate) fn LLVMRustEraseInstUntilInclusive(BB: &BasicBlock, I: &Value);
pub(crate) fn LLVMRustGetLastInstruction<'a>(BB: &BasicBlock) -> Option<&'a Value>;
pub(crate) fn LLVMRustDIGetInstMetadata(I: &Value) -> Option<&Metadata>;
pub(crate) fn LLVMRustEraseInstFromParent(V: &Value);
pub(crate) fn LLVMRustGetTerminator<'a>(B: &BasicBlock) -> &'a Value;
pub(crate) fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool;
}

extern "C" {
// Enzyme
pub fn LLVMDumpModule(M: &Module);
pub fn LLVMDumpValue(V: &Value);
pub fn LLVMGetFunctionCallConv(F: &Value) -> c_uint;
pub fn LLVMGetReturnType(T: &Type) -> &Type;
pub fn LLVMGetParams(Fnc: &Value, parms: *mut &Value);
pub fn LLVMGetNamedFunction(M: &Module, Name: *const c_char) -> Option<&Value>;
pub(crate) fn LLVMDumpModule(M: &Module);
pub(crate) fn LLVMDumpValue(V: &Value);
pub(crate) fn LLVMGetFunctionCallConv(F: &Value) -> c_uint;
pub(crate) fn LLVMGetReturnType(T: &Type) -> &Type;
pub(crate) fn LLVMGetParams(Fnc: &Value, parms: *mut &Value);
pub(crate) fn LLVMGetNamedFunction(M: &Module, Name: *const c_char) -> Option<&Value>;
}

#[repr(C)]
Expand Down
Loading
Loading