We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c1daf9 commit 789cc47Copy full SHA for 789cc47
posts/2020-07-30-Rust-1.45.1.md
@@ -40,11 +40,17 @@ practice: the code must have inputs consisting of entirely constant values and
40
no control flow or function calls in between.
41
42
```rust
43
-let mut foo = Foo { x: 42 };
44
-let x = &mut foo.x;
45
-*x = 13;
46
-let y = foo;
47
-println!("{}", y.x); // -> 42; expected result: 13
+struct Foo {
+ x: u32,
+}
+
+fn main() {
48
+ let mut foo = Foo { x: 42 };
49
+ let x = &mut foo.x;
50
+ *x = 13;
51
+ let y = foo;
52
+ println!("{}", y.x); // -> 42; expected result: 13
53
54
```
55
56
## Contributors to 1.45.1
0 commit comments