tests: {Meta,Pointee}Sized in non-minicore tests
As before, add `MetaSized` and `PointeeSized` traits to all of the non-minicore `no_core` tests so that they don't fail for lack of language items.
This commit is contained in:
parent
c6d88a1892
commit
322cc31504
101 changed files with 616 additions and 172 deletions
|
|
@ -10,8 +10,12 @@
|
|||
#![feature(abi_ptx, lang_items, no_core)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@
|
|||
#![feature(abi_ptx, lang_items, no_core)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,12 @@
|
|||
#![feature(abi_ptx, lang_items, no_core)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,16 @@
|
|||
#![crate_type = "lib"]
|
||||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
// FIXME: Migrate these code after PR #130693 is landed.
|
||||
// vvvvv core
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
|
|
|||
|
|
@ -15,12 +15,17 @@
|
|||
#![no_core]
|
||||
#![crate_type = "lib"]
|
||||
#![allow(non_camel_case_types)]
|
||||
|
||||
// Cases where vector feature is disabled are rejected.
|
||||
// See tests/ui/simd-abi-checks-s390x.rs for test for them.
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
#[lang = "freeze"]
|
||||
|
|
|
|||
|
|
@ -19,8 +19,14 @@
|
|||
#![no_core]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "drop_in_place"]
|
||||
fn drop_in_place<T>(_: *mut T) {}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,14 @@ fn panic_div_overflow() -> ! {
|
|||
loop {}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,13 @@
|
|||
#![crate_type = "lib"]
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "freeze"]
|
||||
trait Freeze {}
|
||||
#[lang = "copy"]
|
||||
|
|
|
|||
|
|
@ -8,8 +8,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "freeze"]
|
||||
trait Freeze {}
|
||||
#[lang = "copy"]
|
||||
|
|
|
|||
|
|
@ -15,8 +15,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
unsafe extern "C-unwind" {
|
||||
safe fn unwinds();
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=armv7-unknown-linux-gnueabihf --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `aapcs` and
|
||||
// `aapcs-unwind` extern functions. `aapcs-unwind` functions MUST NOT have this attribute. We
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `fastcall` and
|
||||
// `fastcall-unwind` extern functions. `fastcall-unwind` functions MUST NOT have this attribute. We
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `stdcall` and `stdcall-unwind`
|
||||
// extern functions. `stdcall-unwind` functions MUST NOT have this attribute. We disable
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `sysv64` and
|
||||
// `sysv64-unwind` extern functions. `sysv64-unwind` functions MUST NOT have this attribute. We
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `thiscall` and
|
||||
// `thiscall-unwind` extern functions. `thiscall-unwind` functions MUST NOT have this attribute. We
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items, abi_vectorcall)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `vectorcall` and
|
||||
// `vectorcall-unwind` extern functions. `vectorcall-unwind` functions MUST NOT have this attribute.
|
||||
|
|
|
|||
|
|
@ -2,8 +2,15 @@
|
|||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=rlib -Cno-prepopulate-passes
|
||||
#![no_core]
|
||||
#![feature(no_core, lang_items)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Test that `nounwind` attributes are correctly applied to exported `win64` and
|
||||
// `win64-unwind` extern functions. `win64-unwind` functions MUST NOT have this attribute. We
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
//@ known-bug: #120033
|
||||
#![feature(non_lifetime_binders)]
|
||||
#![allow(sized_hierarchy_migration)]
|
||||
#![feature(sized_hierarchy)] // added to keep parameters unconstrained
|
||||
|
||||
pub trait Foo<T: ?Sized> {
|
||||
type Bar<K: ?Sized>;
|
||||
pub trait Foo<T: std::marker::PointeeSized> {
|
||||
type Bar<K: std::marker::PointeeSized>;
|
||||
}
|
||||
|
||||
pub struct Bar<T: ?AutoTrait> {}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
//@ compile-flags: -Cdebuginfo=2
|
||||
#![allow(sized_hierarchy_migration)]
|
||||
#![feature(sized_hierarchy)] // added to keep parameters unconstrained
|
||||
|
||||
pub trait Functor
|
||||
pub trait Functor: std::marker::PointeeSized
|
||||
{
|
||||
type With<T>: Functor;
|
||||
}
|
||||
|
|
@ -17,20 +19,20 @@ impl<T> Functor for Vec<T> {
|
|||
|
||||
pub struct Compose<F1, F2, T>(F1::With<F2::With<T>>)
|
||||
where
|
||||
F1: Functor + ?Sized,
|
||||
F2: Functor + ?Sized;
|
||||
F1: Functor + std::marker::PointeeSized,
|
||||
F2: Functor + std::marker::PointeeSized;
|
||||
|
||||
impl<F1, F2, T> Functor for Compose<F1, F2, T>
|
||||
where
|
||||
F1: Functor + ?Sized,
|
||||
F2: Functor + ?Sized
|
||||
F1: Functor + std::marker::PointeeSized,
|
||||
F2: Functor + std::marker::PointeeSized,
|
||||
{
|
||||
type With<T2> = F1::With<F2::With<T2>> ;
|
||||
}
|
||||
|
||||
pub enum Value<F>
|
||||
where
|
||||
F: Functor + ?Sized,
|
||||
F: Functor + std::marker::PointeeSized,
|
||||
{
|
||||
SignedInt(*mut F::With<i64>),
|
||||
Array(*mut Value<Compose<F, Vec<()>, ()>>),
|
||||
|
|
|
|||
|
|
@ -22,8 +22,14 @@ macro_rules! asm {
|
|||
};
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#![no_std]
|
||||
|
||||
// This is needed because of #![no_core]:
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[no_mangle]
|
||||
extern "gpu-kernel" fn kernel() {}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@ pub enum AtomicOrdering {
|
|||
#[rustc_intrinsic]
|
||||
unsafe fn atomic_xadd<T, const ORD: AtomicOrdering>(dst: *mut T, src: T) -> T;
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
#[lang = "freeze"]
|
||||
|
|
|
|||
|
|
@ -24,14 +24,20 @@ pub fn main() -> ! {
|
|||
|
||||
// FIXME: replace with proper minicore once available (#130693)
|
||||
mod minicore {
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
impl Copy for u32 {}
|
||||
impl Copy for &u32 {}
|
||||
impl<T: ?Sized> Copy for *mut T {}
|
||||
impl<T: PointeeSized> Copy for *mut T {}
|
||||
|
||||
pub mod ptr {
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn hello() {}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,14 @@ pub static mut STATIC_MUT_BOOL: bool = true;
|
|||
const CONST_BOOL: bool = true;
|
||||
pub static CONST_BOOL_REF: &'static bool = &CONST_BOOL;
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,12 @@
|
|||
#![crate_type = "lib"]
|
||||
|
||||
// This is needed because of #![no_core]:
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[link(name = "extern_1", kind = "raw-dylib")]
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -52,8 +52,14 @@ pub fn bar(a: i32x4, b: i32x4) -> i32x4 {
|
|||
unsafe { integer(a, b) }
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "freeze"]
|
||||
auto trait Freeze {}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,11 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
//~? ERROR the `-Zfixed-x18` flag is not supported on the `
|
||||
|
|
|
|||
|
|
@ -7,8 +7,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn foo() {}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@
|
|||
#![crate_type = "sdylib"]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
//~^ ERROR lang items are not allowed in stable dylibs
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
//~^ ERROR lang items are not allowed in stable dylibs
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
//~^ ERROR lang items are not allowed in stable dylibs
|
||||
trait Sized {}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
error: lang items are not allowed in stable dylibs
|
||||
--> $DIR/lang-item.rs:6:1
|
||||
|
|
||||
LL | #[lang = "pointee_sized"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: lang items are not allowed in stable dylibs
|
||||
--> $DIR/lang-item.rs:10:1
|
||||
|
|
||||
LL | #[lang = "meta_sized"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: lang items are not allowed in stable dylibs
|
||||
--> $DIR/lang-item.rs:14:1
|
||||
|
|
||||
LL | #[lang = "sized"]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@
|
|||
#![feature(lang_items, no_core, auto_traits)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//~? ERROR differs from LLVM target's
|
||||
|
|
|
|||
|
|
@ -29,8 +29,14 @@
|
|||
#![no_core]
|
||||
#![no_std]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
pub fn foo() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//[BADFLAGS]~? ERROR incorrect value `leaf` for unstable option `branch-protection`
|
||||
//[BADFLAGSPC]~? ERROR incorrect value `pc` for unstable option `branch-protection`
|
||||
|
|
|
|||
|
|
@ -4,9 +4,17 @@
|
|||
#![feature(no_core)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
//~^ ERROR: lang items are subject to change [E0658]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
//~^ ERROR: lang items are subject to change [E0658]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
//~^ ERROR: lang items are subject to change [E0658]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "fn"]
|
||||
//~^ ERROR: lang items are subject to change [E0658]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0573]: expected type, found built-in attribute `export_name`
|
||||
--> $DIR/issue-83471.rs:15:13
|
||||
--> $DIR/issue-83471.rs:23:13
|
||||
|
|
||||
LL | fn call(export_name);
|
||||
| ^^^^^^^^^^^ not a type
|
||||
|
|
@ -7,6 +7,24 @@ LL | fn call(export_name);
|
|||
error[E0658]: lang items are subject to change
|
||||
--> $DIR/issue-83471.rs:7:1
|
||||
|
|
||||
LL | #[lang = "pointee_sized"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(lang_items)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: lang items are subject to change
|
||||
--> $DIR/issue-83471.rs:11:1
|
||||
|
|
||||
LL | #[lang = "meta_sized"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(lang_items)]` to the crate attributes to enable
|
||||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: lang items are subject to change
|
||||
--> $DIR/issue-83471.rs:15:1
|
||||
|
|
||||
LL | #[lang = "sized"]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
@ -14,7 +32,7 @@ LL | #[lang = "sized"]
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
error[E0658]: lang items are subject to change
|
||||
--> $DIR/issue-83471.rs:11:1
|
||||
--> $DIR/issue-83471.rs:19:1
|
||||
|
|
||||
LL | #[lang = "fn"]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -23,7 +41,7 @@ LL | #[lang = "fn"]
|
|||
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
||||
|
||||
warning: anonymous parameters are deprecated and will be removed in the next edition
|
||||
--> $DIR/issue-83471.rs:15:13
|
||||
--> $DIR/issue-83471.rs:23:13
|
||||
|
|
||||
LL | fn call(export_name);
|
||||
| ^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: export_name`
|
||||
|
|
@ -33,7 +51,7 @@ LL | fn call(export_name);
|
|||
= note: `#[warn(anonymous_parameters)]` on by default
|
||||
|
||||
error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument
|
||||
--> $DIR/issue-83471.rs:11:1
|
||||
--> $DIR/issue-83471.rs:19:1
|
||||
|
|
||||
LL | #[lang = "fn"]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
@ -42,12 +60,12 @@ LL | trait Fn {
|
|||
| - this trait has 0 generic arguments
|
||||
|
||||
error[E0425]: cannot find function `a` in this scope
|
||||
--> $DIR/issue-83471.rs:21:5
|
||||
--> $DIR/issue-83471.rs:29:5
|
||||
|
|
||||
LL | a()
|
||||
| ^ not found in this scope
|
||||
|
||||
error: aborting due to 5 previous errors; 1 warning emitted
|
||||
error: aborting due to 7 previous errors; 1 warning emitted
|
||||
|
||||
Some errors have detailed explanations: E0425, E0573, E0658, E0718.
|
||||
For more information about an error, try `rustc --explain E0425`.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,14 @@
|
|||
|
||||
pub static STATIC_BOOL: bool = true;
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0718]: `drop_in_place` lang item must be applied to a function with at least 1 generic argument
|
||||
--> $DIR/issue-87573.rs:20:1
|
||||
--> $DIR/issue-87573.rs:26:1
|
||||
|
|
||||
LL | #[lang = "drop_in_place"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -8,7 +8,7 @@ LL | fn drop_fn() {
|
|||
| - this function has 0 generic arguments
|
||||
|
||||
error[E0718]: `start` lang item must be applied to a function with 1 generic argument
|
||||
--> $DIR/issue-87573.rs:26:1
|
||||
--> $DIR/issue-87573.rs:32:1
|
||||
|
|
||||
LL | #[lang = "start"]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#![feature(lang_items, no_core)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait MyPointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MyMetaSized: MyPointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait MySized {}
|
||||
trait MySized: MyMetaSized {}
|
||||
|
||||
#[lang = "add"]
|
||||
trait MyAdd<'a, T> {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0718]: `add` lang item must be applied to a trait with 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:10:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:16:1
|
||||
|
|
||||
LL | #[lang = "add"]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
@ -7,7 +7,7 @@ LL | trait MyAdd<'a, T> {}
|
|||
| ------- this trait has 2 generic arguments
|
||||
|
||||
error[E0718]: `drop_in_place` lang item must be applied to a function with at least 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:14:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:20:1
|
||||
|
|
||||
LL | #[lang = "drop_in_place"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -16,7 +16,7 @@ LL | fn my_ptr_drop() {}
|
|||
| - this function has 0 generic arguments
|
||||
|
||||
error[E0718]: `index` lang item must be applied to a trait with 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:18:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:24:1
|
||||
|
|
||||
LL | #[lang = "index"]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -24,7 +24,7 @@ LL | trait MyIndex<'a, T> {}
|
|||
| ------- this trait has 2 generic arguments
|
||||
|
||||
error[E0718]: `phantom_data` lang item must be applied to a struct with 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:22:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:28:1
|
||||
|
|
||||
LL | #[lang = "phantom_data"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -33,7 +33,7 @@ LL | struct MyPhantomData<T, U>;
|
|||
| ------ this struct has 2 generic arguments
|
||||
|
||||
error[E0718]: `owned_box` lang item must be applied to a struct with at least 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:28:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:34:1
|
||||
|
|
||||
LL | #[lang = "owned_box"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -42,7 +42,7 @@ LL | struct Foo;
|
|||
| - this struct has 0 generic arguments
|
||||
|
||||
error[E0718]: `start` lang item must be applied to a function with 1 generic argument
|
||||
--> $DIR/lang-item-generic-requirements.rs:34:1
|
||||
--> $DIR/lang-item-generic-requirements.rs:40:1
|
||||
|
|
||||
LL | #[lang = "start"]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
@ -51,7 +51,7 @@ LL | fn start(_: *const u8, _: isize, _: *const *const u8) -> isize {
|
|||
| - this function has 0 generic arguments
|
||||
|
||||
error[E0392]: type parameter `T` is never used
|
||||
--> $DIR/lang-item-generic-requirements.rs:24:22
|
||||
--> $DIR/lang-item-generic-requirements.rs:30:22
|
||||
|
|
||||
LL | struct MyPhantomData<T, U>;
|
||||
| ^ unused type parameter
|
||||
|
|
@ -60,7 +60,7 @@ LL | struct MyPhantomData<T, U>;
|
|||
= help: if you intended `T` to be a const parameter, use `const T: /* Type */` instead
|
||||
|
||||
error[E0392]: type parameter `U` is never used
|
||||
--> $DIR/lang-item-generic-requirements.rs:24:25
|
||||
--> $DIR/lang-item-generic-requirements.rs:30:25
|
||||
|
|
||||
LL | struct MyPhantomData<T, U>;
|
||||
| ^ unused type parameter
|
||||
|
|
@ -69,7 +69,7 @@ LL | struct MyPhantomData<T, U>;
|
|||
= help: if you intended `U` to be a const parameter, use `const U: /* Type */` instead
|
||||
|
||||
error[E0369]: cannot add `{integer}` to `{integer}`
|
||||
--> $DIR/lang-item-generic-requirements.rs:44:7
|
||||
--> $DIR/lang-item-generic-requirements.rs:50:7
|
||||
|
|
||||
LL | r + a;
|
||||
| - ^ - {integer}
|
||||
|
|
@ -77,13 +77,13 @@ LL | r + a;
|
|||
| {integer}
|
||||
|
||||
error[E0608]: cannot index into a value of type `[{integer}; 5]`
|
||||
--> $DIR/lang-item-generic-requirements.rs:52:16
|
||||
--> $DIR/lang-item-generic-requirements.rs:58:16
|
||||
|
|
||||
LL | let _ = arr[2];
|
||||
| ^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/lang-item-generic-requirements.rs:59:17
|
||||
--> $DIR/lang-item-generic-requirements.rs:65:17
|
||||
|
|
||||
LL | let _: () = Foo;
|
||||
| -- ^^^ expected `()`, found `Foo`
|
||||
|
|
@ -91,7 +91,7 @@ LL | let _: () = Foo;
|
|||
| expected due to this
|
||||
|
||||
error: requires `copy` lang_item
|
||||
--> $DIR/lang-item-generic-requirements.rs:50:16
|
||||
--> $DIR/lang-item-generic-requirements.rs:56:16
|
||||
|
|
||||
LL | let arr = [0; 5];
|
||||
| ^
|
||||
|
|
|
|||
|
|
@ -2,8 +2,14 @@
|
|||
#![no_core]
|
||||
#![no_main]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized { }
|
||||
trait Sized: MetaSized { }
|
||||
|
||||
struct S;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: requires `copy` lang_item
|
||||
--> $DIR/missing-copy-lang-item-issue-19660.rs:12:5
|
||||
--> $DIR/missing-copy-lang-item-issue-19660.rs:18:5
|
||||
|
|
||||
LL | argc
|
||||
| ^^^^
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:75:38
|
||||
--> $DIR/start_lang_item_args.rs:79:38
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: i8, _argv: *const *const u8, _sigpipe: u8) -> isize {
|
||||
| ^^ expected `isize`, found `i8`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:89:52
|
||||
--> $DIR/start_lang_item_args.rs:93:52
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: u8, _sigpipe: u8) -> isize {
|
||||
| ^^ expected `*const *const u8`, found `u8`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:82:52
|
||||
--> $DIR/start_lang_item_args.rs:86:52
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const usize, _sigpipe: u8) -> isize {
|
||||
| ^^^^^^^^^^^^^^^^^^^ expected `u8`, found `usize`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:61:1
|
||||
--> $DIR/start_lang_item_args.rs:65:1
|
||||
|
|
||||
LL | fn start<T>(_main: fn(i32) -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:68:20
|
||||
--> $DIR/start_lang_item_args.rs:72:20
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> u16, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
|
||||
| - ^^^^^^^^^^^ expected type parameter `T`, found `u16`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:54:20
|
||||
--> $DIR/start_lang_item_args.rs:58:20
|
||||
|
|
||||
LL | fn start<T>(_main: u64, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
|
||||
| ^^^ expected fn pointer, found `u64`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:15:1
|
||||
--> $DIR/start_lang_item_args.rs:19:1
|
||||
|
|
||||
LL | fn start<T>() -> isize {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:29:83
|
||||
--> $DIR/start_lang_item_args.rs:33:83
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) {}
|
||||
| ^ expected `isize`, found `()`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:22:1
|
||||
--> $DIR/start_lang_item_args.rs:26:1
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8) -> isize {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@
|
|||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[cfg(missing_all_args)]
|
||||
#[lang = "start"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:96:80
|
||||
--> $DIR/start_lang_item_args.rs:100:80
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: i64) -> isize {
|
||||
| ^^^ expected `u8`, found `i64`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:34:87
|
||||
--> $DIR/start_lang_item_args.rs:38:87
|
||||
|
|
||||
LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> u8 {
|
||||
| ^^ expected `isize`, found `u8`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: lang item `start` function has wrong type
|
||||
--> $DIR/start_lang_item_args.rs:41:1
|
||||
--> $DIR/start_lang_item_args.rs:45:1
|
||||
|
|
||||
LL | / fn start<T>(
|
||||
LL | |
|
||||
|
|
|
|||
|
|
@ -6,8 +6,15 @@
|
|||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "start"]
|
||||
#[target_feature(enable = "avx2")]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: `start` lang item function is not allowed to have `#[target_feature]`
|
||||
--> $DIR/start_lang_item_with_target_feature.rs:13:1
|
||||
--> $DIR/start_lang_item_with_target_feature.rs:20:1
|
||||
|
|
||||
LL | #[target_feature(enable = "avx2")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -11,5 +11,11 @@ fn panic() -> ! {
|
|||
loop {}
|
||||
}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
#![feature(lang_items, no_core)]
|
||||
#![no_core] // makes debugging this test *a lot* easier (during resolve)
|
||||
|
||||
#[lang="sized"]
|
||||
pub trait Sized {}
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang="copy"]
|
||||
pub trait Copy {}
|
||||
|
|
|
|||
|
|
@ -1,54 +1,54 @@
|
|||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:132:18
|
||||
--> $DIR/privacy1.rs:138:18
|
||||
|
|
||||
LL | use bar::baz::{foo, bar};
|
||||
| ^^^ private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:132:18
|
||||
--> $DIR/privacy1.rs:138:18
|
||||
|
|
||||
LL | use bar::baz::{foo, bar};
|
||||
| ^^^ private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:141:18
|
||||
--> $DIR/privacy1.rs:147:18
|
||||
|
|
||||
LL | use bar::baz;
|
||||
| ^^^ private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: module `i` is private
|
||||
--> $DIR/privacy1.rs:165:20
|
||||
--> $DIR/privacy1.rs:171:20
|
||||
|
|
||||
LL | use self::foo::i::A;
|
||||
| ^ private module
|
||||
|
|
||||
note: the module `i` is defined here
|
||||
--> $DIR/privacy1.rs:170:9
|
||||
--> $DIR/privacy1.rs:176:9
|
||||
|
|
||||
LL | mod i {
|
||||
| ^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:104:21
|
||||
--> $DIR/privacy1.rs:110:21
|
||||
|
|
||||
LL | crate::bar::baz::A::foo();
|
||||
| ^^^ - struct `A` is not publicly re-exported
|
||||
|
|
@ -56,13 +56,13 @@ LL | crate::bar::baz::A::foo();
|
|||
| private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:105:21
|
||||
--> $DIR/privacy1.rs:111:21
|
||||
|
|
||||
LL | crate::bar::baz::A::bar();
|
||||
| ^^^ - struct `A` is not publicly re-exported
|
||||
|
|
@ -70,13 +70,13 @@ LL | crate::bar::baz::A::bar();
|
|||
| private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:107:21
|
||||
--> $DIR/privacy1.rs:113:21
|
||||
|
|
||||
LL | crate::bar::baz::A.foo2();
|
||||
| ^^^ - unit struct `A` is not publicly re-exported
|
||||
|
|
@ -84,13 +84,13 @@ LL | crate::bar::baz::A.foo2();
|
|||
| private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:108:21
|
||||
--> $DIR/privacy1.rs:114:21
|
||||
|
|
||||
LL | crate::bar::baz::A.bar2();
|
||||
| ^^^ - unit struct `A` is not publicly re-exported
|
||||
|
|
@ -98,13 +98,13 @@ LL | crate::bar::baz::A.bar2();
|
|||
| private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: trait `B` is private
|
||||
--> $DIR/privacy1.rs:112:21
|
||||
--> $DIR/privacy1.rs:118:21
|
||||
|
|
||||
LL | crate::bar::B::foo();
|
||||
| ^ --- associated function `foo` is not publicly re-exported
|
||||
|
|
@ -112,31 +112,31 @@ LL | crate::bar::B::foo();
|
|||
| private trait
|
||||
|
|
||||
note: the trait `B` is defined here
|
||||
--> $DIR/privacy1.rs:40:5
|
||||
--> $DIR/privacy1.rs:46:5
|
||||
|
|
||||
LL | trait B {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0603]: function `epriv` is private
|
||||
--> $DIR/privacy1.rs:118:25
|
||||
--> $DIR/privacy1.rs:124:25
|
||||
|
|
||||
LL | crate::bar::epriv();
|
||||
| ^^^^^ private function
|
||||
|
|
||||
note: the function `epriv` is defined here
|
||||
--> $DIR/privacy1.rs:65:9
|
||||
--> $DIR/privacy1.rs:71:9
|
||||
|
|
||||
LL | fn epriv();
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:127:21
|
||||
--> $DIR/privacy1.rs:133:21
|
||||
|
|
||||
LL | crate::bar::baz::foo();
|
||||
| ^^^ private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
|
@ -147,13 +147,13 @@ LL + bar::foo();
|
|||
|
|
||||
|
||||
error[E0603]: module `baz` is private
|
||||
--> $DIR/privacy1.rs:128:21
|
||||
--> $DIR/privacy1.rs:134:21
|
||||
|
|
||||
LL | crate::bar::baz::bar();
|
||||
| ^^^ private module
|
||||
|
|
||||
note: the module `baz` is defined here
|
||||
--> $DIR/privacy1.rs:50:5
|
||||
--> $DIR/privacy1.rs:56:5
|
||||
|
|
||||
LL | mod baz {
|
||||
| ^^^^^^^
|
||||
|
|
@ -164,19 +164,19 @@ LL + bar::bar();
|
|||
|
|
||||
|
||||
error[E0603]: trait `B` is private
|
||||
--> $DIR/privacy1.rs:157:22
|
||||
--> $DIR/privacy1.rs:163:22
|
||||
|
|
||||
LL | impl crate::bar::B for f32 { fn foo() -> f32 { 1.0 } }
|
||||
| ^ private trait
|
||||
|
|
||||
note: the trait `B` is defined here
|
||||
--> $DIR/privacy1.rs:40:5
|
||||
--> $DIR/privacy1.rs:46:5
|
||||
|
|
||||
LL | trait B {
|
||||
| ^^^^^^^
|
||||
|
||||
error[E0624]: associated function `bar` is private
|
||||
--> $DIR/privacy1.rs:77:23
|
||||
--> $DIR/privacy1.rs:83:23
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| -------- private associated function defined here
|
||||
|
|
@ -185,7 +185,7 @@ LL | self::baz::A::bar();
|
|||
| ^^^ private associated function
|
||||
|
||||
error[E0624]: associated function `bar` is private
|
||||
--> $DIR/privacy1.rs:95:13
|
||||
--> $DIR/privacy1.rs:101:13
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| -------- private associated function defined here
|
||||
|
|
@ -194,7 +194,7 @@ LL | bar::A::bar();
|
|||
| ^^^ private associated function
|
||||
|
||||
error[E0624]: associated function `bar` is private
|
||||
--> $DIR/privacy1.rs:102:24
|
||||
--> $DIR/privacy1.rs:108:24
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| -------- private associated function defined here
|
||||
|
|
@ -203,7 +203,7 @@ LL | crate::bar::A::bar();
|
|||
| ^^^ private associated function
|
||||
|
||||
error[E0624]: associated function `bar` is private
|
||||
--> $DIR/privacy1.rs:105:29
|
||||
--> $DIR/privacy1.rs:111:29
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| -------- private associated function defined here
|
||||
|
|
@ -212,7 +212,7 @@ LL | crate::bar::baz::A::bar();
|
|||
| ^^^ private associated function
|
||||
|
||||
error[E0624]: method `bar2` is private
|
||||
--> $DIR/privacy1.rs:108:28
|
||||
--> $DIR/privacy1.rs:114:28
|
||||
|
|
||||
LL | fn bar2(&self) {}
|
||||
| -------------- private method defined here
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#![feature(lang_items, no_core)]
|
||||
#![no_core] // makes debugging this test *a lot* easier (during resolve)
|
||||
|
||||
#[lang = "sized"] pub trait Sized {}
|
||||
#[lang = "sized"] pub trait Sized: MetaSized {}
|
||||
#[lang = "meta_sized"] pub trait MetaSized: PointeeSized {}
|
||||
#[lang = "pointee_sized"] pub trait PointeeSized {}
|
||||
#[lang="copy"] pub trait Copy {}
|
||||
|
||||
// Test to make sure that private items imported through globs remain private
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
error[E0603]: module `glob` is private
|
||||
--> $DIR/privacy4.rs:21:14
|
||||
--> $DIR/privacy4.rs:23:14
|
||||
|
|
||||
LL | use bar::glob::gpriv;
|
||||
| ^^^^ private module
|
||||
|
|
||||
note: the module `glob` is defined here
|
||||
--> $DIR/privacy4.rs:13:5
|
||||
--> $DIR/privacy4.rs:15:5
|
||||
|
|
||||
LL | mod glob {
|
||||
| ^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -11,8 +11,15 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang="sized"]
|
||||
trait Sized {}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#![no_core]
|
||||
#![deny(aarch64_softfloat_neon)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[target_feature(enable = "neon")]
|
||||
//~^ERROR: enabling the `neon` target feature on the current target is unsound
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: enabling the `neon` target feature on the current target is unsound due to ABI issues
|
||||
--> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:11:18
|
||||
--> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:17:18
|
||||
|
|
||||
LL | #[target_feature(enable = "neon")]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
@ -16,7 +16,7 @@ error: aborting due to 1 previous error
|
|||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: enabling the `neon` target feature on the current target is unsound due to ABI issues
|
||||
--> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:11:18
|
||||
--> $DIR/abi-incompatible-target-feature-attribute-fcw.rs:17:18
|
||||
|
|
||||
LL | #[target_feature(enable = "neon")]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: target feature `d` cannot be enabled with `#[target_feature]`: this feature is incompatible with the target ABI
|
||||
--> $DIR/abi-incompatible-target-feature-attribute.rs:15:90
|
||||
--> $DIR/abi-incompatible-target-feature-attribute.rs:21:90
|
||||
|
|
||||
LL | #[cfg_attr(x86, target_feature(enable = "soft-float"))] #[cfg_attr(riscv, target_feature(enable = "d"))]
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
#![feature(no_core, lang_items, riscv_target_feature, x87_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: target feature `soft-float` cannot be enabled with `#[target_feature]`: this feature is incompatible with the target ABI
|
||||
--> $DIR/abi-incompatible-target-feature-attribute.rs:15:32
|
||||
--> $DIR/abi-incompatible-target-feature-attribute.rs:21:32
|
||||
|
|
||||
LL | #[cfg_attr(x86, target_feature(enable = "soft-float"))] #[cfg_attr(riscv, target_feature(enable = "d"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@
|
|||
#![feature(no_core, lang_items, riscv_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
#[lang = "freeze"]
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//~? WARN unstable feature specified for `-Ctarget-feature`: `x87`
|
||||
|
|
|
|||
|
|
@ -6,8 +6,14 @@
|
|||
#![feature(no_core, lang_items, x87_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[target_feature(enable = "x87")]
|
||||
pub unsafe fn my_fun() {}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,18 @@
|
|||
// Tests vetting "feature hierarchies" in the cases where we impose them.
|
||||
|
||||
// Supporting minimal rust core code
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
trait Copy {}
|
||||
|
||||
impl Copy for bool {}
|
||||
|
||||
#[stable(feature = "test", since = "1.0.0")]
|
||||
|
|
|
|||
|
|
@ -4,8 +4,14 @@
|
|||
#![feature(no_core, lang_items, riscv_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[target_feature(enable = "d")]
|
||||
//~^ERROR: cannot be enabled with
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: target feature `d` cannot be enabled with `#[target_feature]`: this feature is incompatible with the target ABI
|
||||
--> $DIR/forbidden-hardfloat-target-feature-attribute-e-d.rs:10:18
|
||||
--> $DIR/forbidden-hardfloat-target-feature-attribute-e-d.rs:16:18
|
||||
|
|
||||
LL | #[target_feature(enable = "d")]
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
#![feature(no_core, lang_items, riscv_target_feature)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: target feature `zfinx` cannot be enabled with `#[target_feature]`: this feature is incompatible with the target ABI
|
||||
--> $DIR/forbidden-hardfloat-target-feature-attribute-f-zfinx.rs:10:18
|
||||
--> $DIR/forbidden-hardfloat-target-feature-attribute-f-zfinx.rs:16:18
|
||||
|
|
||||
LL | #[target_feature(enable = "zdinx")]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
//@ compile-flags: --target=x86_64-unknown-linux-gnu --crate-type=lib
|
||||
//@ needs-llvm-components: x86
|
||||
//@ check-pass
|
||||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// The compile_error macro does not exist, so if the `cfg` evaluates to `true` this
|
||||
// complains about the missing macro rather than showing the error... but that's good enough.
|
||||
#[cfg(not(target_feature = "x87"))]
|
||||
compile_error!("the x87 feature *should* be exposed in `cfg`");
|
||||
|
|
@ -4,8 +4,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
#[target_feature(enable = "forced-atomics")]
|
||||
//~^ERROR: cannot be enabled with
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error: target feature `forced-atomics` cannot be enabled with `#[target_feature]`: unsound because it changes the ABI of atomic operations
|
||||
--> $DIR/forbidden-target-feature-attribute.rs:10:18
|
||||
--> $DIR/forbidden-target-feature-attribute.rs:16:18
|
||||
|
|
||||
LL | #[target_feature(enable = "forced-atomics")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
|||
|
|
@ -6,8 +6,14 @@
|
|||
#![no_core]
|
||||
#![allow(unexpected_cfgs)]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// The compile_error macro does not exist, so if the `cfg` evaluates to `true` this
|
||||
// complains about the missing macro rather than showing the error... but that's good enough.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//~? WARN target feature `forced-atomics` cannot be disabled with `-Ctarget-feature`: unsound because it changes the ABI of atomic operations
|
||||
|
|
|
|||
|
|
@ -8,7 +8,13 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//~? WARN target feature `forced-atomics` cannot be enabled with `-Ctarget-feature`: unsound because it changes the ABI of atomic operations
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized {}
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
//~? WARN target feature `sse2` must be enabled to ensure that the ABI of the current target can be implemented correctly
|
||||
|
|
|
|||
|
|
@ -14,8 +14,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang="sized"]
|
||||
trait Sized {}
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
fn main() {}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang="sized"]
|
||||
trait Sized {}
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// In this test, demonstrate that +paca and +pacg both result in the tied feature error if there
|
||||
// isn't something causing an error.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0428]: the name `foo` is defined multiple times
|
||||
--> $DIR/tied-features-no-implication.rs:27:1
|
||||
--> $DIR/tied-features-no-implication.rs:33:1
|
||||
|
|
||||
LL | fn foo() {}
|
||||
| -------- previous definition of the value `foo` here
|
||||
|
|
|
|||
|
|
@ -7,8 +7,14 @@
|
|||
#![feature(no_core, lang_items)]
|
||||
#![no_core]
|
||||
|
||||
#[lang="sized"]
|
||||
trait Sized {}
|
||||
#[lang = "pointee_sized"]
|
||||
pub trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
pub trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
pub trait Sized: MetaSized {}
|
||||
|
||||
// Can't use `compile_error!` here without `core`/`std` but requiring these makes this test only
|
||||
// work if you have libcore built in the sysroot for `aarch64-unknown-linux-gnu`. Can't run this
|
||||
|
|
|
|||
|
|
@ -5,8 +5,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "default_trait1"]
|
||||
auto trait DefaultTrait1 {}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0277]: the trait bound `Forbidden: SyncDrop` is not satisfied
|
||||
--> $DIR/default-bounds.rs:37:9
|
||||
--> $DIR/default-bounds.rs:43:9
|
||||
|
|
||||
LL | bar(Forbidden);
|
||||
| --- ^^^^^^^^^ the trait `SyncDrop` is not implemented for `Forbidden`
|
||||
|
|
@ -7,13 +7,13 @@ LL | bar(Forbidden);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `bar`
|
||||
--> $DIR/default-bounds.rs:33:8
|
||||
--> $DIR/default-bounds.rs:39:8
|
||||
|
|
||||
LL | fn bar<T: Leak>(_: T) {}
|
||||
| ^ required by this bound in `bar`
|
||||
|
||||
error[E0277]: the trait bound `Forbidden: Leak` is not satisfied
|
||||
--> $DIR/default-bounds.rs:37:9
|
||||
--> $DIR/default-bounds.rs:43:9
|
||||
|
|
||||
LL | bar(Forbidden);
|
||||
| --- ^^^^^^^^^ the trait `Leak` is not implemented for `Forbidden`
|
||||
|
|
@ -21,7 +21,7 @@ LL | bar(Forbidden);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `bar`
|
||||
--> $DIR/default-bounds.rs:33:11
|
||||
--> $DIR/default-bounds.rs:39:11
|
||||
|
|
||||
LL | fn bar<T: Leak>(_: T) {}
|
||||
| ^^^^ required by this bound in `bar`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0277]: the trait bound `extern_non_leak::Opaque: Leak` is not satisfied
|
||||
--> $DIR/extern-types.rs:44:13
|
||||
--> $DIR/extern-types.rs:50:13
|
||||
|
|
||||
LL | foo(x);
|
||||
| --- ^ the trait `Leak` is not implemented for `extern_non_leak::Opaque`
|
||||
|
|
@ -7,7 +7,7 @@ LL | foo(x);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `foo`
|
||||
--> $DIR/extern-types.rs:20:8
|
||||
--> $DIR/extern-types.rs:26:8
|
||||
|
|
||||
LL | fn foo<T: ?Sized>(_: &T) {}
|
||||
| ^ required by this bound in `foo`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0277]: the trait bound `extern_non_leak::Opaque: Leak` is not satisfied
|
||||
--> $DIR/extern-types.rs:44:13
|
||||
--> $DIR/extern-types.rs:50:13
|
||||
|
|
||||
LL | foo(x);
|
||||
| --- ^ the trait `Leak` is not implemented for `extern_non_leak::Opaque`
|
||||
|
|
@ -7,7 +7,7 @@ LL | foo(x);
|
|||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `foo`
|
||||
--> $DIR/extern-types.rs:20:8
|
||||
--> $DIR/extern-types.rs:26:8
|
||||
|
|
||||
LL | fn foo<T: ?Sized>(_: &T) {}
|
||||
| ^ required by this bound in `foo`
|
||||
|
|
|
|||
|
|
@ -7,8 +7,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "copy"]
|
||||
pub trait Copy {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
error[E0277]: the trait bound `NonLeakS: Leak` is not satisfied
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:53:25
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:59:25
|
||||
|
|
||||
LL | let _: &dyn Trait = &NonLeakS;
|
||||
| ^^^^^^^^^ the trait `Leak` is not implemented for `NonLeakS`
|
||||
|
|
@ -7,13 +7,13 @@ LL | let _: &dyn Trait = &NonLeakS;
|
|||
= note: required for the cast from `&NonLeakS` to `&dyn Trait + Leak`
|
||||
|
||||
error[E0277]: the trait bound `dyn Trait: Leak` is not satisfied
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:58:7
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:64:7
|
||||
|
|
||||
LL | x.leak_foo();
|
||||
| ^^^^^^^^ the trait `Leak` is not implemented for `dyn Trait`
|
||||
|
|
||||
note: required by a bound in `Trait::leak_foo`
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:45:5
|
||||
--> $DIR/maybe-bounds-in-dyn-traits.rs:51:5
|
||||
|
|
||||
LL | fn leak_foo(&self) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Trait::leak_foo`
|
||||
|
|
|
|||
|
|
@ -14,8 +14,14 @@
|
|||
#![no_std]
|
||||
#![no_core]
|
||||
|
||||
#[lang = "pointee_sized"]
|
||||
trait PointeeSized {}
|
||||
|
||||
#[lang = "meta_sized"]
|
||||
trait MetaSized: PointeeSized {}
|
||||
|
||||
#[lang = "sized"]
|
||||
trait Sized {}
|
||||
trait Sized: MetaSized {}
|
||||
|
||||
#[lang = "legacy_receiver"]
|
||||
trait LegacyReceiver {}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue