diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-12-05 21:00:57 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-12-05 21:00:57 +0100 |
| commit | c6086a8fd7489fa6cf18b7dd0baf73cf21386c77 (patch) | |
| tree | c288444224f71063fd78d41eabcfdcd57474d2fb /example | |
| parent | f0bb30f8a1ac6107555dfc8fe830d42f469af7f8 (diff) | |
| download | rust-c6086a8fd7489fa6cf18b7dd0baf73cf21386c77.tar.gz rust-c6086a8fd7489fa6cf18b7dd0baf73cf21386c77.zip | |
Rustup to rustc 1.41.0-nightly (6d77e45f0 2019-12-04)
Diffstat (limited to 'example')
| -rw-r--r-- | example/mini_core.rs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/example/mini_core.rs b/example/mini_core.rs index 1d8942c6ab2..1912cc50a21 100644 --- a/example/mini_core.rs +++ b/example/mini_core.rs @@ -1,6 +1,6 @@ #![feature( no_core, lang_items, intrinsics, unboxed_closures, type_ascription, extern_types, - untagged_unions, decl_macro, rustc_attrs, transparent_unions + untagged_unions, decl_macro, rustc_attrs, transparent_unions, optin_builtin_traits )] #![no_core] #![allow(dead_code)] @@ -76,7 +76,13 @@ unsafe impl<'a, T: ?Sized> Sync for &'a T {} unsafe impl Sync for [u8; 16] {} #[lang = "freeze"] -trait Freeze {} +unsafe auto trait Freeze {} + +unsafe impl<T: ?Sized> Freeze for PhantomData<T> {} +unsafe impl<T: ?Sized> Freeze for *const T {} +unsafe impl<T: ?Sized> Freeze for *mut T {} +unsafe impl<T: ?Sized> Freeze for &T {} +unsafe impl<T: ?Sized> Freeze for &mut T {} #[lang = "not"] pub trait Not { @@ -538,3 +544,10 @@ pub macro line() { /* compiler built-in */ } pub macro cfg() { /* compiler built-in */ } pub static A_STATIC: u8 = 42; + +#[lang = "panic_location"] +struct PanicLocation { + file: &'static str, + line: u32, + column: u32, +} |
