mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk
Introduce `TypeVisitor::BreakTy` Implements MCP rust-lang/compiler-team#383. r? `@ghost` cc `@lcnr` `@oli-obk` ~~Blocked on FCP in rust-lang/compiler-team#383.~~
This commit is contained in:
commit
a467c514a3
@ -563,7 +563,9 @@ impl<'a, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'tcx> {
|
|||||||
struct ContainsRegion;
|
struct ContainsRegion;
|
||||||
|
|
||||||
impl TypeVisitor<'_> for ContainsRegion {
|
impl TypeVisitor<'_> for ContainsRegion {
|
||||||
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<()> {
|
type BreakTy = ();
|
||||||
|
|
||||||
|
fn visit_region(&mut self, _: ty::Region<'_>) -> ControlFlow<Self::BreakTy> {
|
||||||
ControlFlow::BREAK
|
ControlFlow::BREAK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user