File tree 2 files changed +17
-1
lines changed
src/test/ui/rfc-2632-const-trait-impl/const-trait-bound-opt-out
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,8 @@ fn trait_object() -> &'static dyn ?const T { &S }
15
15
//~^ ERROR `?const` is not permitted in trait objects
16
16
//~| ERROR `?const` on trait bounds is not yet implemented
17
17
18
+ fn trait_object_in_apit ( _: impl IntoIterator < Item = Box < dyn ?const T > > ) { }
19
+ //~^ ERROR `?const` is not permitted in trait objects
20
+ //~| ERROR `?const` on trait bounds is not yet implemented
21
+
18
22
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ error: `?const` is not permitted in trait objects
10
10
LL | fn trait_object() -> &'static dyn ?const T { &S }
11
11
| ^^^^^^^^
12
12
13
+ error: `?const` is not permitted in trait objects
14
+ --> $DIR/in-trait-object.rs:18:61
15
+ |
16
+ LL | fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
17
+ | ^^^^^^^^
18
+
13
19
error: `?const` on trait bounds is not yet implemented
14
20
--> $DIR/in-trait-object.rs:10:6
15
21
|
@@ -22,5 +28,11 @@ error: `?const` on trait bounds is not yet implemented
22
28
LL | fn trait_object() -> &'static dyn ?const T { &S }
23
29
| ^^^^^^^^
24
30
25
- error: aborting due to 4 previous errors
31
+ error: `?const` on trait bounds is not yet implemented
32
+ --> $DIR/in-trait-object.rs:18:61
33
+ |
34
+ LL | fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
35
+ | ^^^^^^^^
36
+
37
+ error: aborting due to 6 previous errors
26
38
You can’t perform that action at this time.
0 commit comments