-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Description
Line 76 in 3cea93b
| //let xr2 = &x; // Error - there is already a mutable ref, so we |
Ignoring irrelevant grokking, the documentation claims only one mutable borrowed ptr can be taken and that a non mutable ptr cannot be borrowed if already a mutable borrowed ptr exists - both seem incorrect. See the output I'm getting (please ignore the irrelevant grokking) when running below:
C:\Users\lamva\Documents\GitHub\grokking-rust\first_rust_vs>cargo run
Finisheddevprofile [unoptimized + debuginfo] target(s) in 0.15s
Runningtarget\debug\first_rust_vs.exe
Fib(1) = 1
Fib(5) = 8
Fib(10) = 89
from foo: 5
from foo: 5
from foo2: 5
from foo: 5
and the new val: 15
Metadata
Metadata
Assignees
Labels
No labels