Skip to content

Commit 69cba8c

Browse files
committed
error code doc change
1 parent a88fb4a commit 69cba8c

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_error_codes/src/error_codes

1 file changed

+4
-4
lines changed

compiler/rustc_error_codes/src/error_codes/E0504.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ Erroneous code example:
77

88
```compile_fail
99
struct FancyNum {
10-
num: u8,
10+
s: String,
1111
}
1212
1313
fn main() {
14-
let fancy_num = FancyNum { num: 5 };
14+
let fancy_num = FancyNum { s: "".into() };
1515
let fancy_ref = &fancy_num;
1616
1717
let x = move || {
18-
println!("child function: {}", fancy_num.num);
18+
println!("child function: {}", fancy_num.s);
1919
// error: cannot move `fancy_num` into closure because it is borrowed
2020
};
2121
2222
x();
23-
println!("main function: {}", fancy_ref.num);
23+
println!("main function: {}", fancy_ref.s);
2424
}
2525
```
2626

0 commit comments

Comments
 (0)