rust/src/test/ui/consts/unstable-const-fn-in-libcore.stderr

29 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-12-05 08:02:41 -06:00
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
2020-05-21 14:49:38 -05:00
--> $DIR/unstable-const-fn-in-libcore.rs:23:26
2019-12-05 08:02:41 -06:00
|
LL | Opt::None => f(),
| ^^^
error[E0493]: destructors cannot be evaluated at compile-time
2020-05-21 14:49:38 -05:00
--> $DIR/unstable-const-fn-in-libcore.rs:18:53
2019-12-05 08:02:41 -06:00
|
LL | const fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T {
| ^ constant functions cannot evaluate destructors
2020-06-20 15:38:57 -05:00
...
LL | }
| - value is dropped here
2019-12-05 08:02:41 -06:00
error[E0493]: destructors cannot be evaluated at compile-time
2020-05-21 14:49:38 -05:00
--> $DIR/unstable-const-fn-in-libcore.rs:18:47
2019-12-05 08:02:41 -06:00
|
LL | const fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T {
| ^^^^ constant functions cannot evaluate destructors
2020-06-20 15:38:57 -05:00
...
LL | }
| - value is dropped here
2019-12-05 08:02:41 -06:00
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0015, E0493.
For more information about an error, try `rustc --explain E0015`.