Skip to content

Commit

Permalink
Don't accidentally promote union access in MIR
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Aug 7, 2018
1 parent c0aedc0 commit 07e2dd7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/qualify_consts.rs
Expand Up @@ -515,7 +515,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
if let Some(def) = base_ty.ty_adt_def() {
if def.is_union() {
match this.mode {
Mode::Fn => {},
Mode::Fn => this.not_const(),
Mode::ConstFn => {
if !this.tcx.sess.features_untracked().const_fn_union {
emit_feature_err(
Expand Down
11 changes: 0 additions & 11 deletions src/test/ui/const-eval/union_promotion.nll.stderr

This file was deleted.

0 comments on commit 07e2dd7

Please sign in to comment.