Rollup merge of #124067 - RalfJung:weak-lang-items, r=davidtwco
weak lang items are not allowed to be #[track_caller] For instance the panic handler will be called via this import ```rust extern "Rust" { #[lang = "panic_impl"] fn panic_impl(pi: &PanicInfo<'_>) -> !; } ``` A `#[track_caller]` would add an extra argument and thus make this the wrong signature. The 2nd commit is a consistency rename; based on the docs [here](https://doc.rust-lang.org/unstable-book/language-features/lang-items.html) and [here](https://rustc-dev-guide.rust-lang.org/lang-items.html) I figured "lang item" is more widely used. (In the compiler output, "lang item" and "language item" seem to be pretty even.)
This commit is contained in:
commit
36316df9fe
37 changed files with 141 additions and 78 deletions
|
@ -535,7 +535,7 @@ pub fn check_intrinsic_type(
|
|||
|
||||
sym::va_start | sym::va_end => match mk_va_list_ty(hir::Mutability::Mut) {
|
||||
Some((va_list_ref_ty, _)) => (0, 0, vec![va_list_ref_ty], Ty::new_unit(tcx)),
|
||||
None => bug!("`va_list` language item needed for C-variadic intrinsics"),
|
||||
None => bug!("`va_list` lang item needed for C-variadic intrinsics"),
|
||||
},
|
||||
|
||||
sym::va_copy => match mk_va_list_ty(hir::Mutability::Not) {
|
||||
|
@ -543,12 +543,12 @@ pub fn check_intrinsic_type(
|
|||
let va_list_ptr_ty = Ty::new_mut_ptr(tcx, va_list_ty);
|
||||
(0, 0, vec![va_list_ptr_ty, va_list_ref_ty], Ty::new_unit(tcx))
|
||||
}
|
||||
None => bug!("`va_list` language item needed for C-variadic intrinsics"),
|
||||
None => bug!("`va_list` lang item needed for C-variadic intrinsics"),
|
||||
},
|
||||
|
||||
sym::va_arg => match mk_va_list_ty(hir::Mutability::Mut) {
|
||||
Some((va_list_ref_ty, _)) => (1, 0, vec![va_list_ref_ty], param(0)),
|
||||
None => bug!("`va_list` language item needed for C-variadic intrinsics"),
|
||||
None => bug!("`va_list` lang item needed for C-variadic intrinsics"),
|
||||
},
|
||||
|
||||
sym::nontemporal_store => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue