Skip to content

RA crash when calling println! in proc-macro #7954

@edwin0cheng

Description

@edwin0cheng

Hello, I came across this issue while tinkering with one of my own macros. It seems the use of a println!() in a derive macro causes it to happen:

#[proc_macro_derive(Hello)]
pub fn hello(_: proc_macro::TokenStream) -> proc_macro::TokenStream {
    println!("fail"); // This will cause the error
    proc_macro::TokenStream::new()
}

I'm using rustc 1.5.0 & RA v0.2.513

Originally posted by @pauldorehill in #7103 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macromacro expansionS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions