<p dir="auto">This code highlights an invalid code location:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
    let x = [1,2,3];
    #debug(x);
}"><pre class="notranslate"><code class="notranslate">fn main() {
    let x = [1,2,3];
    #debug(x);
}
</code></pre></div>
<p dir="auto">Returns this error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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"><pre class="notranslate"><code class="notranslate">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
</code></pre></div>
<p dir="auto">If you write something like <code class="notranslate">#debug["%u", 10]</code>, the type error (unsigned vs signed int) gets reported in <code class="notranslate">core.rs</code>, at the definition of <code class="notranslate">#debug</code>, rather than at the point of use.  This is very confusing and makes you think something is fundamentally wrong in the Rust libraries (as in, they don't compile) rather than your own code.  I think this ought to be fixed before 0.1 so I associated it with that milestone, but others may disagree.</p>