Rollup merge of #95401 - c410-f3r:moar-tests, r=petrochenkov

Remove duplicated and unused test files

cc https://github.com/rust-lang/rust/issues/73494
r? `@petrochenkov`
This commit is contained in:
Dylan DPC 2022-03-28 16:08:12 +02:00 committed by GitHub
commit e5afe2b107
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 0 additions and 201 deletions

View file

@ -1,9 +0,0 @@
pub struct XEmpty1 {}
pub struct XEmpty2;
pub struct XEmpty6();
pub enum XE {
XEmpty3 {},
XEmpty4,
XEmpty5(),
}

View file

@ -1,5 +0,0 @@
// compile-flags:--cfg foo
#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "none"))]
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
#![feature(staged_api)]

View file

@ -1,22 +0,0 @@
// no-prefer-dynamic
// This aux-file will require the eh_personality function to be codegen'd, but
// it hasn't been defined just yet. Make sure we don't explode.
#![no_std]
#![crate_type = "rlib"]
struct A;
impl core::ops::Drop for A {
fn drop(&mut self) {}
}
pub fn foo() {
let _a = A;
panic!("wut");
}
mod std {
pub use core::{option, fmt};
}

View file

@ -1,9 +0,0 @@
pub struct Foo {
pub x: isize
}
impl Foo {
pub fn new() -> Foo {
Foo { x: 3 }
}
}

View file

@ -1,3 +0,0 @@
#![crate_type="lib"]
pub struct Au(pub isize);

View file

@ -1,28 +0,0 @@
#![crate_type = "lib"]
// used by the rpass test
#[derive(Copy, Clone)]
pub struct Struct;
#[derive(Copy, Clone)]
pub enum Unit {
UnitVariant,
Argument(Struct)
}
#[derive(Copy, Clone)]
pub struct TupleStruct(pub usize, pub &'static str);
// used by the cfail test
#[derive(Copy, Clone)]
pub struct StructWithFields {
foo: isize,
}
#[derive(Copy, Clone)]
pub enum EnumWithVariants {
EnumVariant,
EnumVariantArg(isize)
}

View file

@ -1,9 +0,0 @@
pub struct XEmpty1 {}
pub struct XEmpty2;
pub struct XEmpty6();
pub enum XE {
XEmpty3 {},
XEmpty4,
XEmpty5(),
}

View file

@ -1,4 +0,0 @@
fn main() {
let ref my_ref @ _ = 0;
*my_ref = 0; //~ ERROR cannot assign to `*my_ref`, which is behind a `&` reference [E0594]
}

View file

@ -1,11 +0,0 @@
error[E0594]: cannot assign to `*my_ref`, which is behind a `&` reference
--> $DIR/issue-51244.rs:3:5
|
LL | let ref my_ref @ _ = 0;
| -------------- help: consider changing this to be a mutable reference: `ref mut my_ref @ _`
LL | *my_ref = 0;
| ^^^^^^^^^^^ `my_ref` is a `&` reference, so the data it refers to cannot be written
error: aborting due to previous error
For more information about this error, try `rustc --explain E0594`.

View file

@ -1,39 +0,0 @@
// Various examples of structs whose fields are not well-formed.
#![allow(dead_code)]
trait Dummy<'a> {
type Out;
}
impl<'a, T> Dummy<'a> for T
where
T: 'a,
{
type Out = ();
}
type RequireOutlives<'a, T> = <T as Dummy<'a>>::Out;
enum Ref1<'a, T> {
Ref1Variant1(RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough
}
enum Ref2<'a, T> {
Ref2Variant1,
Ref2Variant2(isize, RequireOutlives<'a, T>), //~ ERROR the parameter type `T` may not live long enough
}
enum RefOk<'a, T: 'a> {
RefOkVariant1(&'a T),
}
// This is now well formed. RFC 2093
enum RefIndirect<'a, T> {
RefIndirectVariant1(isize, RefOk<'a, T>),
}
enum RefDouble<'a, 'b, T> {
RefDoubleVariant1(&'a RequireOutlives<'b, T>),
//~^ the parameter type `T` may not live long enough [E0309]
}
fn main() {}

View file

@ -1,28 +0,0 @@
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:17:18
|
LL | enum Ref1<'a, T> {
| - help: consider adding an explicit lifetime bound...: `T: 'a`
LL | Ref1Variant1(RequireOutlives<'a, T>),
| ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:22:25
|
LL | enum Ref2<'a, T> {
| - help: consider adding an explicit lifetime bound...: `T: 'a`
LL | Ref2Variant1,
LL | Ref2Variant2(isize, RequireOutlives<'a, T>),
| ^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/regions-enum-not-wf.rs:35:23
|
LL | enum RefDouble<'a, 'b, T> {
| - help: consider adding an explicit lifetime bound...: `T: 'b`
LL | RefDoubleVariant1(&'a RequireOutlives<'b, T>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0309`.

View file

@ -1,6 +0,0 @@
fn main() {
let f = |x| x * 3;
let a = f(); //~ ERROR E0057
let b = f(4);
let c = f(2, 3); //~ ERROR E0057
}

View file

@ -1,19 +0,0 @@
error[E0057]: this function takes 1 argument but 0 arguments were supplied
--> $DIR/E0057.rs:3:13
|
LL | let a = f();
| ^-- supplied 0 arguments
| |
| expected 1 argument
error[E0057]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/E0057.rs:5:13
|
LL | let c = f(2, 3);
| ^ - - supplied 2 arguments
| |
| expected 1 argument
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0057`.

View file

@ -1,9 +0,0 @@
pub struct A {
a: isize,
pub b: isize,
}
pub struct B {
pub a: isize,
b: isize,
}