]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/rfc-2632-const-trait-impl/const-trait-bound-opt-out/in-trait-object.stderr
Add test for `?const` in nested impl/dyn trait
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / const-trait-bound-opt-out / in-trait-object.stderr
index 19d52e51b3797e851c3da52b1d5ba3de4c5c71ce..c059f16902250c1bd74d870c2729988065f02071 100644 (file)
@@ -10,6 +10,12 @@ error: `?const` is not permitted in trait objects
 LL | fn trait_object() -> &'static dyn ?const T { &S }
    |                                   ^^^^^^^^
 
+error: `?const` is not permitted in trait objects
+  --> $DIR/in-trait-object.rs:18:61
+   |
+LL | fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
+   |                                                             ^^^^^^^^
+
 error: `?const` on trait bounds is not yet implemented
   --> $DIR/in-trait-object.rs:10:6
    |
@@ -22,5 +28,11 @@ error: `?const` on trait bounds is not yet implemented
 LL | fn trait_object() -> &'static dyn ?const T { &S }
    |                                   ^^^^^^^^
 
-error: aborting due to 4 previous errors
+error: `?const` on trait bounds is not yet implemented
+  --> $DIR/in-trait-object.rs:18:61
+   |
+LL | fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
+   |                                                             ^^^^^^^^
+
+error: aborting due to 6 previous errors