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

Bad parse error when omitting struct fields in constructor expression #8247

Closed
emberian opened this issue Aug 3, 2013 · 1 comment
Closed
Labels
A-parser Area: The parsing of Rust source code to an AST.

Comments

@emberian
Copy link
Member

emberian commented Aug 3, 2013

struct Foo {
    f: uint
}

fn foo() -> Foo {
    Foo {
        123,
    }
}
foo.rs:6:8: 6:9 error: expected `;` or `}` after expression but found `{`
foo.rs:6     Foo {
                 ^

I would expect something much more... helpful. (Yes, I'm tired and the bug is obvious, but it's still a silly error message!)

@jdm
Copy link
Contributor

jdm commented Aug 3, 2013

Dup of #4909.

@jdm jdm closed this as completed Aug 3, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 13, 2022
Fix `deref_addrof`

fixes rust-lang#8247

This would supersede rust-lang#8259

changelog: Don't lint `deref_addrof` when the dereference and the borrow occur in different contexts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST.
Projects
None yet
Development

No branches or pull requests

2 participants