mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
Add test for ?const
in nested impl/dyn trait
This commit is contained in:
parent
14730ed445
commit
fd1c00348b
@ -15,4 +15,8 @@ fn trait_object() -> &'static dyn ?const T { &S }
|
||||
//~^ ERROR `?const` is not permitted in trait objects
|
||||
//~| ERROR `?const` on trait bounds is not yet implemented
|
||||
|
||||
fn trait_object_in_apit(_: impl IntoIterator<Item = Box<dyn ?const T>>) {}
|
||||
//~^ ERROR `?const` is not permitted in trait objects
|
||||
//~| ERROR `?const` on trait bounds is not yet implemented
|
||||
|
||||
fn main() {}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user