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
use std::collections::HashSet;
fn main() {
let mut v = Vec::new();
foo(&mut v);
}
fn foo(h: &mut HashSet<u32>) {
}
Output from playpen:
<anon>:5:9: 5:15 error: mismatched types:
expected `&mut std::collections::hash::set::HashSet<u32>`,
found `&mut collections::vec::Vec<_>`
(expected struct `std::collections::hash::set::HashSet`,
found struct `collections::vec::Vec`) [E0308]
<anon>:5 foo(&mut v);
^~~~~~
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'index out of bounds: the len is 3 but the index is 3', /home/rustbuild/src/rust-buildbot/slave/beta-dist-rustc-linux/build/src/libcollections/vec.rs:1358
playpen: application terminated with error code 101
Program ended.
Happens for me on rustc 1.1.0-nightly (f9e53c7f2 2015-04-24) (built 2015-04-25), and playpen is using beta, so it happens on that as well.
Activity
nagisa commentedon Apr 26, 2015
Duplicate of #23583. I’d close the linked issue, though, because this one has minimal example.
jirutka commentedon May 17, 2015
I ran into the same error when trying to compile datetime 0.1.7 with the current nightly.
rustc 1.2.0-nightly (8b7c17d 2015-05-17) (built 2015-05-18)
OS X 10.9.5
arielb1 commentedon Jun 15, 2015
@jirutka
Different error.
Prevent coercions from polluting the fulfillment context
evadnoob commentedon Jul 1, 2015
I get this same error, right after I added serde_macros to my Cargo.toml.
refactor autoderef to avoid registering obligations
apasel422 commentedon May 26, 2016
Is this the same issue as #31964?