Fallback effects even if types also fall back

This commit is contained in:
Michael Goulet 2023-09-14 21:08:19 +00:00
parent 5adddad28c
commit 5c907a7859
2 changed files with 9 additions and 2 deletions

View File

@ -24,7 +24,7 @@ pub(super) fn type_inference_fallback(&self) {
self.fulfillment_cx.borrow_mut().pending_obligations()
);
let fallback_occured = self.fallback_types() || self.fallback_effects();
let fallback_occured = self.fallback_types() | self.fallback_effects();
if !fallback_occured {
return;

View File

@ -1,9 +1,16 @@
// check-pass
#![feature(const_trait_impl, effects)]
#![feature(effects)]
pub const fn owo() {}
fn main() {
// make sure falling back ty/int vars doesn't cause const fallback to be skipped...
// See issue: 115791.
let _ = 1;
if false {
let x = panic!();
}
let _ = owo;
}