You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling hermes-rust-ci v0.1.0 (file:///Users/nicolas/Code/Gitlinks/hermes-rust-ci)
error: internal compiler error: ../src/librustc_typeck/check/dropck.rs:275: no enclosing scope found for scope: CodeExtent(928/Misc(NodeId(89)))
--> src/main.rs:47:12
|
47 | Ok(something) => true,
| ^^^^^^^^^
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
…, r=arielb1
Fixed ICEs with pattern matching in const expression
Fixed 2 ICEs with when pattern matching inside a constant expression.
Both of these ICEs now resolve to an appropriate compiler error.
1. ICE was caused by a compiler bug to implement discriminant const qualify.
I removed this intentionally thrown bug and changed it to a FIXME as the unimplemented expression type is handled as a compiler error elsewhere.
2. ICE was caused during a drop check when checking if a variable lifetime outlives the current scope if there was no parent scope .
I've changed it to stop checking if there is no parent scope for the current scope. It is valid syntax for a const variable to be assigned a match expression with no enclosing scope.
The ICE seemed to mainly be used as a defensive check for bugs elsewhere.
Fixes#38199.
Fixes#31577.
Fixes#29093.
Fixes#40012.
I am setting a const on runtime (probably a bad idea)
I tried this code:
This is easily reproducible in the rust-playground:
I expected to see this happen: Compilation/error
Instead, this happened: The compiler panicked
Meta
rustc --version --verbose
:Backtrace:
The text was updated successfully, but these errors were encountered: