From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:13:28 +0100 Subject: Move /src/test to /tests --- src/test/ui/errors/issue-104621-extern-bad-file.rs | 8 ------ .../ui/errors/issue-104621-extern-bad-file.stderr | 21 --------------- src/test/ui/errors/issue-104621-extern-not-file.rs | 4 --- .../ui/errors/issue-104621-extern-not-file.stderr | 8 ------ .../issue-89280-emitter-overflow-splice-lines.rs | 10 ------- ...ssue-89280-emitter-overflow-splice-lines.stderr | 23 ---------------- .../ui/errors/issue-99572-impl-trait-on-pointer.rs | 25 ----------------- .../issue-99572-impl-trait-on-pointer.stderr | 31 ---------------------- 8 files changed, 130 deletions(-) delete mode 100644 src/test/ui/errors/issue-104621-extern-bad-file.rs delete mode 100644 src/test/ui/errors/issue-104621-extern-bad-file.stderr delete mode 100644 src/test/ui/errors/issue-104621-extern-not-file.rs delete mode 100644 src/test/ui/errors/issue-104621-extern-not-file.stderr delete mode 100644 src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.rs delete mode 100644 src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr delete mode 100644 src/test/ui/errors/issue-99572-impl-trait-on-pointer.rs delete mode 100644 src/test/ui/errors/issue-99572-impl-trait-on-pointer.stderr (limited to 'src/test/ui/errors') diff --git a/src/test/ui/errors/issue-104621-extern-bad-file.rs b/src/test/ui/errors/issue-104621-extern-bad-file.rs deleted file mode 100644 index 3f13d605232..00000000000 --- a/src/test/ui/errors/issue-104621-extern-bad-file.rs +++ /dev/null @@ -1,8 +0,0 @@ -// compile-flags: --extern foo={{src-base}}/errors/issue-104621-extern-bad-file.rs -// only-linux - -extern crate foo; -//~^ ERROR extern location for foo is of an unknown type -//~| ERROR file name should be lib*.rlib or lib*.so -//~| ERROR can't find crate for `foo` [E0463] -fn main() {} diff --git a/src/test/ui/errors/issue-104621-extern-bad-file.stderr b/src/test/ui/errors/issue-104621-extern-bad-file.stderr deleted file mode 100644 index b8500ad0e04..00000000000 --- a/src/test/ui/errors/issue-104621-extern-bad-file.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error: extern location for foo is of an unknown type: $DIR/issue-104621-extern-bad-file.rs - --> $DIR/issue-104621-extern-bad-file.rs:4:1 - | -LL | extern crate foo; - | ^^^^^^^^^^^^^^^^^ - -error: file name should be lib*.rlib or lib*.so - --> $DIR/issue-104621-extern-bad-file.rs:4:1 - | -LL | extern crate foo; - | ^^^^^^^^^^^^^^^^^ - -error[E0463]: can't find crate for `foo` - --> $DIR/issue-104621-extern-bad-file.rs:4:1 - | -LL | extern crate foo; - | ^^^^^^^^^^^^^^^^^ can't find crate - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0463`. diff --git a/src/test/ui/errors/issue-104621-extern-not-file.rs b/src/test/ui/errors/issue-104621-extern-not-file.rs deleted file mode 100644 index 899e45a306b..00000000000 --- a/src/test/ui/errors/issue-104621-extern-not-file.rs +++ /dev/null @@ -1,4 +0,0 @@ -// compile-flags: --extern foo=. - -extern crate foo; //~ ERROR extern location for foo is not a file: . -fn main() {} diff --git a/src/test/ui/errors/issue-104621-extern-not-file.stderr b/src/test/ui/errors/issue-104621-extern-not-file.stderr deleted file mode 100644 index 5aaf9741360..00000000000 --- a/src/test/ui/errors/issue-104621-extern-not-file.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: extern location for foo is not a file: . - --> $DIR/issue-104621-extern-not-file.rs:3:1 - | -LL | extern crate foo; - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.rs b/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.rs deleted file mode 100644 index a1c7af128d2..00000000000 --- a/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.rs +++ /dev/null @@ -1,10 +0,0 @@ -// check-pass - -trait X { - fn test(x: u32, ( -//~^ WARN anonymous parameters are deprecated and will be removed in the next edition -//~^^ WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - )) {} -} - -fn main() {} diff --git a/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr b/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr deleted file mode 100644 index 08eb8cfac49..00000000000 --- a/src/test/ui/errors/issue-89280-emitter-overflow-splice-lines.stderr +++ /dev/null @@ -1,23 +0,0 @@ -warning: anonymous parameters are deprecated and will be removed in the next edition - --> $DIR/issue-89280-emitter-overflow-splice-lines.rs:4:21 - | -LL | fn test(x: u32, ( - | _____________________^ -LL | | -LL | | -LL | | )) {} - | |_____^ - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #41686 - = note: `#[warn(anonymous_parameters)]` on by default -help: try naming the parameter or explicitly ignoring it - | -LL ~ fn test(x: u32, _: ( -LL + -LL + -LL ~ )) {} - | - -warning: 1 warning emitted - diff --git a/src/test/ui/errors/issue-99572-impl-trait-on-pointer.rs b/src/test/ui/errors/issue-99572-impl-trait-on-pointer.rs deleted file mode 100644 index 272c6bd3fb7..00000000000 --- a/src/test/ui/errors/issue-99572-impl-trait-on-pointer.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Emit additional suggestion to correct the trait implementation -// on a pointer -use std::{fmt, marker}; - -struct LocalType; - -impl fmt::Display for *mut LocalType { -//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types -//~| NOTE impl doesn't use only types from inside the current crate -//~| NOTE `*mut LocalType` is not defined in the current crate because raw pointers are always foreign -//~| NOTE define and implement a trait or new type instead -//~| HELP consider introducing a new wrapper type - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "This not compile") - } -} - -impl marker::Copy for *mut T { -//~^ ERROR only traits defined in the current crate can be implemented for arbitrary types -//~| NOTE impl doesn't use only types from inside the current crate -//~| NOTE `*mut T` is not defined in the current crate because raw pointers are always foreign -//~| NOTE define and implement a trait or new type instead -} - -fn main() {} diff --git a/src/test/ui/errors/issue-99572-impl-trait-on-pointer.stderr b/src/test/ui/errors/issue-99572-impl-trait-on-pointer.stderr deleted file mode 100644 index 78d7a47deaa..00000000000 --- a/src/test/ui/errors/issue-99572-impl-trait-on-pointer.stderr +++ /dev/null @@ -1,31 +0,0 @@ -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/issue-99572-impl-trait-on-pointer.rs:7:1 - | -LL | impl fmt::Display for *mut LocalType { - | ^^^^^^^^^^^^^^^^^^^^^^-------------- - | | | - | | `*mut LocalType` is not defined in the current crate because raw pointers are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead -help: consider introducing a new wrapper type - | -LL + struct WrapperType(*mut LocalType); -LL + -LL ~ impl fmt::Display for WrapperType { - | - -error[E0117]: only traits defined in the current crate can be implemented for arbitrary types - --> $DIR/issue-99572-impl-trait-on-pointer.rs:18:1 - | -LL | impl marker::Copy for *mut T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^------ - | | | - | | `*mut T` is not defined in the current crate because raw pointers are always foreign - | impl doesn't use only types from inside the current crate - | - = note: define and implement a trait or new type instead - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0117`. -- cgit 1.4.1-3-g733a5