]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Rollup merge of #76199 - Mark-Simulacrum:void-zero, r=nikomatsakis
authorDylan DPC <dylan.dpc@gmail.com>
Sat, 17 Oct 2020 01:27:12 +0000 (03:27 +0200)
committerGitHub <noreply@github.com>
Sat, 17 Oct 2020 01:27:12 +0000 (03:27 +0200)
commit496e2feed684afc3eb43a3e4ac933fc61a5a8305
treed0ba4cb48e0ab2b17ec2e35adf5efa86eef03ada
parentf1b97ee7f8ffb1a814944b85c7e05a1555a7eda5
parent990a39596cf3b33e550f2045f78a62970f8d78f8
Rollup merge of #76199 - Mark-Simulacrum:void-zero, r=nikomatsakis

Permit uninhabited enums to cast into ints

This essentially reverts part of #6204; it is unclear why that [commit](https://github.com/rust-lang/rust/pull/6204/commits/c0f587de34f30b060df8a88c4068740e587b9340) was introduced, and I suspect no one remembers.

The changed code was only called from casting checks and appears to not affect any callers of that code (other than permitting this one case).

Fixes #75647.
compiler/rustc_middle/src/ty/mod.rs
compiler/rustc_mir/src/interpret/cast.rs