Skip to content

"unexpected end of macro invocation" error has a bogus span #12779

New issue

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

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

Already on GitHub? # to your account

Closed
sfackler opened this issue Mar 9, 2014 · 1 comment
Closed

"unexpected end of macro invocation" error has a bogus span #12779

sfackler opened this issue Mar 9, 2014 · 1 comment

Comments

@sfackler
Copy link
Member

sfackler commented Mar 9, 2014

fn main() { assert!() }
test.rs:1:1: 1:1 error: unexpected end of macro invocation
test.rs:1 fn main() { assert!() }
          ^

Does anyone know if this has ever worked? Did the recent change to spans break zero-width ones?

@alexcrichton
Copy link
Member

Closing as a dupe of #7970

fasterthanlime pushed a commit to fasterthanlime/rust that referenced this issue Jul 22, 2022
…=Veykril

fix: Correctly generate default `PartialEq::ne`

Fixes rust-lang#12779

For the `Generate default members` assist on the `PartialEq` trait, the assist will now give the default implementation instead of generating a function.
fasterthanlime pushed a commit to fasterthanlime/rust that referenced this issue Jul 26, 2022
…gen, r=Veykril

fix: don't replace default members' body

cc rust-lang#12779, rust-lang#12821
addresses rust-lang/rust-analyzer#12821 (comment)

`gen_trait_fn_body()` only attempts to implement required trait member functions, so we shouldn't call it for `Implement default members` assist.

This patch also documents the precondition of `gen_trait_fn_body()` and inserts `debug_assert!`, but I'm not entirely sure if the assertions are appropriate.
flip1995 pushed a commit to flip1995/rust that referenced this issue May 17, 2024
…ntic, r=y21

`assigning_clones`: move to `pedantic` so it is allow by default

In a nutshell, the `assigning_clones` lint suggests to make your code less readable for a small performance gain. See rust-lang#12778 for more motivation.

fixes rust-lang#12778

changelog: [`assigning_clones`]: move to the `pedantic` group
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants