You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unexpected token in input when proptest! in file #6747
I just updated my rust analyzer, and now every file (at least in this project) gets the error unexpected token in input. The project is https://github.com/pubgrub-rs/pubgrub, and @lnicola can reproduce. They think it is the use of proptest!. I don't know how to be more helpful.
I don't know if it's the same bug, but my advent of code project also has unexpected token in input in every solution in src/bin because of the macro usage. And they all have incorrect span information, pointing to the first line. https://github.com/crumblingstatue/advent-of-code
Had the same issue; can confirm that the suggestion removes the problem for now. In my case, the error was could not convert tokens and this is for a very simple macro that just uses concat!, file!() and line!() to create a simple error code.
I just updated my version of rust-analyzer and removed the change in settings. And this is still happening. It is no longer every file, it is no longer at the top. But every call to proptest! gets unexpected token in input.
Activity
crumblingstatue commentedon Dec 8, 2020
I don't know if it's the same bug, but my advent of code project also has
unexpected token in inputin every solution in src/bin because of the macro usage. And they all have incorrect span information, pointing to the first line.https://github.com/crumblingstatue/advent-of-code
Eh2406 commentedon Dec 8, 2020
BTW the suggestion here https://www.reddit.com/r/rust/comments/k8fo7w/rustanalyzer_changelog_54/gexzaem/?utm_source=reddit&utm_medium=web2x&context=3 got the meseges to go way so I can use rust-analyzer untill this is fixed.
tensor-programming commentedon Dec 8, 2020
Had the same issue; can confirm that the suggestion removes the problem for now. In my case, the error was
could not convert tokensand this is for a very simple macro that just usesconcat!,file!()andline!()to create a simple error code.At least doing this gets rid of all of the red in my project:
jonas-schievink commentedon Dec 8, 2020
Heh, looks like that's because
concat!doesn't like the integer produced byline!().Merge #6765
Merge #6768
jonas-schievink commentedon Dec 8, 2020
The
concat!issue, as well as the misplaced diagnostics, are now fixed.lnicola commentedon Dec 9, 2020
This seems to work fine now:
There might still be some resolution errors on the enum variants in
Term::is_positive, but that's a different issue.Eh2406 commentedon Dec 14, 2020
I just updated my version of rust-analyzer and removed the change in settings. And this is still happening. It is no longer every file, it is no longer at the top. But every call to
proptest!getsunexpected token in input.lnicola commentedon Dec 14, 2020
Repro:
jonas-schievink commentedon Dec 14, 2020
Even just
concat!(module_path!(), "::");is enoughjonas-schievink commentedon Dec 14, 2020
Oh, we simply do not implement
module_path!().Merge #6874