We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8eb68f2 commit 607d784Copy full SHA for 607d784
stage-5/function_reference_mutable.rs
@@ -0,0 +1,9 @@
1
+fn modifies(x: &mut f64) {
2
+ *x = 1.0
3
+}
4
+
5
+fn main() {
6
+ let mut val = 18.5;
7
+ modifies(&mut val);
8
+ println!("{}", val);
9
0 commit comments