diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/static/static-drop-scope.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/static/static-drop-scope.stderr')
-rw-r--r-- | src/test/ui/static/static-drop-scope.stderr | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/src/test/ui/static/static-drop-scope.stderr b/src/test/ui/static/static-drop-scope.stderr new file mode 100644 index 000000000..ac32f217f --- /dev/null +++ b/src/test/ui/static/static-drop-scope.stderr @@ -0,0 +1,89 @@ +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:7:60 + | +LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); + | ^^^^^^^^- value is dropped here + | | + | statics cannot evaluate destructors + +error[E0716]: temporary value dropped while borrowed + --> $DIR/static-drop-scope.rs:7:60 + | +LL | static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor); + | ------^^^^^^^^- + | | | | + | | | temporary value is freed at the end of this statement + | | creates a temporary which is freed while still in use + | using this value as a static requires that borrow lasts for `'static` + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:11:59 + | +LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); + | ^^^^^^^^- value is dropped here + | | + | constants cannot evaluate destructors + +error[E0716]: temporary value dropped while borrowed + --> $DIR/static-drop-scope.rs:11:59 + | +LL | const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor); + | ------^^^^^^^^- + | | | | + | | | temporary value is freed at the end of this statement + | | creates a temporary which is freed while still in use + | using this value as a constant requires that borrow lasts for `'static` + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:15:28 + | +LL | static EARLY_DROP_S: i32 = (WithDtor, 0).1; + | ^^^^^^^^^^^^^ - value is dropped here + | | + | statics cannot evaluate destructors + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:18:27 + | +LL | const EARLY_DROP_C: i32 = (WithDtor, 0).1; + | ^^^^^^^^^^^^^ - value is dropped here + | | + | constants cannot evaluate destructors + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:21:24 + | +LL | const fn const_drop<T>(_: T) {} + | ^ - value is dropped here + | | + | constant functions cannot evaluate destructors + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:25:5 + | +LL | (x, ()).1 + | ^^^^^^^ constant functions cannot evaluate destructors +LL | +LL | } + | - value is dropped here + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:29:34 + | +LL | const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1; + | ^^^^^^^^^^^^^^^^^^^ - value is dropped here + | | + | constants cannot evaluate destructors + +error[E0493]: destructors cannot be evaluated at compile-time + --> $DIR/static-drop-scope.rs:34:43 + | +LL | const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1; + | ^^^^^^^^^^^ - value is dropped here + | | + | constants cannot evaluate destructors + +error: aborting due to 10 previous errors + +Some errors have detailed explanations: E0493, E0716. +For more information about an error, try `rustc --explain E0493`. |