Rollup merge of #83804 - detrumi:build-type-ir-on-stable, r=petrochenkov

Remove nightly features in rustc_type_ir

`rustc_type_ir` will be used as a type library by Chalk, which we want to be able to build on stable, so this PR removes the current nightly features used.
This commit is contained in:
Yuki Okushi 2021-04-04 00:19:40 +09:00 committed by GitHub
commit d636b0aa6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -124,7 +124,8 @@ macro_rules! newtype_index {
#[inline]
$v const fn from_usize(value: usize) -> Self {
assert!(value <= ($max as usize));
// FIXME: replace with `assert!(value <= ($max as usize));` once `const_panic` is stable
[()][(value > ($max as usize)) as usize];
unsafe {
Self::from_u32_unchecked(value as u32)
}
@ -132,7 +133,8 @@ macro_rules! newtype_index {
#[inline]
$v const fn from_u32(value: u32) -> Self {
assert!(value <= $max);
// FIXME: replace with `assert!(value <= $max);` once `const_panic` is stable
[()][(value > $max) as usize];
unsafe {
Self::from_u32_unchecked(value)
}

View file

@ -1,7 +1,3 @@
#![feature(never_type)]
#![feature(const_panic)]
#![feature(control_flow_enum)]
#[macro_use]
extern crate bitflags;
#[macro_use]