-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ICE in subst.rs (task 'rustc' failed at 'index out of bounds: the len is 1 but the index is 1', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustc/middle/subst.rs:420 #15905
Comments
Updated with a minimal testcase. |
I've gotten the same error, with different code, and slightly different backtrace. #![feature(overloaded_calls)]
use std::fmt;
use std::ops::Fn;
pub struct Con<V> {
data: V
}
pub static Three: Con<&'static [u8]> = Con {
data: &[3]
};
impl<T: fmt::Show, V: Vector<u8>> Fn<(T,), ConText<T>> for Con<V> {
#[rust_call_abi_hack]
fn call(&self, (show,): (T,)) -> ConText<T> {
ConText {
data: Vec::from_slice(self.data.as_slice()),
subject: show
}
}
}
pub struct ConText<T> {
data: Vec<u8>,
subject: T
}
#[test]
fn test() {
let f = Three("foo");
}
Seeing the last step in trace before unwind is 8, I turned on
|
I actually suspect that is a different error, since your code, error message (they are both "index out of bound" errors, but yours has length 0, not length 1), and stack trace are all different. |
True, they differ slightly, and if it completely unrelated I can open a second bug. But it seemed the cause is that vtables are somehow losing or not keeping some entries, and that may be causing both. |
This doesn't acually work since generic destructors are still broken :( rust-lang/rust#15905
Dupe of #14695. |
minor: Tweak tsconfig.json CC rust-lang/rust-analyzer#15904
Edited with a (reasonably) minimal testcase below. Reproducible with rustc 0.12.0-pre-nightly (f15d6d2 2014-07-20 22:46:29 +0000) on ArchLinux on a Macbook Pro on https://github.com/pythonesque/mud.rs/blob/cee7a78e449a507f3faacf4de16232fed7df5d29/src/main.rs
Could not execute process
rustc /home/$HOME/dev/personal/mud.rs/src/main.rs --crate-name mud --crate-type bin --out-dir /home/$HOME/dev/personal/mud.rs/target -L /home/$HOME/dev/personal/mud.rs/target -L /home/$HOME/dev/personal/mud.rs/target/deps
(status=101)The text was updated successfully, but these errors were encountered: