You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//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
Finished dev profile [unoptimized + debuginfo] target(s) in 0.15s
Running target\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
The text was updated successfully, but these errors were encountered:
r4cppp/borrowed.md
Line 76 in 3cea93b
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:
https://github.com/lamvak/grokking-rust/blob/e01839a2d589f6a57c4058bbd37be8f908b0280b/first_rust_vs/src/main.rs#L23
The text was updated successfully, but these errors were encountered: