Rollup merge of #54816 - oli-obk:double_promotion, r=alexreg

Don't try to promote already promoted out temporaries

fixes #53201

r? @eddyb
This commit is contained in:
kennytm 2018-10-26 18:24:54 +08:00 committed by GitHub
commit 68d5fddeef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 3 deletions

View file

@ -0,0 +1,17 @@
// compile-pass
#![feature(const_fn, rustc_attrs)]
#[rustc_args_required_const(0)]
pub const fn a(value: u8) -> u8 {
value
}
#[rustc_args_required_const(0)]
pub fn b(_: u8) {
unimplemented!()
}
fn main() {
let _ = b(a(0));
}