-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
Description
This code highlights an invalid code location:
fn main() {
let x = [1,2,3];
#debug(x);
}
Returns this error message:
foo.rs:4:186: 4:187 error: first argument to #fmt must be a string literal.
foo.rs:4 }
^
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:71
rust: domain main @0x102029600 root task failed
rust: fatal, 'leaked memory in rust main loop (2 objects)' failed, ../src/rt/memory_region.cpp:158 2 objects
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
graydon commentedon Dec 30, 2011
This is a general problem with macros, not just #debug. When they report an error they go to (or near) the source line before the macro, and highlight it, but fail to pretty-print what the expanded syntax looked like. They should do both.
kevina commentedon Jan 22, 2012
This bug turns out to be a duplicate of #1448. The fix to that will fix this one.
Revert "rustc: Exclude stdin from codemap files when lookup_pos".
When replacing a pattern variable in macro expansion use the span of
Add regresion tests for issue rust-lang#1448 and rust-lang#1387.
brson commentedon Jan 24, 2012
Fixed by kevina
Add option to run CBMC sanity checks + set is_param for function para…