Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distinguish the method and associated function diagnostic information #99064

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

lyming2007
Copy link

@lyming2007 lyming2007 commented Jul 8, 2022

Methods are defined within the context of a struct and their first parameter is always self
Associated functions don’t take self as a parameter

	modified:   compiler/rustc_typeck/src/check/method/suggest.rs
	modified:   src/test/ui/auto-ref-slice-plus-ref.stderr
	modified:   src/test/ui/block-result/issue-3563.stderr
	modified:   src/test/ui/issues/issue-28344.stderr
	modified:   src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
	modified:   src/test/ui/suggestions/suggest-methods.stderr
	modified:   src/test/ui/traits/trait-upcasting/subtrait-method.stderr

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 8, 2022
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nagisa (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 8, 2022
@rust-log-analyzer

This comment has been minimized.

Methods are defined within the context of a struct and their first parameter is always self
Associated functions don’t take self as a parameter
	modified:   compiler/rustc_typeck/src/check/method/suggest.rs
	modified:   src/test/ui/auto-ref-slice-plus-ref.stderr
	modified:   src/test/ui/block-result/issue-3563.stderr
	modified:   src/test/ui/issues/issue-28344.stderr
	modified:   src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
	modified:   src/test/ui/suggestions/suggest-methods.stderr
	modified:   src/test/ui/traits/trait-upcasting/subtrait-method.stderr
Copy link
Member

@nagisa nagisa left a comment

Choose a reason for hiding this comment

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

Seems okay, let me know if you don’t want/don’t have time to work on the potential improvements inline.

@nagisa
Copy link
Member

nagisa commented Jul 23, 2022

I’m gonna pass this over to…

r? @estebank

@rust-highfive rust-highfive assigned estebank and unassigned nagisa Jul 23, 2022
@nagisa nagisa added the A-diagnostics Area: Messages for errors, warnings, and lints label Jul 23, 2022
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Aug 25, 2022

📌 Commit 54d35e7 has been approved by estebank

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 25, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 25, 2022
distinguish the method and associated function diagnostic information

Methods are defined within the context of a struct and their first parameter is always self
Associated functions don’t take self as a parameter
```
	modified:   compiler/rustc_typeck/src/check/method/suggest.rs
	modified:   src/test/ui/auto-ref-slice-plus-ref.stderr
	modified:   src/test/ui/block-result/issue-3563.stderr
	modified:   src/test/ui/issues/issue-28344.stderr
	modified:   src/test/ui/suggestions/dont-suggest-pin-array-dot-set.stderr
	modified:   src/test/ui/suggestions/suggest-methods.stderr
	modified:   src/test/ui/traits/trait-upcasting/subtrait-method.stderr
```
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#99064 (distinguish the method and associated function diagnostic information)
 - rust-lang#99920 (Custom allocator support in `rustc_serialize`)
 - rust-lang#100034 ( Elaborate all box dereferences in `ElaborateBoxDerefs`)
 - rust-lang#100076 (make slice::{split_at,split_at_unchecked} const functions)
 - rust-lang#100604 (Remove unstable Result::into_ok_or_err)
 - rust-lang#100933 (Reduce code size of `assert_matches_failed`)
 - rust-lang#100978 (Handle `Err` in `ast::LitKind::to_token_lit`.)
 - rust-lang#101010 (rustdoc: remove unused CSS for `.multi-column`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f7f80c2 into rust-lang:master Aug 26, 2022
@rustbot rustbot added this to the 1.65.0 milestone Aug 26, 2022
@lyming2007 lyming2007 deleted the issue-97687-fix branch August 26, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints 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.

7 participants