Syntax needed to disambiguate associated types in trait object bounds #48822
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-traits
Area: Trait system
A-typesystem
Area: The type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
WG-traits
Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804
Context: https://stackoverflow.com/questions/49143625/how-to-disambiguate-associated-types-in-trait-object-bounds
While fully qualified syntax allows me to disambiguate associated types in parameter and return types, I can't seem to use it for disambiguating associated types in trait object bounds. This came up while I tried to use a boxed
IEvent
fromstdweb
, which has supertraits ofTryFrom<Value>
andTryFrom<Reference>
. For example, with the following code:I get an error like:
I would expect to be able to disambiguate it with something like:
But this emits a syntax error:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: