Closed
Description
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
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.47.0 (18bf6b4f0 2020-10-07)
beta-x86_64-unknown-linux-gnu unchanged - rustc 1.48.0-beta.10 (8236dc07b 2020-11-15)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.50.0-nightly (f5230fbf7 2020-11-16)
but fails to build on rustc master rustc 1.50.0-nightly (c919f490b 2020-11-17)
which I assumes makes this a regression:
Checking vte v0.9.0 (/tmp/vte)
error[E0658]: mutable references are not allowed in constant functions
--> src/table.rs:9:1
|
9 | / generate_state_changes!(state_changes, {
10 | | Anywhere {
11 | | 0x18 => (Ground, Execute),
12 | | 0x1a => (Ground, Execute),
... |
170 | | }
171 | | });
| |___^
|
= note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants
--> src/table.rs:9:1
|
9 | / generate_state_changes!(state_changes, {
10 | | Anywhere {
11 | | 0x18 => (Ground, Execute),
12 | | 0x1a => (Ground, Execute),
... |
170 | | }
171 | | });
| |___^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
Version it worked on
It most recently worked on:
Version with regression
rustc --version --verbose
:
<version>
Backtrace
Backtrace
<backtrace>
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: This is a bug.Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleCritical priorityRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to nightly.