diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index c900341cadd8..2e8b3fefccfd 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -691,3 +691,21 @@ mod issue_13092 { } } } + +mod crash_check_13128 { + struct A; + + impl A { + fn a() { + struct B; + + impl Iterator for &B { // pushes a NoCheck + type Item = A; // Pops the NoCheck + + fn next(&mut self) -> Option { // Lints A -> Self + Some(A) + } + } + } + } +}