diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-13 01:50:03 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-11-21 14:55:32 +0100 |
| commit | 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1 (patch) | |
| tree | 95bc3d210dafa100d70199d2730b0378584898e7 /src/librustc | |
| parent | f1b882b55805c342e46ee4ca3beeef1d1fa2044b (diff) | |
| download | rust-15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.tar.gz rust-15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.zip | |
Stabilize the `never_type`, written `!`.
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/lib.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/context.rs | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 38877dee711..1fc157eca3e 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -36,7 +36,7 @@ #![feature(core_intrinsics)] #![feature(drain_filter)] #![cfg_attr(windows, feature(libc))] -#![feature(never_type)] +#![cfg_attr(bootstrap, feature(never_type))] #![feature(exhaustive_patterns)] #![feature(overlapping_marker_traits)] #![feature(extern_types)] diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 41d069bf6ae..2dea2216f38 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -2440,11 +2440,7 @@ impl<'tcx> TyCtxt<'tcx> { #[inline] pub fn mk_diverging_default(self) -> Ty<'tcx> { - if self.features().never_type { - self.types.never - } else { - self.intern_tup(&[]) - } + self.types.never } #[inline] |
