Skip to content

Commit 726fb55

Browse files
committed
Fix documentation of BorrowKind::Fake
1 parent 217a4df commit 726fb55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/rustc_middle/src/mir/syntax.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ pub enum BorrowKind {
170170
///
171171
/// This is used when lowering index expressions and matches. This is used to prevent code like
172172
/// the following from compiling:
173-
/// ```compile_fail,E0506
174-
/// let mut x = vec![vec![0, 1]];
175-
/// let y = vec![];
173+
/// ```compile_fail,E0510
174+
/// let mut x: &[_] = &[[0, 1]];
175+
/// let y: &[_] = &[];
176176
/// let _ = x[0][{x = y; 1}];
177177
/// ```
178178
/// ```compile_fail,E0510

0 commit comments

Comments
 (0)