Closed
Description
Minimal [invalid] code to reproduce bug:
fn main() {
for (ref i,) in [].iter() {
i.clone();
}
}
What I see:
$ rustc src/bug.rs
src/bug.rs:2:9: 2:17 error: mismatched types: expected `&_`, found `(_,)` (expected &-ptr, found tuple)
src/bug.rs:2 for (ref i,) in [].iter() {
^~~~~~~~
src/bug.rs:3:11: 3:18 error: the type of this value must be known in this context
src/bug.rs:3 i.clone();
^~~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'assertion failed: `(left == right) && (right == left)` (left: `None`, right: `Some(())`)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc_typeck/check/method/confirm.rs:153
Rust version:
$ rustc --version --verbose
rustc 0.13.0-nightly (96a3c7c6a 2014-12-23 22:21:10 +0000)
binary: rustc
commit-hash: 96a3c7c6a051ab2f5fc01fe9e686f7fffcc87c61
commit-date: 2014-12-23 22:21:10 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly