diff options
| author | bors <bors@rust-lang.org> | 2017-04-21 14:02:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-21 14:02:37 +0000 |
| commit | 5695c3e9435a5872e23a6bb61c1ea0b3ada83eef (patch) | |
| tree | 8496a09a530afa6c2b2a5ead08b1d315abbbf590 /src/test | |
| parent | 4ed95009d8d5d50c4f7aee35ad89c30a2258ffa9 (diff) | |
| parent | 89bd3f39cadbbe0b361303ddbda2796ea7f39bb9 (diff) | |
Auto merge of #41349 - eddyb:ty-contents, r=nikomatsakis
rustc: replace TypeContents with two independent properties (is_freeze / needs_drop). `InteriorUnsafe` / `interior_unsafe` was replaced with a private lang-item `Freeze` auto trait in libcore. `OwnsDtor` / `needs_drop` was replaced with a specialized traversal that *doesn't* avoid caching results in case of a cycle, as the only cycles left can only occur in erroneous "types with infinite sizes", references and raw pointers not having destructors. Also, `Copy` is now checked at every step of the recursion. r? @nikomatsakis
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/simd-ffi/simd.rs | 6 | ||||
| -rw-r--r-- | src/test/run-make/target-specs/foo.rs | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/test/run-make/simd-ffi/simd.rs b/src/test/run-make/simd-ffi/simd.rs index 49fec6f3619..8ab8f471575 100644 --- a/src/test/run-make/simd-ffi/simd.rs +++ b/src/test/run-make/simd-ffi/simd.rs @@ -12,7 +12,7 @@ #![crate_type = "lib"] // we can compile to a variety of platforms, because we don't need // cross-compiled standard libraries. -#![feature(no_core)] +#![feature(no_core, optin_builtin_traits)] #![no_core] #![feature(repr_simd, simd_ffi, link_llvm_intrinsics, lang_items)] @@ -78,3 +78,7 @@ pub trait Copy { } pub mod marker { pub use Copy; } + +#[lang = "freeze"] +trait Freeze {} +impl Freeze for .. {} diff --git a/src/test/run-make/target-specs/foo.rs b/src/test/run-make/target-specs/foo.rs index 15b56977232..af24c3b460b 100644 --- a/src/test/run-make/target-specs/foo.rs +++ b/src/test/run-make/target-specs/foo.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(lang_items, no_core)] +#![feature(lang_items, no_core, optin_builtin_traits)] #![no_core] #[lang="copy"] @@ -17,6 +17,10 @@ trait Copy { } #[lang="sized"] trait Sized { } +#[lang = "freeze"] +trait Freeze {} +impl Freeze for .. {} + #[lang="start"] fn start(_main: *const u8, _argc: isize, _argv: *const *const u8) -> isize { 0 } |
