Wednesday, January 24, 2024

Re: rust-analyzer: proc-macro support broken

Hi,

On Tue, 23 Jan 2024 21:15:00 +0100, Hukadan wrote:

> Thank you for the diff. I tried it but it does not solve the problem. I
> had a look at proc-macro-srv-cli and the sysroot-abi needs to be
> enabled:
> https://github.com/rust-lang/rust-analyzer/blob/master/crates/proc-
macro-srv-cli/src/main.rs#L25

>
> I tried to build with this feature enabled but it needs other features
> that are not available on stable release channel.
>
> Here is the error message I got:
>
> error[E0554]: `#![feature]` may not be used on the stable release
> channel
> --> crates/proc-macro-srv/src/lib.rs:14:12
> |
> 14 | #![feature(proc_macro_internals, proc_macro_diagnostic,
> proc_macro_span)]
> | ^^^^^^^^^^^^^^^^^^^^
>
> error[E0554]: `#![feature]` may not be used on the stable release
> channel
> --> crates/proc-macro-srv/src/lib.rs:14:34
> |
> 14 | #![feature(proc_macro_internals, proc_macro_diagnostic,
> proc_macro_span)]
> | ^^^^^^^^^^^^^^^^^^^^^
>
> error[E0554]: `#![feature]` may not be used on the stable release
> channel
> --> crates/proc-macro-srv/src/lib.rs:14:57
> |
> 14 | #![feature(proc_macro_internals, proc_macro_diagnostic,
> proc_macro_span)]
> |
> ^^^^^^^^^^^^^^^
>
> For more information about this error, try `rustc --explain E0554`.
> error: could not compile `proc-macro-srv` (lib) due to 3 previous errors

I confirm this issue.

I try the diff from semarie@ to build proc-macro-srv-cli crate and added
sysroot-abi feature (needed by proc-macro-srv-cli, see https://github.com/
rust-lang/rust-analyzer/blob/master/crates/proc-macro-srv-cli/src/
main.rs#L25
).

Same errors with '#![feature]' not supported with Rust stable release for
proc-macro-srv crate.

Laurent

No comments:

Post a Comment