-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Function it was working on when it crashed (apologies, this is in the middle of a refactor so it's a mess; I can provide more context or try to boil it down if needed):
unsafe fn draw(&self) {
let color_alg: &Fn(Complex, usize) -> usize = if (self.power - 2.0).abs() < 0.01 {
&|c, i| self.get_color(c, i)
} else {
&|c, i| self.get_color_generic(c, i)
};
self.height = if !stdscr.is_null() {
i32::from((*stdscr)._maxy) + 1i32
} else {
-1i32
};
self.width = if !stdscr.is_null() {
i32::from((*stdscr)._maxx) + 1i32
} else {
-1i32
};
let mut i: i32 = 0i32;
loop {
if i >= self.height {
break;
}
let mut j: i32 = 0i32;
loop {
if j >= self.width {
break;
}
if wmove(stdscr, i, j) != -1i32 {
waddch(
stdscr,
usize::from(self.colors[usize::from(color_alg(self.complex_value(i, j), self.iter))]),
);
}
j += 1;
}
i += 1;
}
wrefresh(stdscr);
}
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalP-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.