Skip to content

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

Merged
rust-bors[bot] merged 3 commits into
rust-lang:mainfrom
ElectrifyPro:20777-thing
Jun 28, 2026
Merged

Fix mixed use of "a" / "an" article in E0277#158518
rust-bors[bot] merged 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

@JonathanBrouwer JonathanBrouwer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I've always pronounced this Ef En closure, so the an article makes sense

@bors r+ rollup

View changes since this review

@rust-bors

rust-bors Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fd67621 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 28, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 28, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #158486 (std: treat ENFILE as transient in the pidfd support probe)
 - #158454 (regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion)
 - #158518 (Fix mixed use of "a" / "an" article in E0277)
 - #158519 (add crashtests [2/N])
rust-bors Bot pushed a commit that referenced this pull request Jun 28, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #158486 (std: treat ENFILE as transient in the pidfd support probe)
 - #158454 (regression test for `Trait<A><B>` in "consider further restricting this bound" suggestion)
 - #158518 (Fix mixed use of "a" / "an" article in E0277)
 - #158519 (add crashtests [2/N])
@rust-bors rust-bors Bot merged commit 5a890e9 into rust-lang:main Jun 28, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 28, 2026
@ElectrifyPro ElectrifyPro deleted the 20777-thing branch June 28, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants