{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/35423","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/35423/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/35423/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/35423/events","html_url":"https://github.com/rust-lang/rust/issues/35423","id":169752710,"number":35423,"title":"[Compiler panic] internal compiler error: src/librustc_trans/_match.rs:943: only string and byte strings supported in compare_values","user":{"login":"CDLuminate","id":5723047,"avatar_url":"https://avatars.githubusercontent.com/u/5723047?v=3","gravatar_id":"","url":"https://api.github.com/users/CDLuminate","html_url":"https://github.com/CDLuminate","followers_url":"https://api.github.com/users/CDLuminate/followers","following_url":"https://api.github.com/users/CDLuminate/following{/other_user}","gists_url":"https://api.github.com/users/CDLuminate/gists{/gist_id}","starred_url":"https://api.github.com/users/CDLuminate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CDLuminate/subscriptions","organizations_url":"https://api.github.com/users/CDLuminate/orgs","repos_url":"https://api.github.com/users/CDLuminate/repos","events_url":"https://api.github.com/users/CDLuminate/events{/privacy}","received_events_url":"https://api.github.com/users/CDLuminate/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/E-needstest","name":"E-needstest","color":"02e10c"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/I-ICE","name":"I-ICE","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-06T15:55:32Z","updated_at":"2016-08-30T17:07:34Z","closed_at":"2016-08-30T17:07:34Z","body":"I'm learning rust with the official doc, and accidentally encountered this issue.\r\n\r\nI tried this code:\r\n\r\n```\r\nfn main () {\r\n  let x = 4;\r\n  match x {\r\n    ref r if *r < 0 => println!(\"got negative num {} < 0\", r), //[1]\r\n    e @ 1 ... 100 => println!(\"got number within range [1,100] {}\", e), //[2]\r\n    _ => println!(\"no\"),\r\n  }\r\n}\r\n```\r\n\r\nI expected to see this happen: \r\n\r\n```\r\nI expect the compiling being successful, based on the observation that it\r\ncompiles if there is only [1] or [2], which is to say in the above code sample\r\n [1] and [2] don't co-exist.\r\n```\r\n\r\nInstead, this happened: \r\n\r\n```\r\n$ rustc bug.rs\r\nerror: internal compiler error: src/librustc_trans/base.rs:367: non-scalar type passed to compare_scalar_types\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\nthread 'rustc' panicked at 'Box<Any>', src/libsyntax/errors/mod.rs:584\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n```\r\n\r\n## Meta\r\n\r\n`rustc --version --verbose`: \r\n\r\n```\r\n$ rustc --verbose --version\r\nrustc 1.10.0\r\nbinary: rustc\r\ncommit-hash: unknown\r\ncommit-date: unknown\r\nhost: x86_64-unknown-linux-gnu\r\nrelease: 1.10.0\r\n```\r\nand my operating system is `Debian/Sid`, the rustc compiler is from Debian official archive.\r\n\r\nBacktrace:\r\n```\r\n$ RUST_BACKTRACE=1 rustc bug.rs\r\nerror: internal compiler error: src/librustc_trans/base.rs:367: non-scalar type passed to compare_scalar_types\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\nnote: run with `RUST_BACKTRACE=1` for a backtrace\r\nthread 'rustc' panicked at 'Box<Any>', src/libsyntax/errors/mod.rs:584\r\nstack backtrace:\r\n   1:     0x7ff8bea23cdf - <unknown>\r\n   2:     0x7ff8bea3178b - <unknown>\r\n   3:     0x7ff8bea3132c - <unknown>\r\n   4:     0x7ff8be9f785d - std::panicking::rust_panic_with_hook::h5dd7da6bb3d06020\r\n   5:     0x7ff8b9f6a037 - <unknown>\r\n   6:     0x7ff8b9f6999e - syntax::errors::Handler::bug::hb67a449bfdd4b525\r\n   7:     0x7ff8bafe7704 - <unknown>\r\n   8:     0x7ff8bafe750d - <unknown>\r\n   9:     0x7ff8bb000ce6 - rustc::session::bug_fmt::h3d079546792f3a77\r\n  10:     0x7ff8bc488196 - <unknown>\r\n  11:     0x7ff8bc58f290 - <unknown>\r\n  12:     0x7ff8bc58af6c - <unknown>\r\n  13:     0x7ff8bc592b99 - <unknown>\r\n  14:     0x7ff8bc55ac0d - <unknown>\r\n  15:     0x7ff8bc4ad96e - <unknown>\r\n  16:     0x7ff8bc4a5251 - <unknown>\r\n  17:     0x7ff8bc4a3aa8 - <unknown>\r\n  18:     0x7ff8bc4a5a16 - <unknown>\r\n  19:     0x7ff8bc4b026e - <unknown>\r\n  20:     0x7ff8bc4cc36d - _<base..TransItemsWithinModVisitor<'a, 'tcx> as rustc..hir..intravisit..Visitor<'v>>::visit_item::hf2a5fda0a4c4bb41\r\n  21:     0x7ff8bc4b9837 - rustc_trans::base::trans_crate::hdb9f0761c2bb8e02\r\n  22:     0x7ff8bef86493 - rustc_driver::driver::phase_4_translate_to_llvm::he77984ef06ab7894\r\n  23:     0x7ff8bef84308 - <unknown>\r\n  24:     0x7ff8bef80b1d - <unknown>\r\n  25:     0x7ff8bef7a23b - <unknown>\r\n  26:     0x7ff8bef41dcc - rustc_driver::driver::compile_input::hda370d330171d8d7\r\n  27:     0x7ff8bef2cfc4 - rustc_driver::run_compiler::ha942b7e1d33fe553\r\n  28:     0x7ff8bef2a09e - <unknown>\r\n  29:     0x7ff8bea3ff0b - <unknown>\r\n  30:     0x7ff8bea3feae - __rust_maybe_catch_panic\r\n  31:     0x7ff8bef2ab84 - <unknown>\r\n  32:     0x7ff8bea2fa04 - <unknown>\r\n  33:     0x7ff8b93c1463 - start_thread\r\n  34:     0x7ff8be68630c - clone\r\n  35:                0x0 - <unknown>\r\n```"}}
{"actor":{"display_login":"bors"}}