File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/test/ui/rfc-2632-const-trait-impl/const-trait-bound-opt-out Expand file tree Collapse file tree 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 }
1515//~^ ERROR `?const` is not permitted in trait objects
1616//~| ERROR `?const` on trait bounds is not yet implemented
1717
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+
1822fn main ( ) { }
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ error: `?const` is not permitted in trait objects
1010LL | fn trait_object() -> &'static dyn ?const T { &S }
1111 | ^^^^^^^^
1212
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+
1319error: `?const` on trait bounds is not yet implemented
1420 --> $DIR/in-trait-object.rs:10:6
1521 |
@@ -22,5 +28,11 @@ error: `?const` on trait bounds is not yet implemented
2228LL | fn trait_object() -> &'static dyn ?const T { &S }
2329 | ^^^^^^^^
2430
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
2638
You can’t perform that action at this time.
0 commit comments