Remove lang items Send, UnwindSafe and RefUnwindSafe
This commit is contained in:
parent
6e0b554619
commit
3e569dd2df
5 changed files with 7 additions and 11 deletions
|
@ -348,7 +348,4 @@ language_item_table! {
|
|||
Range, sym::Range, range_struct, Target::Struct;
|
||||
RangeToInclusive, sym::RangeToInclusive, range_to_inclusive_struct, Target::Struct;
|
||||
RangeTo, sym::RangeTo, range_to_struct, Target::Struct;
|
||||
Send, sym::send, send_trait, Target::Trait;
|
||||
UnwindSafe, sym::unwind_safe, unwind_safe_trait, Target::Trait;
|
||||
RefUnwindSafe, sym::ref_unwind_safe, ref_unwind_safe_trait, Target::Trait;
|
||||
}
|
||||
|
|
|
@ -257,9 +257,6 @@ impl LanguageItemCollector<'tcx> {
|
|||
| LangItem::Unpin
|
||||
| LangItem::Termination
|
||||
| LangItem::Try
|
||||
| LangItem::Send
|
||||
| LangItem::UnwindSafe
|
||||
| LangItem::RefUnwindSafe
|
||||
=> Some(0),
|
||||
|
||||
// Not a trait
|
||||
|
|
|
@ -947,7 +947,7 @@ symbols! {
|
|||
receiver,
|
||||
recursion_limit,
|
||||
reexport_test_harness_main,
|
||||
ref_unwind_safe,
|
||||
ref_unwind_safe_trait,
|
||||
reference,
|
||||
reflect,
|
||||
reg,
|
||||
|
@ -1073,7 +1073,6 @@ symbols! {
|
|||
self_in_typedefs,
|
||||
self_struct_ctor,
|
||||
semitransparent,
|
||||
send,
|
||||
send_trait,
|
||||
shl,
|
||||
shl_assign,
|
||||
|
@ -1299,7 +1298,7 @@ symbols! {
|
|||
unused_qualifications,
|
||||
unwind,
|
||||
unwind_attributes,
|
||||
unwind_safe,
|
||||
unwind_safe_trait,
|
||||
unwrap,
|
||||
unwrap_or,
|
||||
use_extern_macros,
|
||||
|
|
|
@ -31,7 +31,10 @@ use crate::hash::Hasher;
|
|||
/// [ub]: ../../reference/behavior-considered-undefined.html
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[cfg_attr(not(test), rustc_diagnostic_item = "send_trait")]
|
||||
<<<<<<< HEAD
|
||||
#[lang = "send"]
|
||||
=======
|
||||
>>>>>>> Remove lang items Send, UnwindSafe and RefUnwindSafe
|
||||
#[rustc_on_unimplemented(
|
||||
message = "`{Self}` cannot be sent between threads safely",
|
||||
label = "`{Self}` cannot be sent between threads safely"
|
||||
|
|
|
@ -133,7 +133,7 @@ pub fn panic_any<M: 'static + Any + Send>(msg: M) -> ! {
|
|||
/// [`AssertUnwindSafe`] wrapper struct can be used to force this trait to be
|
||||
/// implemented for any closed over variables passed to `catch_unwind`.
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
#[cfg_attr(not(test), lang = "unwind_safe")]
|
||||
#[rustc_diagnostic_item = "unwind_safe_trait"]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "the type `{Self}` may not be safely transferred across an unwind boundary",
|
||||
label = "`{Self}` may not be safely transferred across an unwind boundary"
|
||||
|
@ -149,7 +149,7 @@ pub auto trait UnwindSafe {}
|
|||
/// This is a "helper marker trait" used to provide impl blocks for the
|
||||
/// [`UnwindSafe`] trait, for more information see that documentation.
|
||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||
#[cfg_attr(not(test), lang = "ref_unwind_safe")]
|
||||
#[rustc_diagnostic_item = "ref_unwind_safe_trait"]
|
||||
#[rustc_on_unimplemented(
|
||||
message = "the type `{Self}` may contain interior mutability and a reference may not be safely \
|
||||
transferrable across a catch_unwind boundary",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue