diff options
Diffstat (limited to 'src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr')
| -rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr | 33 | 
1 files changed, 15 insertions, 18 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr index d88bcdc89ad..fedb1ffdea9 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr @@ -1,17 +1,18 @@ -error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied +error[E0277]: can't drop `NonTrivialDrop` in const contexts --> $DIR/const-drop-fail.rs:43:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call ... LL | NonTrivialDrop, - | ^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop` + | ^^^^^^^^^^^^^^ expected an implementor of trait `~const Destruct` | + = note: the trait bound `NonTrivialDrop: ~const Destruct` is not satisfied note: required by a bound in `check` --> $DIR/const-drop-fail.rs:34:19 | -LL | const fn check<T: ~const Drop>(_: T) {} - | ^^^^^^^^^^^ required by this bound in `check` +LL | const fn check<T: ~const Destruct>(_: T) {} + | ^^^^^^^^^^^^^^^ required by this bound in `check` help: consider borrowing here | LL | &NonTrivialDrop, @@ -19,16 +20,16 @@ LL | &NonTrivialDrop, LL | &mut NonTrivialDrop, | ++++ -error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied in `ConstImplWithDropGlue` +error[E0277]: can't drop `NonTrivialDrop` in const contexts --> $DIR/const-drop-fail.rs:45:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call ... LL | ConstImplWithDropGlue(NonTrivialDrop), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Destruct` is not implemented for `NonTrivialDrop` | -note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const` +note: the trait `Destruct` is implemented for `NonTrivialDrop`, but that implementation is not `const` --> $DIR/const-drop-fail.rs:45:5 | LL | ConstImplWithDropGlue(NonTrivialDrop), @@ -41,28 +42,24 @@ LL | struct ConstImplWithDropGlue(NonTrivialDrop); note: required by a bound in `check` --> $DIR/const-drop-fail.rs:34:19 | -LL | const fn check<T: ~const Drop>(_: T) {} - | ^^^^^^^^^^^ required by this bound in `check` +LL | const fn check<T: ~const Destruct>(_: T) {} + | ^^^^^^^^^^^^^^^ required by this bound in `check` -error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: ~const Drop` is not satisfied +error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: ~const Destruct` is not satisfied --> $DIR/const-drop-fail.rs:47:5 | LL | const _: () = check($exp); | ----- required by a bound introduced by this call ... LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData), - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop` + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Destruct` | -note: required because of the requirements on the impl of `~const Drop` for `ConstDropImplWithBounds<NonTrivialDrop>` - --> $DIR/const-drop-fail.rs:28:25 - | -LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> { - | ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: required because of the requirements on the impl of `~const Destruct` for `ConstDropImplWithBounds<NonTrivialDrop>` note: required by a bound in `check` --> $DIR/const-drop-fail.rs:34:19 | -LL | const fn check<T: ~const Drop>(_: T) {} - | ^^^^^^^^^^^ required by this bound in `check` +LL | const fn check<T: ~const Destruct>(_: T) {} + | ^^^^^^^^^^^^^^^ required by this bound in `check` help: consider borrowing here | LL | &ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),  | 
