File tree 2 files changed +18
-0
lines changed
src/test/ui/rfc-2632-const-trait-impl
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
9
9
error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied
10
10
--> $DIR/const-drop-fail.rs:45:5
11
11
|
12
+ LL | const _: () = check($exp);
13
+ | ----- required by a bound introduced by this call
14
+ ...
12
15
LL | NonTrivialDrop,
13
16
| ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop`
14
17
|
@@ -21,6 +24,9 @@ LL | const fn check<T: ~const Drop>(_: T) {}
21
24
error[E0277]: the trait bound `ConstImplWithDropGlue: Drop` is not satisfied
22
25
--> $DIR/const-drop-fail.rs:47:5
23
26
|
27
+ LL | const _: () = check($exp);
28
+ | ----- required by a bound introduced by this call
29
+ ...
24
30
LL | ConstImplWithDropGlue(NonTrivialDrop),
25
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue`
26
32
|
@@ -45,6 +51,9 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
45
51
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
46
52
--> $DIR/const-drop-fail.rs:49:5
47
53
|
54
+ LL | const _: () = check($exp);
55
+ | ----- required by a bound introduced by this call
56
+ ...
48
57
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
49
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
50
59
|
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
9
9
error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied
10
10
--> $DIR/const-drop-fail.rs:45:5
11
11
|
12
+ LL | const _: () = check($exp);
13
+ | ----- required by a bound introduced by this call
14
+ ...
12
15
LL | NonTrivialDrop,
13
16
| ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop`
14
17
|
@@ -21,6 +24,9 @@ LL | const fn check<T: ~const Drop>(_: T) {}
21
24
error[E0277]: the trait bound `ConstImplWithDropGlue: Drop` is not satisfied
22
25
--> $DIR/const-drop-fail.rs:47:5
23
26
|
27
+ LL | const _: () = check($exp);
28
+ | ----- required by a bound introduced by this call
29
+ ...
24
30
LL | ConstImplWithDropGlue(NonTrivialDrop),
25
31
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue`
26
32
|
@@ -45,6 +51,9 @@ LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
45
51
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
46
52
--> $DIR/const-drop-fail.rs:49:5
47
53
|
54
+ LL | const _: () = check($exp);
55
+ | ----- required by a bound introduced by this call
56
+ ...
48
57
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
49
58
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
50
59
|
You can’t perform that action at this time.
0 commit comments