Skip to content

Improve error message when trying to use unsafe self #8306

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

Closed
dovreshef opened this issue Aug 5, 2013 · 2 comments
Closed

Improve error message when trying to use unsafe self #8306

dovreshef opened this issue Aug 5, 2013 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The lexing & parsing of Rust source code to an AST E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@dovreshef
Copy link

The error does not make it clear.

struct S;

impl S {
    fn foo(*mut self) { }
}

error: unexpected token: `*`
     fn foo(*mut self) {
            ^
@bblum
Copy link
Contributor

bblum commented Aug 5, 2013

Probably by design, but should at least give a better error message.

@brson
Copy link
Contributor

brson commented Aug 5, 2013

Updated title to make this about improving the error message.

@ghost ghost assigned AutomatedTester and bblum Aug 23, 2013
@bblum bblum closed this as completed in 02f93ca Aug 28, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 27, 2022
`trait_duplication_in_bounds` checks path segments for trait items

closes rust-lang#8306

changelog: [`trait_duplication_in_bounds`] Fix FP when path segments exists for trait items
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 A-parser Area: The lexing & parsing of Rust source code to an AST E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants