Open
Description
(Split off from discussion on #56188.)
There are a few places where the path std::prelude::v1
appears in diagnostic messages.
zmd@ReflectiveCoherence:~/Code/rust/src/test/ui$ ag std::prelude
[...]
27 matches
9 files contained matches
I argue that this is bad because the point of the prelude is to relieve the ordinary programmer from having to think about where necessities like Some
and Vec
live; the module std::prelude::v1
is an implementation detail that should be mentioned in places like the Book, but which I don't want to see cluttering up error messages.
We are manually stripping off the std::prelude::v1::
in a couple places (one, another proposed in open PR #56188), but we should:
- strip
std::prelude::v1::
for all diagnostic messagesdo so in a unified DRY way, rather than having that hardcoded string littering the codebase in several places
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
estebank commentedon Dec 17, 2018
I wouldn't mark this as
E-easy
because I believe the proper solution is dependent on #21934 and probably #14007 being addressed. Just stripping the text wouldn't be needed if we referred to types using the the local scope-dependent path instead of the fully qualified name.m-ou-se commentedon Mar 9, 2021
This is now also an issue for #82217, which uses a different prelude for edition 2021.
(Failure here: #82939 (comment))