Skip to content

where T: ?Sized doesn't parse #30550

Closed
Closed
@jonas-schievink

Description

@jonas-schievink

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions