about summary refs log tree commit diff
path: root/src/doc/guide-macros.md
AgeCommit message (Collapse)AuthorLines
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-574/+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-06More test fixesAlex Crichton-3/+3
2015-01-06Fix falloutCorey Richardson-18/+18
2015-01-05Update docsKeegan McAllister-58/+97
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-17/+17
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-14Fix typo: intuitive -> unintuitiveNicholas Bishop-1/+1
2014-11-17Switch to purely namespaced enumsSteven Fackler-20/+20
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-10-29Rename fail! to panic!Steve Klabnik-3/+3
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-07Fix unclear macros documentation.Joseph Crail-1/+1
2014-10-01Link plugins guide from elsewhereKeegan McAllister-0/+7
2014-10-01Add a red-box warning to the macros guideKeegan McAllister-0/+9
2014-10-01Add some notes about macro scopingKeegan McAllister-0/+60
2014-06-27looks like a cut-n-paste error in unused codeJohn Clements-1/+2
2014-06-06doc: Turn off special features for rustdoc testsAlex Crichton-9/+26
These were only used for the markdown tests, and there's no reason they should be distinct from the other tests.
2014-05-30Remove deprecated owned vector from macro guide.Jonathan Reem-1/+1
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-16doc: Remove all uses of `~str` from the documentation.Patrick Walton-1/+1
2014-04-12Update tutorials to use new attribute syntax (#13476)Manish Goregaokar-1/+1
2014-03-24Added suggested notesnoam-0/+32
* Note on while loop not supporting named breaks. * Note on hygienic macros (and example of such within loops)
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-34/+34
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-02Move doc/ to src/doc/Alex Crichton-0/+409
We generate documentation into the doc/ directory, so we shouldn't be intermingling source files with generated files