about summary refs log tree commit diff
path: root/src/doc/guide-pointers.md
AgeCommit message (Collapse)AuthorLines
2014-10-02docs: remove mentions of Gc.Eduard Burtescu-13/+0
2014-09-24guide-pointers.md: C sample code should match the Rust version.NODA, Kai-0/+1
Fix rust-lang/rust#17255
2014-08-30note about ref patterns in pointer guideSteve Klabnik-0/+25
Fixes #13602
2014-08-19Make variable mutable to allow mutable referenceAmy Unger-1/+1
2014-08-10Fix typoJake Scott-1/+1
2014-07-31Fix heading levels in pointer guideSteve Klabnik-3/+3
2014-07-31fix formatting in pointer guide tableSteve Klabnik-12/+9
2014-07-21Guide Redux: PointersSteve Klabnik-262/+603
2014-07-17librustc: Remove cross-borrowing of `Box<T>` to `&T` from the language,Patrick Walton-1/+1
except where trait objects are involved. Part of issue #15349, though I'm leaving it open for trait objects. Cross borrowing for trait objects remains because it is needed until we have DST. This will break code like: fn foo(x: &int) { ... } let a = box 3i; foo(a); Change this code to: fn foo(x: &int) { ... } let a = box 3i; foo(&*a); [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-2/+2
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-02docs: Stop using `notrust`Florian Gilcher-3/+3
Now that rustdoc understands proper language tags as the code not being Rust, we can tag everything properly. This change tags examples in other languages by their language. Plain notations are marked as `text`. Console examples are marked as `console`. Also fix markdown.rs to not highlight non-rust code.
2014-05-27auto merge of #14364 : alexcrichton/rust/libdebug, r=brsonbors-9/+11
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-9/+11
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-24get over bold text madness, changes per PR, brought the "returning pointers" ↵Alan Andrade-10/+53
section back to pointers guide
2014-05-23Cleanup lifetime guideAlan Andrade-148/+23
Clean pointers guide
2014-05-16guide-pointers: minor nitsKevin Butler-2/+2
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-18/+19
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-03Remove comment about semicolons for inner attributes from docs and adjust ↵Kevin Butler-6/+6
comments.
2014-04-17Remove rule that is confusingBrandon Waskiewicz-2/+3
The original text stated that one should only return a unique or managed pointer if you were given one in the first place. This makes it sound as if the function *should* return a unique pointer if it were given a unique pointer. The rest of the section goes on to describe why this is bad, and the example of bad code does exactly what the rule just said to do. I reworded the original rule into a reference to the more concise rule mentioned at the bottom of the section, which helps add emphasis (a la 'it bears repeating').
2014-04-12Update tutorials to use new attribute syntax (#13476)Manish Goregaokar-1/+1
2014-03-31num: rm wrapping of `Float` methods as functionsDaniel Micay-3/+1
The `Float` trait methods will be usable as functions via UFCS, and we came to a consensus to remove duplicate functions like this a long time ago. It does still make sense to keep the duplicate functions when the trait methods are static, unless the decision to leave out the in-scope trait name resolution for static methods changes.
2014-02-02Move doc/ to src/doc/Alex Crichton-0/+492
We generate documentation into the doc/ directory, so we shouldn't be intermingling source files with generated files