Fallback effects even if types also fall back
This commit is contained in:
parent
5adddad28c
commit
5c907a7859
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user