diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2023-07-29 08:20:25 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2023-08-02 15:38:00 +0000 |
| commit | 4fec845c3f971c0ec77fccf460fe981fc50a7a12 (patch) | |
| tree | c0228ce7b0bc834b714e174fd63d7e46bcc7faf6 /tests/ui/impl-trait | |
| parent | 7637653b9fdd2b2f2dc3b378891eb5cf6aea9f5d (diff) | |
| download | rust-4fec845c3f971c0ec77fccf460fe981fc50a7a12.tar.gz rust-4fec845c3f971c0ec77fccf460fe981fc50a7a12.zip | |
Remove constness from `TraitPredicate`
Diffstat (limited to 'tests/ui/impl-trait')
| -rw-r--r-- | tests/ui/impl-trait/normalize-tait-in-const.stderr | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr index 06247e2ea1e..5fbba9a85ca 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.stderr +++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr @@ -1,3 +1,15 @@ +error[E0015]: cannot call non-const closure in constant functions + --> $DIR/normalize-tait-in-const.rs:26:5 + | +LL | fun(filter_positive()); + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants +help: consider further restricting this bound + | +LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct + ~const std::ops::Fn<(&Alias<'_>,)>>(fun: F) { + | ++++++++++++++++++++++++++++++++++++ + error[E0493]: destructor of `F` cannot be evaluated at compile-time --> $DIR/normalize-tait-in-const.rs:25:79 | @@ -7,6 +19,7 @@ LL | fun(filter_positive()); LL | } | - value is dropped here -error: aborting due to previous error +error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0493`. +Some errors have detailed explanations: E0015, E0493. +For more information about an error, try `rustc --explain E0015`. |
