Can 'lifetime
become a valid "trait object" type?
#39298
Labels
A-parser
Area: The lexing & parsing of Rust source code to an AST
I'm going to fix #39085 by accepting arbitrary bound lists as trait object types and trying to figure out future compatibility concerns.
Consider these examples:
As you can see there are two interesting cases - the list is empty and the list contains a single lifetime bound.
I'm not seriously considering *nothing* becoming accepted as a valid type at parse time, but
'lifetime
case is more ambiguous.I don't see syntactic or semantic reasons to prohibit something like plain
'static
from being used inimpl Trait
type or an object type, maybe it can even be useful sometimes? So far I'm going to structure the parsing code with this possibility in mind.cc @nikomatsakis @eddyb
The text was updated successfully, but these errors were encountered: