mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
810324d1f3
They were originally called "opt-in, built-in traits" (OIBITs), but people realized that the name was too confusing and a mouthful, and so they were renamed to just "auto traits". The feature flag's name wasn't updated, though, so that's what this PR does. There are some other spots in the compiler that still refer to OIBITs, but I don't think changing those now is worth it since they are internal and not particularly relevant to this PR. Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
35 lines
854 B
Rust
35 lines
854 B
Rust
// See rsbegin.rs for details.
|
|
|
|
#![feature(no_core)]
|
|
#![feature(lang_items)]
|
|
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
|
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
#![crate_type = "rlib"]
|
|
#![no_core]
|
|
|
|
#[lang = "sized"]
|
|
trait Sized {}
|
|
#[lang = "sync"]
|
|
trait Sync {}
|
|
impl<T> Sync for T {}
|
|
#[lang = "copy"]
|
|
trait Copy {}
|
|
#[lang = "freeze"]
|
|
auto trait Freeze {}
|
|
|
|
#[lang = "drop_in_place"]
|
|
#[inline]
|
|
#[allow(unconditional_recursion)]
|
|
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
|
|
drop_in_place(to_drop);
|
|
}
|
|
|
|
#[cfg(all(target_os = "windows", target_arch = "x86", target_env = "gnu"))]
|
|
pub mod eh_frames {
|
|
// Terminate the frame unwind info section with a 0 as a sentinel;
|
|
// this would be the 'length' field in a real FDE.
|
|
#[no_mangle]
|
|
#[link_section = ".eh_frame"]
|
|
pub static __EH_FRAME_END__: u32 = 0;
|
|
}
|