Skip to content

Commit 054009d

Browse files
committed
fix long line
1 parent b17e668 commit 054009d

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

tests/ui/rfc-2632-const-trait-impl/const-drop-fail-2.precise.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
22
--> $DIR/const-drop-fail-2.rs:31:23
33
|
4-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
4+
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
66
|
77
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
88
--> $DIR/const-drop-fail-2.rs:31:23
99
|
10-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
10+
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
note: required by a bound in `ConstDropImplWithBounds`
1313
--> $DIR/const-drop-fail-2.rs:21:35
@@ -16,30 +16,30 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
1616
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
1717

1818
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
19-
--> $DIR/const-drop-fail-2.rs:31:64
19+
--> $DIR/const-drop-fail-2.rs:33:5
2020
|
21-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
21+
LL | ConstDropImplWithBounds(PhantomData)
22+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
2323
|
2424
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
25-
--> $DIR/const-drop-fail-2.rs:31:64
25+
--> $DIR/const-drop-fail-2.rs:33:5
2626
|
27-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27+
LL | ConstDropImplWithBounds(PhantomData)
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929
note: required by a bound in `ConstDropImplWithBounds`
3030
--> $DIR/const-drop-fail-2.rs:21:35
3131
|
3232
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
3333
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
3434

3535
error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
36-
--> $DIR/const-drop-fail-2.rs:37:9
36+
--> $DIR/const-drop-fail-2.rs:39:9
3737
|
3838
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
3939
| ^^^^^^^^
4040
|
4141
note: the implementor must specify the same requirement
42-
--> $DIR/const-drop-fail-2.rs:35:1
42+
--> $DIR/const-drop-fail-2.rs:37:1
4343
|
4444
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
4545
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/rfc-2632-const-trait-impl/const-drop-fail-2.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
2828

2929
const fn check<T: ~const Destruct>(_: T) {}
3030

31-
const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
32-
//~^ ERROR the trait bound
33-
//~| ERROR the trait bound
31+
const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
32+
//~^ ERROR the trait bound
33+
ConstDropImplWithBounds(PhantomData)
34+
//~^ ERROR the trait bound
35+
);
3436

3537
struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
3638

tests/ui/rfc-2632-const-trait-impl/const-drop-fail-2.stock.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
22
--> $DIR/const-drop-fail-2.rs:31:23
33
|
4-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
4+
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
66
|
77
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
88
--> $DIR/const-drop-fail-2.rs:31:23
99
|
10-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
10+
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212
note: required by a bound in `ConstDropImplWithBounds`
1313
--> $DIR/const-drop-fail-2.rs:21:35
@@ -16,30 +16,30 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
1616
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
1717

1818
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
19-
--> $DIR/const-drop-fail-2.rs:31:64
19+
--> $DIR/const-drop-fail-2.rs:33:5
2020
|
21-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
21+
LL | ConstDropImplWithBounds(PhantomData)
22+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
2323
|
2424
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
25-
--> $DIR/const-drop-fail-2.rs:31:64
25+
--> $DIR/const-drop-fail-2.rs:33:5
2626
|
27-
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData));
28-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27+
LL | ConstDropImplWithBounds(PhantomData)
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929
note: required by a bound in `ConstDropImplWithBounds`
3030
--> $DIR/const-drop-fail-2.rs:21:35
3131
|
3232
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
3333
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
3434

3535
error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
36-
--> $DIR/const-drop-fail-2.rs:37:9
36+
--> $DIR/const-drop-fail-2.rs:39:9
3737
|
3838
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
3939
| ^^^^^^^^
4040
|
4141
note: the implementor must specify the same requirement
42-
--> $DIR/const-drop-fail-2.rs:35:1
42+
--> $DIR/const-drop-fail-2.rs:37:1
4343
|
4444
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
4545
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)