about summary refs log tree commit diff
path: root/src/test/ui/explicit
diff options
context:
space:
mode:
authorAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-05 09:13:28 +0100
committerAlbert Larsan <74931857+albertlarsan68@users.noreply.github.com>2023-01-11 09:32:08 +0000
commitcf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch)
tree40a88d9a46aaf3e8870676eb2538378b75a263eb /src/test/ui/explicit
parentca855e6e42787ecd062d81d53336fe6788ef51a9 (diff)
downloadrust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz
rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip
Move /src/test to /tests
Diffstat (limited to 'src/test/ui/explicit')
-rw-r--r--src/test/ui/explicit/explicit-call-to-dtor.fixed16
-rw-r--r--src/test/ui/explicit/explicit-call-to-dtor.rs16
-rw-r--r--src/test/ui/explicit/explicit-call-to-dtor.stderr12
-rw-r--r--src/test/ui/explicit/explicit-call-to-supertrait-dtor.fixed26
-rw-r--r--src/test/ui/explicit/explicit-call-to-supertrait-dtor.rs26
-rw-r--r--src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr12
-rw-r--r--src/test/ui/explicit/explicit-self-lifetime-mismatch.rs20
-rw-r--r--src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr41
8 files changed, 0 insertions, 169 deletions
diff --git a/src/test/ui/explicit/explicit-call-to-dtor.fixed b/src/test/ui/explicit/explicit-call-to-dtor.fixed
deleted file mode 100644
index 91a4ca608da..00000000000
--- a/src/test/ui/explicit/explicit-call-to-dtor.fixed
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-rustfix
-struct Foo {
-    x: isize
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("kaboom");
-    }
-}
-
-fn main() {
-    let x = Foo { x: 3 };
-    println!("{}", x.x);
-    drop(x);   //~ ERROR explicit use of destructor method
-}
diff --git a/src/test/ui/explicit/explicit-call-to-dtor.rs b/src/test/ui/explicit/explicit-call-to-dtor.rs
deleted file mode 100644
index 0656871eb1b..00000000000
--- a/src/test/ui/explicit/explicit-call-to-dtor.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// run-rustfix
-struct Foo {
-    x: isize
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("kaboom");
-    }
-}
-
-fn main() {
-    let x = Foo { x: 3 };
-    println!("{}", x.x);
-    x.drop();   //~ ERROR explicit use of destructor method
-}
diff --git a/src/test/ui/explicit/explicit-call-to-dtor.stderr b/src/test/ui/explicit/explicit-call-to-dtor.stderr
deleted file mode 100644
index f3c9bf6cccd..00000000000
--- a/src/test/ui/explicit/explicit-call-to-dtor.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0040]: explicit use of destructor method
-  --> $DIR/explicit-call-to-dtor.rs:15:7
-   |
-LL |     x.drop();
-   |     --^^^^--
-   |     | |
-   |     | explicit destructor calls not allowed
-   |     help: consider using `drop` function: `drop(x)`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0040`.
diff --git a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.fixed b/src/test/ui/explicit/explicit-call-to-supertrait-dtor.fixed
deleted file mode 100644
index 47c4c9f67b6..00000000000
--- a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.fixed
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-rustfix
-struct Foo {
-    x: isize
-}
-
-#[allow(drop_bounds)]
-trait Bar: Drop {
-    fn blah(&self);
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("kaboom");
-    }
-}
-
-impl Bar for Foo {
-    fn blah(&self) {
-        drop(self);    //~ ERROR explicit use of destructor method
-    }
-}
-
-fn main() {
-    let x = Foo { x: 3 };
-    println!("{}", x.x);
-}
diff --git a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.rs b/src/test/ui/explicit/explicit-call-to-supertrait-dtor.rs
deleted file mode 100644
index c698de50c75..00000000000
--- a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-// run-rustfix
-struct Foo {
-    x: isize
-}
-
-#[allow(drop_bounds)]
-trait Bar: Drop {
-    fn blah(&self);
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {
-        println!("kaboom");
-    }
-}
-
-impl Bar for Foo {
-    fn blah(&self) {
-        self.drop();    //~ ERROR explicit use of destructor method
-    }
-}
-
-fn main() {
-    let x = Foo { x: 3 };
-    println!("{}", x.x);
-}
diff --git a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr b/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr
deleted file mode 100644
index 7f5106eb57e..00000000000
--- a/src/test/ui/explicit/explicit-call-to-supertrait-dtor.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0040]: explicit use of destructor method
-  --> $DIR/explicit-call-to-supertrait-dtor.rs:19:14
-   |
-LL |         self.drop();
-   |         -----^^^^--
-   |         |    |
-   |         |    explicit destructor calls not allowed
-   |         help: consider using `drop` function: `drop(self)`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0040`.
diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs b/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
deleted file mode 100644
index a9a6f50fb8e..00000000000
--- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-struct Foo<'a,'b> {
-    x: &'a isize,
-    y: &'b isize,
-}
-
-impl<'a,'b> Foo<'a,'b> {
-    fn bar(self:
-           Foo<'b,'a>
-    //~^ ERROR mismatched `self` parameter type
-    //~| expected struct `Foo<'a, 'b>`
-    //~| found struct `Foo<'b, 'a>`
-    //~| lifetime mismatch
-    //~| ERROR mismatched `self` parameter type
-    //~| expected struct `Foo<'a, 'b>`
-    //~| found struct `Foo<'b, 'a>`
-    //~| lifetime mismatch
-           ) {}
-}
-
-fn main() {}
diff --git a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr b/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr
deleted file mode 100644
index d5ffa8f1b2f..00000000000
--- a/src/test/ui/explicit/explicit-self-lifetime-mismatch.stderr
+++ /dev/null
@@ -1,41 +0,0 @@
-error[E0308]: mismatched `self` parameter type
-  --> $DIR/explicit-self-lifetime-mismatch.rs:8:12
-   |
-LL |            Foo<'b,'a>
-   |            ^^^^^^^^^^ lifetime mismatch
-   |
-   = note: expected struct `Foo<'a, 'b>`
-              found struct `Foo<'b, 'a>`
-note: the lifetime `'b` as defined here...
-  --> $DIR/explicit-self-lifetime-mismatch.rs:6:9
-   |
-LL | impl<'a,'b> Foo<'a,'b> {
-   |         ^^
-note: ...does not necessarily outlive the lifetime `'a` as defined here
-  --> $DIR/explicit-self-lifetime-mismatch.rs:6:6
-   |
-LL | impl<'a,'b> Foo<'a,'b> {
-   |      ^^
-
-error[E0308]: mismatched `self` parameter type
-  --> $DIR/explicit-self-lifetime-mismatch.rs:8:12
-   |
-LL |            Foo<'b,'a>
-   |            ^^^^^^^^^^ lifetime mismatch
-   |
-   = note: expected struct `Foo<'a, 'b>`
-              found struct `Foo<'b, 'a>`
-note: the lifetime `'a` as defined here...
-  --> $DIR/explicit-self-lifetime-mismatch.rs:6:6
-   |
-LL | impl<'a,'b> Foo<'a,'b> {
-   |      ^^
-note: ...does not necessarily outlive the lifetime `'b` as defined here
-  --> $DIR/explicit-self-lifetime-mismatch.rs:6:9
-   |
-LL | impl<'a,'b> Foo<'a,'b> {
-   |         ^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.