Skip to content

Fix mixed use of "a" / "an" article in E0277#158518

Open
ElectrifyPro wants to merge 3 commits into
rust-lang:mainfrom
ElectrifyPro:20777-thing
Open

Fix mixed use of "a" / "an" article in E0277#158518
ElectrifyPro wants to merge 3 commits into
rust-lang:mainfrom
ElectrifyPro:20777-thing

Conversation

@ElectrifyPro

Copy link
Copy Markdown
Contributor

This PR fixes a tiny little annoyance typo in error E0277. Currently, this code fails to compile (correctly) with the following error:

struct A<F: Fn()>(F);

impl<F> A<F> {}

fn main() {}
error[E0277]: expected a `Fn()` closure, found `F`
 --> src/main.rs:3:9
  |
3 | impl<F> A<F> {}
  |         ^^^^ expected an `Fn()` closure, found `F`
  |
  = note: wrap the `F` in a closure with no arguments: `|| { /* code */ }`
... truncated

Unfortunately, the first line of the error message uses the article "a", when it should be "an" for the Fn trait and friends. The help label does use the correct article, "an".

Unless if I have been pronouncing Fn incorrectly...

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 28, 2026
@rustbot

rustbot commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 18 candidates

@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants