-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Description
Both stable 1.14 and nightly 2017-01-06.
playpen
struct A {}
impl A {
pub get(self) {}
}
(Edit: Above example is fixed as of 1.20.0, but free functions are affected.)
rustc 1.14.0 (e8a012324 2016-12-16)
error: can't qualify macro invocation with `pub`
--> <anon>:4:5
|
4 | pub get(self) {}
| ^^^
|
= help: try adjusting the macro to put `pub` inside the invocation
error: expected one of `!` or `::`, found `(`
--> <anon>:4:12
|
4 | pub get(self) {}
| ^
error: aborting due to previous error
while the actual issue is that the definition of get
is missing the fn
keyword.
ricejasonf
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics