Skip to content

Commit

Permalink
Auto merge of rust-lang#78779 - LeSeulArtichaut:ty-visitor-return, r=…
Browse files Browse the repository at this point in the history
…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.~~
  • Loading branch information
bors committed Nov 17, 2020
2 parents 3567ea5 + 1b55cc7 commit a467c51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clippy_lints/src/redundant_clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ impl<'a, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'tcx> {
struct 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
}
}
Expand Down

0 comments on commit a467c51

Please sign in to comment.