-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
alacritty/vte fails to build on rustc master (mutable references are not allowed in constant functions) #79152
Comments
cargo-bisect-rustc says the regression is caused by c6a6105 |
Maybe #79032 ? |
cc @lcnr |
I assume this is the cause of the error: https://github.com/alacritty/vte/blob/master/vte_generate_state_changes/src/lib.rs#L28 |
MCVE: const fn foo() {
let mut array = [[0; 1]; 1];
array[0][0] = 1;
} |
Could be #74989. |
Reverting #74989 fixes the regression. The regression also appears in the crater report for #74989, but it appears either it was overlooked or the decision was made to merge anyway? cc @KodrAus |
Assigning |
we probably have to update something here: rust/compiler/rustc_typeck/src/check/writeback.rs Lines 204 to 236 in 8d2d001
|
@rustbot label E-needs-bisection E-needs-mcve |
This reverts commit c03dfa6. The commit broke code that worked on stable and beta: const fn foo() { let mut array = [[0; 1]; 1]; array[0][0] = 1; } But this was not noticed until the commit landed. Fixes rust-lang#79152
…i-obk Resolve inference variables before trying to remove overloaded indexing Fixes rust-lang#79152 This code was already set up to handle indexing an array. However, it appears that we never end up with an inference variable for the slice case, so the missing call to `resolve_vars_if_possible` had no effect until now.
Upstream ticket: alacritty/vte#68
Code
https://github.com/alacritty/vte/
I tried this code:
<code>
I expected to see this happen: explanation
The code compiles on
but fails to build on rustc master
rustc 1.50.0-nightly (c919f490b 2020-11-17)
which I assumes makes this a regression:
Version it worked on
It most recently worked on:
Version with regression
rustc --version --verbose
:Backtrace
Backtrace
The text was updated successfully, but these errors were encountered: