-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
I've just stumbled about such an error:
an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
It seems that the second part of it is about syntax like this:
<SomeType as Into<i32>>::into( ... ))But these scenarios don't seem to be documented on the as page in the official docs:
https://doc.rust-lang.org/1.82.0/std/keyword.as.html
It states that as can be used only to "cast between types, or rename an import".
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.