You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ rustc --version
rustc 1.0.0-dev (4db0b3246 2015-02-25) (built 2015-02-26)
$ rustc -C debuginfo=2 foo.rs # only happens w/o opt
foo.rs:4:13: 4:21 warning: unused variable: `zzzz`, #[warn(unused_variables)] on by default
foo.rs:4 zzzz @ _ => zzzz + 1,
^~~~~~~~
foo.rs:1:1: 8:2 note: in expansion of foo!
foo.rs:12:16: 12:24 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
foo.rs:12:5: 12:28 note: expansion site
foo.rs:11:5: 11:25 warning: constant `zzzz` should have an upper case name such as `ZZZZ`, #[warn(non_upper_case_globals)] on by default
foo.rs:11 const zzzz: i32 = 3;
^~~~~~~~~~~~~~~~~~~~
foo.rs:4:13: 4:21 warning: constant in pattern `zzzz` should have an upper case name such as `ZZZZ`, #[warn(non_upper_case_globals)] on by default
foo.rs:4 zzzz @ _ => zzzz + 1,
^~~~~~~~
foo.rs:1:1: 8:2 note: in expansion of foo!
foo.rs:12:16: 12:24 note: expansion site
<std macros>:1:1: 9:39 note: in expansion of assert_eq!
foo.rs:12:5: 12:28 note: expansion site
$ gdb ./foo
(gdb) run
Starting program: /tmp/foo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x0000555555559146 in foo::main () at foo.rs:10
10 fn main() {
Possibly the treatment as a match vs. a binding is inconsistent between typeck and trans. The unused variable lint is also peculiar.
IR:
The text was updated successfully, but these errors were encountered: