Skip to content

Remove managed pointers from tutorial #13328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ckendell
Copy link
Contributor

@ckendell ckendell commented Apr 4, 2014

Fixes #13287
Complete work started in #13298

Removed all reference to and sample code using managed boxes/pointers.

ckendell and others added 10 commits April 4, 2014 15:06
…Code

examples in relevant sections were similarly altered.
It's surprising that `RefCell::get()` is implicitly doing a clone
on a value. This patch removes it and replaces all users with
either `.borrow()` when we can autoderef, or `.borrow().clone()`
when we cannot.
This fixes rust-lang#13238. It avoids an infinite loop when compiling
the tests with `-g`. Without this change, the debuginfo on
`black_box` prevents the method from being inlined, which
allows llvm to convert `silent_recurse` into a tail-call. This
then loops forever instead of consuming all the stack like it
is supposed to. This patch forces inlining `black_box`, which
triggers the right error.
librustdoc: instead of skipping ignored tests, pass them to libtest
so it can report them as such.  If a test is marked as `notrust`,
however, it will not show up in the final report.
@ckendell
Copy link
Contributor Author

ckendell commented Apr 4, 2014

I'm not sure if this pull request is well formatted. Only the last two commits above are directly relevant. The rest showed up when I rebased with mozilla/rust:master. If it's not correctly, please do leave a message if it's obvious what I did wrong and I will promptly fix the pull request.

@thestinger
Copy link
Contributor

Yeah, something is wrong here. It looks like you merged master at some point rather than rebasing. You can do git rebase -i on the parent commit before all these and delete the other commits. Then rebase (not merge) your commits onto the changes from master. An alternative would be getting master to a clean up-to-date state, checking out a new branch and using git cherry-pick to apply your changes to it.

@ckendell ckendell closed this Apr 4, 2014
@ckendell ckendell deleted the remove_managed_pointers_from_tutorial branch April 4, 2014 23:44
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2022
Add proc-macro dependency to rustc crates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove mentions of managed pointers from the tutorial
5 participants