]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/unstable-const-fn-in-libcore.stderr
Rollup merge of #105843 - compiler-errors:sugg-const, r=lcnr
[rust.git] / src / test / ui / consts / unstable-const-fn-in-libcore.stderr
1 error[E0493]: destructor of `F` cannot be evaluated at compile-time
2   --> $DIR/unstable-const-fn-in-libcore.rs:17:60
3    |
4 LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
5    |                                                            ^ the destructor for this type cannot be evaluated in constant functions
6 ...
7 LL |     }
8    |     - value is dropped here
9
10 error[E0493]: destructor of `Opt<T>` cannot be evaluated at compile-time
11   --> $DIR/unstable-const-fn-in-libcore.rs:17:54
12    |
13 LL |     const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T {
14    |                                                      ^^^^ the destructor for this type cannot be evaluated in constant functions
15 ...
16 LL |     }
17    |     - value is dropped here
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0493`.