Skip to content

Parse the syntax described in RFC 2632 #67820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add test for ?const in nested impl/dyn trait
  • Loading branch information
ecstatic-morse committed Jan 10, 2020
commit fd1c00348b7b3521f7340a2d034b32406229fe1b
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand All @@ -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