Auto merge of #115859 - compiler-errors:effect-fallback, r=fee1-dead · rust-lang/rust@ae9465f (original) (raw)
File tree
2 files changed
lines changed
- compiler/rustc_hir_typeck/src
- tests/ui/rfcs/rfc-2632-const-trait-impl/effects
2 files changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -24,7 +24,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> { | ||
24 | 24 | self.fulfillment_cx.borrow_mut().pending_obligations() |
25 | 25 | ); |
26 | 26 | |
27 | -let fallback_occured = self.fallback_types() | | |
27 | +let fallback_occured = self.fallback_types() | self.fallback_effects(); | |
28 | 28 | |
29 | 29 | if !fallback_occured { |
30 | 30 | return; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
1 | 1 | // check-pass |
2 | 2 | |
3 | -#![feature(const_trait_impl, effects)] | |
3 | +#![feature(effects)] | |
4 | 4 | |
5 | 5 | pub const fn owo() {} |
6 | 6 | |
7 | 7 | fn main() { |
8 | +// make sure falling back ty/int vars doesn't cause const fallback to be skipped... | |
9 | +// See issue: 115791. | |
10 | +let _ = 1; | |
11 | +if false { | |
12 | +let x = panic!(); | |
13 | +} | |
14 | + | |
8 | 15 | let _ = owo; |
9 | 16 | } |