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:
commit
68d5fddeef
3 changed files with 47 additions and 3 deletions
17
src/test/ui/consts/const-eval/double_promotion.rs
Normal file
17
src/test/ui/consts/const-eval/double_promotion.rs
Normal 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));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue