]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #58784 - oli-obk:accidental_promotion, r=eddyb
authorbors <bors@rust-lang.org>
Mon, 11 Mar 2019 01:28:16 +0000 (01:28 +0000)
committerbors <bors@rust-lang.org>
Mon, 11 Mar 2019 01:28:16 +0000 (01:28 +0000)
Don't promote function calls to nonpromotable things

fixes https://github.com/rust-lang/rust/issues/58767 and fixes https://github.com/rust-lang/rust/issues/58634

r? @eddyb

should we additionally check the function call return type? It might be a promotable function (or any `const fn` inside a `const fn`), but its return type might contain interior mutability.

1  2 
src/librustc_mir/transform/qualify_consts.rs