about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-11-30 18:02:21 -0500
committerSteve Klabnik <steve@steveklabnik.com>2015-11-30 18:02:21 -0500
commit30221eaedf5dc6953274841c2a4017193bf23564 (patch)
tree9fbc51253586d2b6c76df88d2b3abe7d8a45335a /src/rustllvm/RustWrapper.cpp
parent5000bd25d9dedf5eb335f290bf4f730d756c3da8 (diff)
parent7728742a4482b489111d8ebbfbbb283eb6615137 (diff)
downloadrust-30221eaedf5dc6953274841c2a4017193bf23564.tar.gz
rust-30221eaedf5dc6953274841c2a4017193bf23564.zip
Rollup merge of #30115 - nilcons-contrib:fix-book-stack, r=steveklabnik
The `f` argument will reference the actual value in the `d` box, not the box in the `bar`'s stack frame.

I am just learning Rust, so I don't know how to explain this well, but just from `f`'s type it is clear that it will be a pointer to an `i32`, not a pointer to a pointer. Some `println!("{:p}", ...)`'s can easily confirm this.

I would actually suggest to remove/simplify this part of the example. This is a subtle issue that can easily confuse people at the early stages of familiarizing with the language. (As I got confused by it. :))
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions