about summary refs log tree commit diff
path: root/src/doc/reference.md
AgeCommit message (Collapse)AuthorLines
2014-12-21rollup merge of #19996: th0114nd/boolean-indenAlex Crichton-1/+1
The current indentation level would indicate that Boolean literals are on the same level as Integer and Float literals under Number literals, unindenting moves it to the same scope as Character and string literals, Byte and byte string literals, and Number literals under Literals.
2014-12-19Changed LaTex $\bot$s to ⊥th0114nd-2/+2
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation. Part of the problem was that putting a math unicode character wasn't rendering properly in the pdf, so extra steps were needed to define the unicode charecter ⊥ in reference.tex closes #15285
2014-12-18Boolean literals are not Number literalsth0114nd-1/+1
The current indentation level would indicate that Boolean literals are on the same level as Integer and Float literals under Number literals, unindenting moves it to the same scope as Character and string literals, Byte and byte string literals, and Number literals under Literals.
2014-12-18Put quotes around "as", because it's a keyword.th0114nd-1/+1
2014-12-15rollup merge of #19763: csouth3/remove-featuregatesBrian Anderson-6/+0
This is a revival of #19517 (per request of @alexcrichton) now that the new snapshots have landed. We can now remove the last feature gates for if_let, while_let, and tuple_indexing scattered throughout the test sources since these features have been added to Rust. Closes #19473.
2014-12-15rollup merge of #19746: steveklabnik/gh9266Brian Anderson-3/+3
Fixes #9266
2014-12-14Update guide/intro to take into account the removal of `proc`.Niko Matsakis-41/+12
cc @steveklabnick
2014-12-14auto merge of #19669 : alfie/rust/master, r=sanxiynbors-2/+2
2014-12-12Remove feature gate directives for `if_let`, `while_let`, and `tuple_indexing`.Chase Southwood-6/+0
2014-12-11reference: type definition -> type aliasSteve Klabnik-3/+3
Fixes #9266
2014-12-09doc: grammar fixAlfie John-2/+2
2014-12-09rollup merge of #19615: steveklabnik/gh19595Alex Crichton-7/+11
Fixes #19595.
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+4
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-07Correct the reference with regards to floatsSteve Klabnik-7/+11
Fixes #19595.
2014-12-05Utilize fewer reexportsCorey Farwell-3/+3
In regards to: https://github.com/rust-lang/rust/issues/19253#issuecomment-64836729 This commit: * Changes the #deriving code so that it generates code that utilizes fewer reexports (in particur Option::* and Result::*), which is necessary to remove those reexports in the future * Changes other areas of the codebase so that fewer reexports are utilized
2014-11-29Fix typo in reference.mdkulakowski-1/+1
2014-11-26Remove special casing for some meta attributesSteven Fackler-8/+3
Descriptions and licenses are handled by Cargo now, so there's no reason to keep these attributes around.
2014-11-25auto merge of #19172 : alfie/rust/impl-traitless, r=steveklabnikbors-1/+14
An example of how implementations work without traits would be handy
2014-11-22auto merge of #19136 : alfie/rust/master, r=steveklabnikbors-1/+6
An example of how type definitions work would be handy
2014-11-21doc: adding example for implementations without traitsAlfie John-1/+14
2014-11-21auto merge of #18967 : aturon/rust/remove-runtime, r=alexcrichtonbors-4/+4
This PR completes the removal of the runtime system and green-threaded abstractions as part of implementing [RFC 230](https://github.com/rust-lang/rfcs/pull/230). Specifically: * It removes the `Runtime` trait, welding the scheduling infrastructure directly to native threads. * It removes `libgreen` and `libnative` entirely. * It rewrites `sync::mutex` as a trivial layer on top of native mutexes. Eventually, the two modules will be merged. * It hides the vast majority of `std::rt`. This completes the basic task of removing the runtime system (I/O and scheduling) and components that depend on it. After this lands, a follow-up PR will pull the `rustrt` crate back into `std`, turn `std::task` into `std::thread` (with API changes to go along with it), and completely cut out the remaining startup/teardown sequence. Other changes, including new [TLS](https://github.com/rust-lang/rfcs/pull/461) and synchronization are in the RFC or pre-RFC phase. Closes #17325 Closes #18687 [breaking-change] r? @alexcrichton
2014-11-20Fallout from libgreen and libnative removalAaron Turon-4/+4
2014-11-20Add examples for all literal types in reference grouped togethermdinger-0/+60
2014-11-20doc: adding example for type definitionsAlfie John-1/+6
2014-11-20auto merge of #19105 : alfie/rust/master, r=thestingerbors-9/+8
As discussed in pull #19068, trying to make the wording more clear for unsafe code vs undefined behavior.
2014-11-19rollup merge of #19107: cakebaker/change_an_box_to_a_boxJakub Bukaj-5/+5
2014-11-19rollup merge of #19103: huonw/literal-suffixesJakub Bukaj-23/+20
Futureproof Rust for fancier suffixed literals. The Rust compiler tokenises a literal followed immediately (no whitespace) by an identifier as a single token: (for example) the text sequences `"foo"bar`, `1baz` and `1u1024` are now a single token rather than the pairs `"foo"` `bar`, `1` `baz` and `1u` `1024` respectively. The compiler rejects all such suffixes in the parser, except for the 12 numeric suffixes we have now. I'm fairly sure this will affect very few programs, since it's not currently legal to have `<literal><identifier>` in a Rust program, except in a macro invocation. Any macro invocation relying on this behaviour can simply separate the two tokens with whitespace: `foo!("bar"baz)` becomes `foo!("bar" baz)`. This implements [RFC 463](https://github.com/rust-lang/rfcs/blob/master/text/0463-future-proof-literal-suffixes.md), and so closes https://github.com/rust-lang/rust/issues/19088.
2014-11-19rollup merge of #19072: cakebaker/add_missing_dotJakub Bukaj-1/+1
2014-11-19Reference: Change "an box" to "a box"Daniel Hofstetter-5/+5
2014-11-20Update documentation for literal suffixes.Huon Wilson-23/+20
This changes the stated grammar of literals to move all suffixes into the generic literal production.
2014-11-19doc: clarifying unsafe code vs undefined behaviorAlfie John-9/+8
2014-11-19clearly define `int` and `uint` to fix unsoundnessDaniel Micay-11/+8
This fixes the gap in the language definition causing #18726 by defining a clear bound on the maximum size for libraries to enforce. Closes #18069
2014-11-18Update test for equivalency to include region binders in object types, add ↵Niko Matsakis-6/+2
new tests relating to HRTB, consolidate the `unboxed_closures` and `overloaded_calls` feature gates.
2014-11-18Place parenthetical notation under the `unboxed_closure` feature-gate.Niko Matsakis-4/+0
Consolidate the `unboxed_closure_sugar` and `unboxed_closure` feature gates.
2014-11-18Reference: Add missing third dot of rangeDaniel Hofstetter-1/+1
2014-11-18rollup merge of #19026: alfie/doc-fixesJakub Bukaj-5/+5
Updated all the adjacent character literals in the BCNF that cannot have an optional space between them
2014-11-17Switch to purely namespaced enumsSteven Fackler-17/+17
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-17doc: extend a893397 to make whole document consistentAlfie John-5/+5
2014-11-16auto merge of #18995 : alfie/rust/comment-docs, r=aturonbors-1/+1
Start comment is a string literal while end comment is made up of two character literals. This change is to make them consistent.
2014-11-16Update the referenceJakub Bukaj-4/+8
2014-11-16rollup merge of #18989: alex/fix-typosJakub Bukaj-6/+6
2014-11-16doc: make end comment consistent with start commentAlfie John-1/+1
2014-11-16Move FromStr to core::strBrendan Zabarauskas-2/+1
2014-11-15Fixed several typosAlex Gaynor-6/+6
2014-11-13Reference: Fix list in Expressions sectionDaniel Hofstetter-3/+4
2014-11-06rollup merge of #18373 : steveklabnik/gh18288Alex Crichton-2/+4
2014-11-06expand description of the link attributeSteve Klabnik-2/+4
Fixes #18288
2014-11-03rollup merge of #18572 : cakebaker/small_doc_changesAlex Crichton-4/+4
2014-11-03rollup merge of #18522 : jbcrail/rename-missing-doc-attributeAlex Crichton-8/+8
2014-11-03rollup merge of #18519 : Gankro/collect-smashAlex Crichton-8/+8