Skip to content

Commit aed1ae4

Browse files
committed
remove an infinite loop
1 parent d7b8a65 commit aed1ae4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_lint/src/for_loop_over_fallibles.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ declare_lint! {
3131
/// ```rust
3232
/// # let opt = Some(1);
3333
/// # let res: Result<i32, std::io::Error> = Ok(1);
34-
/// # let recv = || Some(1);
34+
/// # let recv = || None::<i32>;
3535
/// for x in opt { /* ... */}
3636
/// for x in res { /* ... */ }
3737
/// for x in recv() { /* ... */ }
@@ -41,7 +41,7 @@ declare_lint! {
4141
/// ```rust
4242
/// # let opt = Some(1);
4343
/// # let res: Result<i32, std::io::Error> = Ok(1);
44-
/// # let recv = || Some(1);
44+
/// # let recv = || None::<i32>;
4545
/// if let Some(x) = opt { /* ... */}
4646
/// if let Ok(x) = res { /* ... */ }
4747
/// while let Some(x) = recv() { /* ... */ }

0 commit comments

Comments
 (0)