about summary refs log tree commit diff
path: root/tests/ui/consts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts')
-rw-r--r--tests/ui/consts/const-block-const-bound.rs6
-rw-r--r--tests/ui/consts/const-block-const-bound.stderr18
2 files changed, 2 insertions, 22 deletions
diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs
index 42aa0216b87..3704a1a5a39 100644
--- a/tests/ui/consts/const-block-const-bound.rs
+++ b/tests/ui/consts/const-block-const-bound.rs
@@ -11,15 +11,9 @@ impl Drop for UnconstDrop {
     fn drop(&mut self) {}
 }
 
-struct NonDrop;
-
-impl !Drop for NonDrop {}
-
 fn main() {
     const {
         f(UnconstDrop);
         //~^ ERROR can't drop
-        f(NonDrop);
-        //~^ ERROR can't drop
     }
 }
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr
index fef4914fad5..caf24e7afcf 100644
--- a/tests/ui/consts/const-block-const-bound.stderr
+++ b/tests/ui/consts/const-block-const-bound.stderr
@@ -1,5 +1,5 @@
 error[E0277]: can't drop `UnconstDrop` in const contexts
-  --> $DIR/const-block-const-bound.rs:20:9
+  --> $DIR/const-block-const-bound.rs:16:9
    |
 LL |         f(UnconstDrop);
    |         ^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop`
@@ -12,20 +12,6 @@ LL |         &f(UnconstDrop);
 LL |         &mut f(UnconstDrop);
    |         ++++
 
-error[E0277]: can't drop `NonDrop` in const contexts
-  --> $DIR/const-block-const-bound.rs:22:9
-   |
-LL |         f(NonDrop);
-   |         ^^^^^^^^^^ the trait `~const Destruct` is not implemented for `NonDrop`
-   |
-   = note: the trait bound `NonDrop: ~const Destruct` is not satisfied
-help: consider borrowing here
-   |
-LL |         &f(NonDrop);
-   |         +
-LL |         &mut f(NonDrop);
-   |         ++++
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0277`.