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

Errors thrown for yew html macro. #9429

Closed
Magicloud opened this issue Jun 29, 2021 · 4 comments
Closed

Errors thrown for yew html macro. #9429

Magicloud opened this issue Jun 29, 2021 · 4 comments

Comments

@Magicloud
Copy link

Crate yew contains a html macro, which usage is basically as:

html! {
<div>Some Text</div>
}

The usage is not accepted by rust-analyzer in VS Code. Two kinds of errors got.

  1. when there is a space between ! and {: proc macro returned error: proc-macro panicked: internal error: entered unreachable code
  2. when there is no space: proc macro returned error: proc-macro panicked: use-after-free in proc_macro handle

rust-analyzer version: 0.2.637

RLS version: rls 1.41.0 (9ed6f96 2021-05-26)

@bjorn3
Copy link
Member

bjorn3 commented Jun 29, 2021

Are you using nightly rustc? If so: Duplicate of #8925

tl;dr: rustc nightly changed the unstable proc macro abi. rust-analyzer can't adopt to the changes until the changes land on stable as otherwise proc macros break on stable.

@luisvgs
Copy link

luisvgs commented Jun 29, 2021

@bjorn3 so for now should we use rustc stable? I'm currently dealing with a similar error related to proc-macro

@lnicola
Copy link
Member

lnicola commented Jun 29, 2021

User stable or an older nightly, or disable proc macros in RA.

@Magicloud
Copy link
Author

Thanks. Yew requires nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants