about summary refs log tree commit diff
path: root/src/doc/guide-pointers.md
AgeCommit message (Collapse)AuthorLines
2019-02-13Convert old doc links to current editionLzu Tao-1/+1
Use footnote style to bypass the tidy check
2015-06-29Change removal notice for pointer guide.Steve Klabnik-3/+6
This is a bit outdated.
2015-01-16Grammar tweak to old guide stub documents.Tim Parenti-1/+1
Removes extra "the" from the phrase "the the Rust Programming Language book", which isn't particularly grammatical.
2015-01-09Add stub deprecation files for each of the old guides.Huon Wilson-0/+4
There are hundreds of stackoverflow answers, reddit posts and blog articles that link to these documents, so it's a nicer user experience if they're not plain 404s. The intention is to let these hang around only for relatively short while. The alpha is likely to bring in many new users and they will be reading the documents mentioned above.
2015-01-08"The Rust Programming Language"Steve Klabnik-785/+0
This pulls all of our long-form documentation into a single document, nicknamed "the book" and formally titled "The Rust Programming Language." A few things motivated this change: * People knew of The Guide, but not the individual Guides. This merges them together, helping discoverability. * You can get all of Rust's longform documentation in one place, which is nice. * We now have rustbook in-tree, which can generate this kind of documentation. While its style is basic, the general idea is much better: a table of contents on the left-hand side. * Rather than a almost 10,000-line guide.md, there are now smaller files per section.
2015-01-07Test fixes and rebase conflictsAlex Crichton-27/+28
2015-01-06More test fixesAlex Crichton-1/+1
2014-12-10Fix up some {ignore} and {notrust}sSteve Klabnik-8/+8
These should be properly annotated instead. Fixes #16219.
2014-12-09Test fixes and rebase conflicts from the rollupAlex Crichton-2/+2
2014-12-07remove usage of notrust from the docsSteve Klabnik-9/+9
Fixes #19599
2014-12-04auto merge of #18613 : steveklabnik/rust/ownership_guide, r=huonwbors-4/+4
This is a work in progress, but this should get *extensive* review, so I'm putting it up early and often. This is the start of a draft of the new 'ownership guide,' which explains ownership, borrowing, etc. I'm feeling better about this framing than last time's, but we'll see.
2014-11-26rollup merge of #19325: ucarion/pointers-doc-formattingAlex Crichton-4/+4
The "Returning Pointers" section of the pointers guide broke from the convention of putting code between backticks. This PR fixes that. There's also a little trailing whitespace I took care of.
2014-11-26Lifetime guide -> ownership guideSteve Klabnik-4/+4
2014-11-25Fix formatting of the pointers guide.Ulysse Carion-4/+4
2014-11-25Make note about cross-borrowing.Steve Klabnik-1/+22
Fixes #19302.
2014-11-17Switch to purely namespaced enumsSteven Fackler-1/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-13Don't use rust keyword for fake codeIan Connolly-8/+8
2014-10-27Guide: Add missing "a"Daniel Hofstetter-1/+1
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