Skip to content

Conversation

estebank
Copy link
Contributor

Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add AssocItem::descr method to centralize where we call methods and associated functions.

Accurately refer to assoc fn without receiver as assoc fn instead of methods.
Add `AssocItem::descr` method to centralize where we call methods and associated functions.
@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2024

r? @Nadrieril

rustbot has assigned @Nadrieril.
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

@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. labels Aug 10, 2024
@compiler-errors
Copy link
Member

This is still inconsistent with DefKind::descr, which calls all associated functions "associated functions", but I guess that's less bad. All methods are associated functions, but not all associated functions are methods.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 10, 2024

📌 Commit 860c8cd has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors 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 Aug 10, 2024
@compiler-errors
Copy link
Member

Actually, no, we do call it a method as long as we go through tcx.def_kind_descr since 3d056c3.

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 10, 2024
…llaumeGomez

Rollup of 8 pull requests

Successful merges:

 - rust-lang#128273 (Improve `Ord` violation help)
 - rust-lang#128807 (run-make: explaing why fmt-write-bloat is ignore-windows)
 - rust-lang#128903 (rustdoc-json-types `Discriminant`: fix typo)
 - rust-lang#128905 (gitignore: Add Zed and Helix editors)
 - rust-lang#128908 (diagnostics: do not warn when a lifetime bound infers itself)
 - rust-lang#128909 (Fix dump-ice-to-disk for RUSTC_ICE=0 users)
 - rust-lang#128910 (Differentiate between methods and associated functions in diagnostics)
 - rust-lang#128923 ([rustdoc] Stop showing impl items for negative impls)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 50e9fd1 into rust-lang:master Aug 10, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 10, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 10, 2024
Rollup merge of rust-lang#128910 - estebank:assoc-fn, r=compiler-errors

Differentiate between methods and associated functions in diagnostics

Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add `AssocItem::descr` method to centralize where we call methods and associated functions.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants