-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
expect messages should follow our guidance #159751
Copy link
Copy link
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.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
It's very likely that this turns into a LLM honeypot issue, but...
#96033 added official guidance on messages for
.expectfour years ago. Many.expectmessages we write were either before the guidance existed or did not know of this guidance.I like the reasoning on the guidance, and I think we should be consistent. So here's a list of files containing user-facing doc
.expectmessages that can be fixed (E-easy):library/alloc/src/boxed.rs (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide #159882)
library/alloc/src/string.rs (Update expect messages in library/alloc/boxed.rs and library/alloc/string.rs to follow the style guide #159882)
library/alloc/src/collections/binary_heap/mod.rs (I'm just not liking the "why is the test harness" message) (@SzilvasiPeter)
library/alloc/src/collections/vec_deque/mod.rs
library/alloc/src/ffi/c_str.rs (@asder8215)
library/alloc/src/vec/mod.rs
library/core/src/primitive_docs.rs (@pluiee)
library/core/src/result.rs (@pluiee)
library/core/src/fmt/mod.rs
library/core/src/ptr/non_null.rs
Not listed: std, etc.
Please do not claim this issue, comment below and claim a subdirectory to work on would make it possible for multiple people to work on :D
What is more interesting is that there are many pre-existing
.expectmessages in our library code that use theexpectmessage wrongly, e.g.Poll::Ready(self.0.take().expect("Readypolled after completion"))inimpl<T> Future for Ready<T>, it would be nice if our messages change to be better (to say something like "Readyshould not be polled after completion" instead), but that is more user facing and takes more time to decide IMO:expectmessages