-
Notifications
You must be signed in to change notification settings - Fork 2k
Macro fixup inserting {} characters as punct, causing proc macros to panic #19206
Copy link
Copy link
Closed
Closed
Copy link
Labels
Description
Hi - I am still seeing this exact bug, with
rustc 1.84.1 (e71f9a9a9 2025-01-27), with both the latest analyzer versions available for VS Code:0.3.2308and0.4.2312.In my case the test case is
#[tokio::main] async fn main() { loop {} // type 'while ' here }and the error displayed is
proc-macro panicked: unsupported proc macro punctuation character '{'.EDIT:
cargo builddoes not result in the proc macro panic, which is why I'm assuming the fault lies with analyzer and not with the macro itself (this is tokio_macros 2.5.0) – let me know if there's something I can do to prove one way or the otherEDIT 2: with nightly analyzer (2025-02-19)
Error SyntaxError from LineCol { line: 18, col: 18 } to LineCol { line: 18, col: 18 }: Syntax Error: expected a block Error Ra("macro-error", Error) from LineCol { line: 15, col: 0 } to LineCol { line: 19, col: 1 }: proc-macro panicked: unsupported proc macro punctuation character '{' processing crate: foobar, module: /Users/me/foobar/src/lib.rs diagnostic scan complete Error: diagnostic error detected Stack backtrace: 0: std::backtrace::Backtrace::create 1: <anyhow::Error>::msg::<&str> 2: std::sys::backtrace::__rust_begin_short_backtrace::<<stdx::thread::Builder>::spawn<<rust_analyzer::cli::flags::Diagnostics>::run::{closure#0}, core::result::Result<(), anyhow::Error>>::{closure#0}, core::result::Result<(), anyhow::Error>> 3: <<std::thread::Builder>::spawn_unchecked_<<stdx::thread::Builder>::spawn<<rust_analyzer::cli::flags::Diagnostics>::run::{closure#0}, core::result::Result<(), anyhow::Error>>::{closure#0}, core::result::Result<(), anyhow::Error>>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 4: std::sys::pal::unix::thread::Thread::new::thread_start 5: __pthread_deallocate
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.