fix long line

This commit is contained in:
Deadbeef 2023-03-28 08:40:37 +00:00
parent b17e6680d6
commit 054009d17e
3 changed files with 25 additions and 23 deletions

View File

@ -1,13 +1,13 @@
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
--> $DIR/const-drop-fail-2.rs:31:23 --> $DIR/const-drop-fail-2.rs:31:23
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
| |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
--> $DIR/const-drop-fail-2.rs:31:23 --> $DIR/const-drop-fail-2.rs:31:23
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds` note: required by a bound in `ConstDropImplWithBounds`
--> $DIR/const-drop-fail-2.rs:21:35 --> $DIR/const-drop-fail-2.rs:21:35
@ -16,16 +16,16 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
--> $DIR/const-drop-fail-2.rs:31:64 --> $DIR/const-drop-fail-2.rs:33:5
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | ConstDropImplWithBounds(PhantomData)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
| |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
--> $DIR/const-drop-fail-2.rs:31:64 --> $DIR/const-drop-fail-2.rs:33:5
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | ConstDropImplWithBounds(PhantomData)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds` note: required by a bound in `ConstDropImplWithBounds`
--> $DIR/const-drop-fail-2.rs:21:35 --> $DIR/const-drop-fail-2.rs:21:35
| |
@ -33,13 +33,13 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
--> $DIR/const-drop-fail-2.rs:37:9 --> $DIR/const-drop-fail-2.rs:39:9
| |
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> { LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
| ^^^^^^^^ | ^^^^^^^^
| |
note: the implementor must specify the same requirement note: the implementor must specify the same requirement
--> $DIR/const-drop-fail-2.rs:35:1 --> $DIR/const-drop-fail-2.rs:37:1
| |
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>); LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -28,9 +28,11 @@ impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
const fn check<T: ~const Destruct>(_: T) {} const fn check<T: ~const Destruct>(_: T) {}
const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
//~^ ERROR the trait bound //~^ ERROR the trait bound
//~| ERROR the trait bound ConstDropImplWithBounds(PhantomData)
//~^ ERROR the trait bound
);
struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>); struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);

View File

@ -1,13 +1,13 @@
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
--> $DIR/const-drop-fail-2.rs:31:23 --> $DIR/const-drop-fail-2.rs:31:23
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
| |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
--> $DIR/const-drop-fail-2.rs:31:23 --> $DIR/const-drop-fail-2.rs:31:23
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds` note: required by a bound in `ConstDropImplWithBounds`
--> $DIR/const-drop-fail-2.rs:21:35 --> $DIR/const-drop-fail-2.rs:21:35
@ -16,16 +16,16 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
--> $DIR/const-drop-fail-2.rs:31:64 --> $DIR/const-drop-fail-2.rs:33:5
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | ConstDropImplWithBounds(PhantomData)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
| |
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
--> $DIR/const-drop-fail-2.rs:31:64 --> $DIR/const-drop-fail-2.rs:33:5
| |
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); LL | ConstDropImplWithBounds(PhantomData)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ConstDropImplWithBounds` note: required by a bound in `ConstDropImplWithBounds`
--> $DIR/const-drop-fail-2.rs:21:35 --> $DIR/const-drop-fail-2.rs:21:35
| |
@ -33,13 +33,13 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
--> $DIR/const-drop-fail-2.rs:37:9 --> $DIR/const-drop-fail-2.rs:39:9
| |
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> { LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
| ^^^^^^^^ | ^^^^^^^^
| |
note: the implementor must specify the same requirement note: the implementor must specify the same requirement
--> $DIR/const-drop-fail-2.rs:35:1 --> $DIR/const-drop-fail-2.rs:37:1
| |
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>); LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^