-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Compiler crashed with 'Calling a function with a bad signature!' #22874
Comments
I've made an attempt at removing as much code that doesn't affect the outcome as possible: #![allow(dead_code)]
enum Value {
String(String)
}
type Row = [Value];
struct Table {
rows: [Row]
}
impl Table {
fn next(&self) -> &Row {
&self.rows[0]
}
}
fn main() {
}
|
I reduced this even further: #![allow(dead_code)]
enum Value {
A(String)
}
struct Table {
rows: [[Value]]
}
impl Table {
fn next(&self) {
&self.rows[0];
}
}
fn main() {} This is still an issue with Rust 1.0 beta 2
|
I was able to get the same failed assertion with a much smaller piece of code: trait Foo {}
fn main() {
let _a: [Foo; 0];
}
|
Related to #21748 |
This bug is still happening in the 10/18/2015 nightly build. |
This seems to be fixed. |
Fixed in Rust 1.2 Minimized: struct Table {
rows: [[String]]
}
fn f(table: &Table) -> &[String] {
&table.rows[0]
}
fn main() {} Needs test. |
This can be closed now that #40296 is merged. |
The text was updated successfully, but these errors were encountered: