about summary refs log tree commit diff
path: root/src/doc/reference.md
AgeCommit message (Collapse)AuthorLines
2015-03-09Shrink table in the referenceSteve Klabnik-8/+8
Fixes #20051
2015-03-09Auto merge of #23219 - Manishearth:rollup, r=Manishearthbors-4/+0
2015-03-09Rollup merge of #22917 - randfur:master, r=steveklabnikManish Goregaokar-1/+1
The docs currently define `array_expr`s as: array_expr : '[' \"mut\" ? vec_elems? ']' ; array_elems : [expr [',' expr]*] | [expr ',' \"..\" expr] ; `vec_elems` is not defined anywhere else so it is probably a typo for `array_elems`.
2015-03-08remove confusing language about casting typesSteve Klabnik-4/+0
Fixes #17481
2015-03-06Make #[derive(Anything)] into sugar for #[derive_Anything]Keegan McAllister-0/+4
This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase. If the custom_derive feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone] directly, so this does not change the stable language. This commit also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a [breaking-change]
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-0/+8
Unstable items used in a macro expansion will now always trigger stability warnings, *unless* the unstable items are directly inside a macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns unless the span of the unstable item is a subspan of the definition of a macro marked with that attribute. E.g. #[allow_internal_unstable] macro_rules! foo { ($e: expr) => {{ $e; unstable(); // no warning only_called_by_foo!(); }} } macro_rules! only_called_by_foo { () => { unstable() } // warning } foo!(unstable()) // warning The unstable inside `foo` is fine, due to the attribute. But the `unstable` inside `only_called_by_foo` is not, since that macro doesn't have the attribute, and the `unstable` passed into `foo` is also not fine since it isn't contained in the macro itself (that is, even though it is only used directly in the macro). In the process this makes the stability tracking much more precise, e.g. previously `println!("{}", unstable())` got no warning, but now it does. As such, this is a bug fix that may cause [breaking-change]s. The attribute is definitely feature gated, since it explicitly allows side-stepping the feature gating system.
2015-03-05Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallisterbors-0/+8
Fixes #19674 Fixes #17396 (already closed, yeah) cc @kmcallister , @cmr
2015-03-04Add quasiquote for matchers and attributesPiotr Czarnecki-0/+8
2015-03-03Feature gate `#[static_assert]`.Huon Wilson-0/+6
The API this exposes is a little strange (being attached to `static`s), so it makes sense to conservatively feature gate it. If it is highly popular, it is possible to reverse this gating.
2015-03-01Fix missed doc grammar rule rename from vec_elems to array_elemsAlan Cutter-1/+1
2015-02-28Rollup merge of #22884 - japaric:obsolete, r=alexcrichtonManish Goregaokar-2/+2
This is leftover from #21843 If you still have `|&:| {}` closures in your code, simply remove the `&:` part. [breaking-change]
2015-02-27remove leftover annotationsJorge Aparicio-2/+2
2015-02-25Changed prose to assert_eq! macro.Alexander Bliskovsky-2/+2
2015-02-25Added documentation of backslash ending string literals.Alexander Bliskovsky-1/+14
Closes #22698
2015-02-24Enhance and move information about macro debuggingKeegan McAllister-5/+12
Fixes #22424.
2015-02-24Rollup merge of #22711 - lummax:patch-1, r=dotdashManish Goregaokar-4/+4
Update the reference page to the change in #20680.
2015-02-23Rollup merge of #22660 - achernya:tuple-reference, r=alexcrichtonManish Goregaokar-1/+3
The Rust Reference should include the tuple indexing (using a number as a field) notation; currently it is only available on http://doc.rust-lang.org/std/primitive.tuple.html and not easily searchable.
2015-02-23doc: Fix `target_{word_size,pointer_width}` renaminglummax-4/+4
Update the reference page to the change in #20680.
2015-02-23Rollup merge of #22270 - steveklabnik:gh22152, r=huonwManish Goregaokar-0/+3
Fixes #22152
2015-02-22Link from literals to their representationSteve Klabnik-0/+3
Fixes #22152
2015-02-22Include tuple indexing in the Reference.Alexander Chernyakhovsky-1/+3
The Rust Reference should include the tuple indexing (using a number as a field) notation; currently it is only available on http://doc.rust-lang.org/std/primitive.tuple.html and not easily searchable.
2015-02-21Auto merge of #21959 - dhuseby:bitrig-support, r=brsonbors-2/+2
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-5/+5
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-18Fallout: docs, elided examples often elided too much.Niko Matsakis-5/+5
2015-02-18Update docs by dropping suffixes except where they served to instruct.Niko Matsakis-12/+8
2015-02-17Rollup merge of #22364 - Manishearth:rfc-572-forbid-attr, r=nikomatsakisManish Goregaokar-0/+7
fixes #22203 r? @nikomatsakis This breaks code that might be using attributes randomly, so it's technically a [breaking-change]
2015-02-17Rollup merge of #22413 - steveklabnik:gh22386, r=alexcrichtonManish Goregaokar-3/+2
Fixes #22386
2015-02-17Rollup merge of #22392 - laijs:fix-reference-md-plugin-link, r=steveklabnikManish Goregaokar-1/+1
book/syntax-extensions.html was renamed to book/plugins.html, the link should be also updated. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-02-17Add custom_attribute and rustc_attrs to reference.mdManish Goregaokar-0/+7
2015-02-16remove 'crate files' sentenceSteve Klabnik-3/+2
Fixes #22386
2015-02-16reference: fix outdated link for Compiler pluginsLai Jiangshan-1/+1
book/syntax-extensions.html was renamed to book/plugins.html, the link should be also updated. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-02-15Rollup merge of #22308 - steveklabnik:gh19278, r=brsonManish Goregaokar-3/+4
Fixes #19278
2015-02-15Rollup merge of #22307 - steveklabnik:gh14849, r=huonwManish Goregaokar-3/+13
Fixes #14849
2015-02-15Rollup merge of #22284 - steveklabnik:fix_another_lie, r=nikomatsakisManish Goregaokar-3/+0
This isn't something we want to guarantee. r? @nikomatsakis
2015-02-15Rollup merge of #22277 - pnkfelix:reference-update-feature-gate-list, ↵Manish Goregaokar-10/+52
r=steveklabnik Added all active features to the list in reference.md. Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :) Ensured that the feature gate list in reference.md is kept in alphabetical order.
2015-02-15Rollup merge of #22269 - steveklabnik:gh22136, r=alexcrichtonManish Goregaokar-3/+2
Fixes #22136
2015-02-13Generate grammar.html and link to it from the reference.Steve Klabnik-3/+4
Fixes #19278
2015-02-13clarfiy reference with regards to the value of block expressionsSteve Klabnik-3/+13
Fixes #14849
2015-02-13Don't specify tuple layout.Steve Klabnik-3/+0
This isn't something we want to guarantee.
2015-02-13Added all active features to the list in reference.md.Felix S. Klock II-10/+52
Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :) Ensured that the feature gate list in reference.md is kept in alphabetical order.
2015-02-13Remove outdated information about copy/move from the referenceSteve Klabnik-3/+2
Fixes #22136
2015-02-12Updated usage of StrExt.parse() as per a recommendation by edwardw.Nick Sarten-1/+1
2015-02-12Updated documentation to use range notation syntax.Nick Sarten-3/+3
Replaced outdated use of the `range(start, end)` function where approriate with `start..end`, and tweaked the examples to compile and run with the latest rust. I also fixed two periphery compile issues in reference.md which were occluding whether there were any new errors created by these changes, so I fixed them.
2015-02-11bitrig integrationDave Huseby-2/+2
2015-02-11opt into box_patterns in the reference doc that uses them.Felix S. Klock II-0/+3
2015-02-10rollup merge of #22130: steveklabnik/gh20172Alex Crichton-3/+1
Fixes #20172
2015-02-10rollup merge of #22094: alkor/cleanup-show-stringAlex Crichton-2/+2
Rename several remaining `Show`s to Debug, `String`s to Display (mostly in comments and docs). Update reference.md: - derive() no longer supports Zero trait - derive() now supports Copy trait
2015-02-10rollup merge of #22072: geofft/doc-byte-string-literalAlex Crichton-5/+7
This was correct in the EBNF, but not in the prose (which seems to have been copied-and-pasted from regular string literals).