-
Notifications
You must be signed in to change notification settings - Fork 13.3k
task 'rustc' failed at 'OwnedSlice: index out of bounds' #14377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Found a reduced test case thanks to creduce! |
It appears to go away if |
Got the same out of bound errors after updating to the nightly but without anything to do with Drop or unsafe_destructor. This was the minimal testcase I could find. It seems to be dependent on the Vec type since replacing it with Option, Box or copy pasting the Vec definition into the file compiles without any error. |
Another reduced test case, without any destructors at all: struct A;
impl<'a> A {
fn test(v: Vec<&'a int>) {}
}
fn main() {
} Compiler output with backtrace:
It seems that the compiler dislikes struct A;
impl A {
fn test<'a>(v: Vec<&'a int>) {}
}
fn main() {
} It is a regression, because the code which causes this error used to compile a few weeks ago. |
I get the same ICE without any references. enum Enum<'a> {
Empty,
V(Vec<Enum<'a>>) // Removing this line, or changing Vec to Box, makes the ICE go away
}
impl<'a> Enum<'a> {
fn consume(_: Enum<'a>) { }
}
fn main() { } |
Dup of #13853 I'm pretty sure. |
Closing as a dupe of #14889 (same code in reduced case). |
…4381) When lowering a destructuring assignment from AST to HIR, the compiler will reuse the same identifier name (namely `sym::lhs`) for all the fields. The desugaring must be checked for to avoid a false positive of the `shadow_unrelated` lint. Fix rust-lang#10279 Fix rust-lang#14377 changelog: [`shadow_unrelated`]: prevent false positive in destructuring assignments
Reduced test case
Original issue
code that triggered it:
trace:
task 'rustc' failed at 'OwnedSlice: index out of bounds', /home/bjb/src/rust/src/libstd/option.rs:167
stack backtrace:
1: 0x7fe1642131b0 - rt::backtrace::imp::write::h96d85ea18992593cPUy::v0.11.0.pre
2: 0x7fe16418ff60 - rt::unwind::begin_unwind_inner::h8ea9fe72e3892daeXuy::v0.11.0.pre
3: 0x7fe164cce9b0 - rt::unwind::begin_unwind::h5064124597624340269::v0.11.0.pre
4: 0x7fe164ebfda0 - middle::ty_fold::super_fold_sty::h1584947460896464705::v0.11.0.pre
5: 0x7fe164d4b640 - middle::subst::SubstFolder<'a>.TypeFolder::fold_ty::ha6ec74b373bc1d03qsR::v0.11.0.pre
6: 0x7fe164dd1bc0 - middle::subst::T.Subst::subst_spanned::h13474638946470633177::v0.11.0.pre
7: 0x7fe164e569d0 - middle::ty::lookup_field_type::heb8a718cf718b4ba9WP::v0.11.0.pre
8: 0x7fe164d34360 - middle::ty::struct_fields::hea2fe481f733123du5P::v0.11.0.pre
9: 0x7fe164e83c60 - middle::ty::type_contents::tc_ty::h93c5eab2ab237a69UgN::v0.11.0.pre
10: 0x7fe164e2d160 - middle::ty::type_contents::hd87553be01fd1d64QfN::v0.11.0.pre
11: 0x7fe16520a3c0 - middle::kind::check_item::hfb296b4505eee5adOJQ::v0.11.0.pre
12: 0x7fe16520f9f0 - visit::walk_decl::h17157218454155748735::v0.11.0.pre
13: 0x7fe16520f8f0 - visit::walk_stmt::h2013433038502380431::v0.11.0.pre
14: 0x7fe16520f830 - visit::walk_block::h11844577003690490754::v0.11.0.pre
15: 0x7fe165209490 - middle::kind::check_fn::h978ba03dee808a05fPQ::v0.11.0.pre
16: 0x7fe16520a3c0 - middle::kind::check_item::hfb296b4505eee5adOJQ::v0.11.0.pre
17: 0x7fe16520a3c0 - middle::kind::check_item::hfb296b4505eee5adOJQ::v0.11.0.pre
18: 0x7fe16520d230 - middle::kind::check_crate::hec9303143bcae49c1zQ::v0.11.0.pre
19: 0x7fe16512c200 - util::common::time::h3579776483427610692::v0.11.0.pre
20: 0x7fe16559c590 - driver::driver::phase_3_run_analysis_passes::hdc1852929b3d1f8fITj::v0.11.0.pre
21: 0x7fe165595790 - driver::driver::compile_input::hf2673e6ef850e8e5iJj::v0.11.0.pre
22: 0x7fe165660fb0 - driver::run_compiler::h06f7bdbcca33196abmm::v0.11.0.pre
23: 0x7fe165660ed0 - driver::main_args::closure.93524
24: 0x7fe1656761a0 - driver::monitor::closure.94596
25: 0x7fe165671490 - task::TaskBuilder::try::closure.94359
26: 0x7fe164731ef0 - task::spawn_opts::closure.7814
27: 0x7fe16420d330 - rt::task::Task::run::closure.25292
28: 0x7fe1642728c0 - rust_try
29: 0x7fe16420d280 - rt::task::Task::run::h31ac7cd46a833d08Ajw::v0.11.0.pre
30: 0x7fe164731ca0 - task::spawn_opts::closure.7787
31: 0x7fe1642115b0 - rt::thread::thread_start::hcee82097ba2d401982w::v0.11.0.pre
32: 0x7fe161cb6fa0 - start_thread
33: 0x7fe163e57bc9 - __clone
34: 0x0 -
uname -a:
Linux b 3.14-1-amd64 #1 SMP Debian 3.14.2-1 (2014-04-28) x86_64 GNU/Linux
rustc compiled from 9e244d7 (Fri May 23)
The text was updated successfully, but these errors were encountered: