Skip to content

Remind the programmer to use () for method calls #12937

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

Merged
merged 1 commit into from
Mar 17, 2014

Conversation

sinistersnare
Copy link
Contributor

its a common (yet easily fixable) error to just forget parens at the end of getter-like methods without any arguments.

The current error message for that case asks for an anonymous function, this patch adds a note asking for either an anonymous function, or for trailing parens.

This is my first contribution! do i need to do anything else?

@sinistersnare
Copy link
Contributor Author

How is "maybe a missing () to call it? If not, try writing an anonymous function"

the parens are wrapped in backticks, but github escaping kinda sucks.

@huonw
Copy link
Member

huonw commented Mar 16, 2014

@sinistersnare That's good.

@sinistersnare
Copy link
Contributor Author

OK, added test. I think this is good. r?

bors added a commit that referenced this pull request Mar 17, 2014
its a common (yet easily fixable) error to just forget parens at the end of getter-like methods without any arguments.

The current error message for that case asks for an anonymous function, this patch adds a note asking for either an anonymous function, or for trailing parens.

This is my first contribution! do i need to do anything else?
@bors bors closed this Mar 17, 2014
@bors bors merged commit 8b6592e into rust-lang:master Mar 17, 2014
@sinistersnare
Copy link
Contributor Author

Thanks so much @huonw for the help! That was awesome!

@sinistersnare sinistersnare deleted the method-error-message branch March 17, 2014 02:27
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 16, 2022
Add fixups for incomplete in proc-macros

Partially implements rust-lang/rust-analyzer#12777.

Added support for for loops and match statements.

I couldn't do paths like `crate::foo::` as I wasn't able to add `SyntheticTokens` to the end of `foo::`, they always ended up after `crate::`

This is my first contribution so please don't be shy about letting me know if I've done anything wrong!
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 27, 2024
…r_comparison, r=Alexendoo

Add MSRV for manual_pattern_char_comparison

Fixes rust-lang#12936

changelog: [`manual_pattern_char_comparison`]: Add MSRV 1.58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants