Skip to content
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

where T: ?Sized doesn't parse #30550

Closed
jonas-schievink opened this issue Dec 24, 2015 · 1 comment
Closed

where T: ?Sized doesn't parse #30550

jonas-schievink opened this issue Dec 24, 2015 · 1 comment

Comments

@jonas-schievink
Copy link
Contributor

Example: http://is.gd/rB5WGc

RFC 490 says this should be accepted: https://github.com/rust-lang/rfcs/blob/master/text/0490-dst-syntax.md#detailed-design

Change the syntax for traits for dynamically-sized types to have a prefix ? instead of a postfix one:

trait Foo for ?Sized { ... }

Allow using this syntax in where clauses:

fn foo<T>(x: &T) where T: ?Sized { ... }

Note that, if the parser is changed to accept this, type collection needs to be fixed to look at where clauses instead of just type param bounds when figuring out if a Sized bound should be added.

@Stebalien
Copy link
Contributor

Duplicate of #20503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants