summaryrefslogtreecommitdiffstats
path: root/src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr')
-rw-r--r--src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr b/src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr
new file mode 100644
index 000000000..d8154f8d2
--- /dev/null
+++ b/src/test/ui/mir/drop-elaboration-after-borrowck-error.stderr
@@ -0,0 +1,60 @@
+error[E0493]: destructors cannot be evaluated at compile-time
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5
+ |
+LL | a[0] = String::new();
+ | ^^^^
+ | |
+ | statics cannot evaluate destructors
+ | value is dropped here
+
+error[E0493]: destructors cannot be evaluated at compile-time
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:5:9
+ |
+LL | let a: [String; 1];
+ | ^ statics cannot evaluate destructors
+...
+LL | };
+ | - value is dropped here
+
+error[E0381]: used binding `a` isn't initialized
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:7:5
+ |
+LL | let a: [String; 1];
+ | - binding declared here but left uninitialized
+LL |
+LL | a[0] = String::new();
+ | ^^^^ `a` used here but it isn't initialized
+
+error[E0493]: destructors cannot be evaluated at compile-time
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
+ |
+LL | self.0[0] = other;
+ | ^^^^^^^^^
+ | |
+ | constant functions cannot evaluate destructors
+ | value is dropped here
+
+error[E0493]: destructors cannot be evaluated at compile-time
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:16:13
+ |
+LL | let _this = self;
+ | ^^^^^ constant functions cannot evaluate destructors
+...
+LL | }
+ | - value is dropped here
+
+error[E0382]: use of moved value: `self.0`
+ --> $DIR/drop-elaboration-after-borrowck-error.rs:18:9
+ |
+LL | pub const fn f(mut self, other: T) -> Self {
+ | -------- move occurs because `self` has type `B<T>`, which does not implement the `Copy` trait
+LL | let _this = self;
+ | ---- value moved here
+LL |
+LL | self.0[0] = other;
+ | ^^^^^^^^^ value used here after move
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0381, E0382, E0493.
+For more information about an error, try `rustc --explain E0381`.