forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#135308 - compiler-errors:scope-visit, r=oli-obk Make sure to walk into nested const blocks in `RegionResolutionVisitor` Fixes rust-lang#135306 I tried auditing the rest of the visitors that called `.visit_body`, and it seems like this is the only one that was missing it. I wonder if we should modify intravisit (specifcially, that `NestedBodyFilter` stuff) to make this less likely to happen, tho... r? oli-obk
- Loading branch information
Showing
2 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @compile-flags: -Zlint-mir | ||
//@ check-pass | ||
|
||
#![feature(inline_const_pat)] | ||
|
||
fn main() { | ||
match 1 { | ||
const { | ||
|| match 0 { | ||
x => 0, | ||
}; | ||
0 | ||
} => (), | ||
_ => (), | ||
} | ||
} |