Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

RLS hangs when you print in a procedural attribute macro #1108

@Zinfour

Description

@Zinfour

src/lib.rs

extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn my_attribute_macro(attr: TokenStream, input: TokenStream) -> TokenStream {
    println!("print");
    input
}

tests/lib.rs

extern crate my_crate;
use my_crate::my_attribute_macro;

#[my_attribute_macro]
fn func() {}

When I open this project in vscode rls gets stuck in a loop, while if I add the println! after startup or if I use eprintln! instead it does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions