diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/consts/unstable-const-fn-in-libcore.stderr | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/test/ui/consts/unstable-const-fn-in-libcore.stderr b/src/test/ui/consts/unstable-const-fn-in-libcore.stderr index 180f9f10c..e5b00dd07 100644 --- a/src/test/ui/consts/unstable-const-fn-in-libcore.stderr +++ b/src/test/ui/consts/unstable-const-fn-in-libcore.stderr @@ -1,34 +1,21 @@ -error[E0015]: cannot call non-const closure in constant functions - --> $DIR/unstable-const-fn-in-libcore.rs:22:26 +error[E0493]: destructor of `F` cannot be evaluated at compile-time + --> $DIR/unstable-const-fn-in-libcore.rs:17:60 | -LL | Opt::None => f(), - | ^^^ - | - = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants -help: consider further restricting this bound - | -LL | const fn unwrap_or_else<F: FnOnce() -> T + ~const std::ops::FnOnce<()>>(self, f: F) -> T { - | +++++++++++++++++++++++++++++ - -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/unstable-const-fn-in-libcore.rs:17:53 - | -LL | const fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T { - | ^ constant functions cannot evaluate destructors +LL | const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T { + | ^ the destructor for this type cannot be evaluated in constant functions ... LL | } | - value is dropped here -error[E0493]: destructors cannot be evaluated at compile-time - --> $DIR/unstable-const-fn-in-libcore.rs:17:47 +error[E0493]: destructor of `Opt<T>` cannot be evaluated at compile-time + --> $DIR/unstable-const-fn-in-libcore.rs:17:54 | -LL | const fn unwrap_or_else<F: FnOnce() -> T>(self, f: F) -> T { - | ^^^^ constant functions cannot evaluate destructors +LL | const fn unwrap_or_else<F: ~const FnOnce() -> T>(self, f: F) -> T { + | ^^^^ the destructor for this type cannot be evaluated in constant functions ... LL | } | - value is dropped here -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors -Some errors have detailed explanations: E0015, E0493. -For more information about an error, try `rustc --explain E0015`. +For more information about this error, try `rustc --explain E0493`. |