]> git.lizzy.rs Git - rust.git/commit
Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakis
authorbors <bors@rust-lang.org>
Tue, 16 Aug 2016 07:12:12 +0000 (00:12 -0700)
committerGitHub <noreply@github.com>
Tue, 16 Aug 2016 07:12:12 +0000 (00:12 -0700)
commite25542cb02d946959517ebb68e2f7b1318817237
tree64775f55741e98f44e5e2ee854e6707e2f4b4da9
parent197be89f367d1240d5f9cd9c4efd77812775354e
parentf59f1f0914de50ffa70e3000c317a14f6d1b8605
Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakis

Implement the `!` type

This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
18 files changed:
src/librustc/mir/repr.rs
src/librustc/mir/visit.rs
src/librustc/ty/error.rs
src/librustc_borrowck/borrowck/mir/gather_moves.rs
src/librustc_const_eval/check_match.rs
src/librustc_mir/build/mod.rs
src/librustc_mir/transform/promote_consts.rs
src/librustc_mir/transform/qualify_consts.rs
src/librustc_mir/transform/type_check.rs
src/librustc_privacy/lib.rs
src/librustc_trans/base.rs
src/librustc_trans/collector.rs
src/librustc_trans/mir/analyze.rs
src/librustc_typeck/check/intrinsic.rs
src/librustc_typeck/check/mod.rs
src/librustc_typeck/check/op.rs
src/libsyntax/feature_gate.rs
src/libsyntax/parse/parser.rs