mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Ignore proc-macro stdout to prevent IPC crash
This commit is contained in:
parent
4b997b8663
commit
f41ae64722
2 changed files with 22 additions and 7 deletions
|
@ -712,6 +712,10 @@ pub fn foo(_input: TokenStream) -> TokenStream {
|
|||
// We hard code the output here for preventing to use any deps
|
||||
let mut res = TokenStream::new();
|
||||
|
||||
// ill behaved proc-macro will use the stdout
|
||||
// we should ignore it
|
||||
println!("I am bad guy");
|
||||
|
||||
// impl Bar for Foo { fn bar() {} }
|
||||
let mut tokens = vec![t!("impl"), t!("Bar"), t!("for"), t!("Foo")];
|
||||
let mut fn_stream = TokenStream::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue