diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/missing/missing-items | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/missing/missing-items')
7 files changed, 0 insertions, 197 deletions
diff --git a/src/test/ui/missing/missing-items/auxiliary/m1.rs b/src/test/ui/missing/missing-items/auxiliary/m1.rs deleted file mode 100644 index fcf52c9e887..00000000000 --- a/src/test/ui/missing/missing-items/auxiliary/m1.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub trait X { - const CONSTANT: u32; - type Type; - fn method(&self, s: String) -> Self::Type; - fn method2(self: Box<Self>, s: String) -> Self::Type; - fn method3(other: &Self, s: String) -> Self::Type; - fn method4(&self, other: &Self) -> Self::Type; - fn method5(self: &Box<Self>) -> Self::Type; -} diff --git a/src/test/ui/missing/missing-items/m2.rs b/src/test/ui/missing/missing-items/m2.rs deleted file mode 100644 index c2a6914abc9..00000000000 --- a/src/test/ui/missing/missing-items/m2.rs +++ /dev/null @@ -1,12 +0,0 @@ -// aux-build:m1.rs - - -extern crate m1; - -struct X { -} - -impl m1::X for X { //~ ERROR not all trait items implemented -} - -fn main() {} diff --git a/src/test/ui/missing/missing-items/m2.stderr b/src/test/ui/missing/missing-items/m2.stderr deleted file mode 100644 index d18fb443aa4..00000000000 --- a/src/test/ui/missing/missing-items/m2.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0046]: not all trait items implemented, missing: `CONSTANT`, `Type`, `method`, `method2`, `method3`, `method4`, `method5` - --> $DIR/m2.rs:9:1 - | -LL | impl m1::X for X { - | ^^^^^^^^^^^^^^^^ missing `CONSTANT`, `Type`, `method`, `method2`, `method3`, `method4`, `method5` in implementation - | - = help: implement the missing item: `const CONSTANT: u32 = 42;` - = help: implement the missing item: `type Type = Type;` - = help: implement the missing item: `fn method(&self, _: String) -> <Self as m1::X>::Type { todo!() }` - = help: implement the missing item: `fn method2(self: Box<Self>, _: String) -> <Self as m1::X>::Type { todo!() }` - = help: implement the missing item: `fn method3(_: &Self, _: String) -> <Self as m1::X>::Type { todo!() }` - = help: implement the missing item: `fn method4(&self, _: &Self) -> <Self as m1::X>::Type { todo!() }` - = help: implement the missing item: `fn method5(self: &Box<Self>) -> <Self as m1::X>::Type { todo!() }` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0046`. diff --git a/src/test/ui/missing/missing-items/missing-type-parameter.rs b/src/test/ui/missing/missing-items/missing-type-parameter.rs deleted file mode 100644 index 8a64053a4f0..00000000000 --- a/src/test/ui/missing/missing-items/missing-type-parameter.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn foo<X>() { } - -fn main() { - foo(); //~ ERROR type annotations needed -} diff --git a/src/test/ui/missing/missing-items/missing-type-parameter.stderr b/src/test/ui/missing/missing-items/missing-type-parameter.stderr deleted file mode 100644 index 722539fca6b..00000000000 --- a/src/test/ui/missing/missing-items/missing-type-parameter.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0282]: type annotations needed - --> $DIR/missing-type-parameter.rs:4:5 - | -LL | foo(); - | ^^^ cannot infer type of the type parameter `X` declared on the function `foo` - | -help: consider specifying the generic argument - | -LL | foo::<X>(); - | +++++ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0282`. diff --git a/src/test/ui/missing/missing-items/missing-type-parameter2.rs b/src/test/ui/missing/missing-items/missing-type-parameter2.rs deleted file mode 100644 index e9b32fb7198..00000000000 --- a/src/test/ui/missing/missing-items/missing-type-parameter2.rs +++ /dev/null @@ -1,19 +0,0 @@ -struct X<const N: u8>(); - -impl X<N> {} -//~^ ERROR cannot find type `N` in this scope -//~| ERROR unresolved item provided when a constant was expected -impl<T, const A: u8 = 2> X<N> {} -//~^ ERROR cannot find type `N` in this scope -//~| ERROR defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions -//~| ERROR unresolved item provided when a constant was expected - -fn foo(_: T) where T: Send {} -//~^ ERROR cannot find type `T` in this scope -//~| ERROR cannot find type `T` in this scope - -fn bar<const N: u8>(_: A) {} -//~^ ERROR cannot find type `A` in this scope - -fn main() { -} diff --git a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr b/src/test/ui/missing/missing-items/missing-type-parameter2.stderr deleted file mode 100644 index f33951c98bf..00000000000 --- a/src/test/ui/missing/missing-items/missing-type-parameter2.stderr +++ /dev/null @@ -1,121 +0,0 @@ -error[E0412]: cannot find type `N` in this scope - --> $DIR/missing-type-parameter2.rs:3:8 - | -LL | struct X<const N: u8>(); - | ------------------------ similarly named struct `X` defined here -LL | -LL | impl X<N> {} - | ^ - | -help: a struct with a similar name exists - | -LL | impl X<X> {} - | ~ -help: you might be missing a type parameter - | -LL | impl<N> X<N> {} - | +++ - -error[E0412]: cannot find type `N` in this scope - --> $DIR/missing-type-parameter2.rs:6:28 - | -LL | impl<T, const A: u8 = 2> X<N> {} - | - ^ - | | - | similarly named type parameter `T` defined here - | -help: a type parameter with a similar name exists - | -LL | impl<T, const A: u8 = 2> X<T> {} - | ~ -help: you might be missing a type parameter - | -LL | impl<T, const A: u8 = 2, N> X<N> {} - | +++ - -error[E0412]: cannot find type `T` in this scope - --> $DIR/missing-type-parameter2.rs:11:20 - | -LL | struct X<const N: u8>(); - | ------------------------ similarly named struct `X` defined here -... -LL | fn foo(_: T) where T: Send {} - | ^ - | -help: a struct with a similar name exists - | -LL | fn foo(_: T) where X: Send {} - | ~ -help: you might be missing a type parameter - | -LL | fn foo<T>(_: T) where T: Send {} - | +++ - -error[E0412]: cannot find type `T` in this scope - --> $DIR/missing-type-parameter2.rs:11:11 - | -LL | struct X<const N: u8>(); - | ------------------------ similarly named struct `X` defined here -... -LL | fn foo(_: T) where T: Send {} - | ^ - | -help: a struct with a similar name exists - | -LL | fn foo(_: X) where T: Send {} - | ~ -help: you might be missing a type parameter - | -LL | fn foo<T>(_: T) where T: Send {} - | +++ - -error[E0412]: cannot find type `A` in this scope - --> $DIR/missing-type-parameter2.rs:15:24 - | -LL | struct X<const N: u8>(); - | ------------------------ similarly named struct `X` defined here -... -LL | fn bar<const N: u8>(_: A) {} - | ^ - | -help: a struct with a similar name exists - | -LL | fn bar<const N: u8>(_: X) {} - | ~ -help: you might be missing a type parameter - | -LL | fn bar<const N: u8, A>(_: A) {} - | +++ - -error[E0747]: unresolved item provided when a constant was expected - --> $DIR/missing-type-parameter2.rs:3:8 - | -LL | impl X<N> {} - | ^ - | -help: if this generic argument was intended as a const parameter, surround it with braces - | -LL | impl X<{ N }> {} - | + + - -error: defaults for const parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions - --> $DIR/missing-type-parameter2.rs:6:9 - | -LL | impl<T, const A: u8 = 2> X<N> {} - | ^^^^^^^^^^^^^^^ - -error[E0747]: unresolved item provided when a constant was expected - --> $DIR/missing-type-parameter2.rs:6:28 - | -LL | impl<T, const A: u8 = 2> X<N> {} - | ^ - | -help: if this generic argument was intended as a const parameter, surround it with braces - | -LL | impl<T, const A: u8 = 2> X<{ N }> {} - | + + - -error: aborting due to 8 previous errors - -Some errors have detailed explanations: E0412, E0747. -For more information about an error, try `rustc --explain E0412`. |
