Commit Graph

286 Commits

Author SHA1 Message Date
Steve Klabnik 665aed059a Backport TRPL, reference, and grammar.
Rather than port each individual change to these files, for the release,
I just waited to do it all at the end, in this commit. Since individual
comits made it to master, everyone should get proper credit in the
main tree, and AUTHORS includes those whose changes are here.
2015-05-13 02:57:13 -04:00
Barosl Lee 276b436530 Squeeze the last bits of tasks in documentation in favor of thread
An automated script was run against the `.rs` and `.md` files,
subsituting every occurrence of `task` with `thread`. In the `.rs`
files, only the texts in the comment blocks were affected.
2015-05-12 02:05:21 +09:00
Tamir Duberstein 29ac04402d Positive case of len() -> is_empty()
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Niko Matsakis c35c46821a Fallout in public-facing and semi-public-facing libs 2015-04-01 11:23:45 -04:00
Alex Crichton d4a2c94180 std: Clean out #[deprecated] APIs
This commit cleans out a large amount of deprecated APIs from the standard
library and some of the facade crates as well, updating all users in the
compiler and in tests as it goes along.
2015-03-31 15:49:57 -07:00
Manish Goregaokar 470996a749 Rollup merge of #23813 - steveklabnik:gh19733, r=cmr
Fixes #19733
2015-03-31 09:04:36 +05:30
Steve Klabnik 6c0314a38a Make note of noalias in unsafe reference section
Fixes #19733
2015-03-30 12:36:10 -04:00
Alex Crichton d3a4f362cb rollup merge of #23786: alexcrichton/less-quotes
Conflicts:
	src/test/auxiliary/static-function-pointer-aux.rs
	src/test/auxiliary/trait_default_method_xc_aux.rs
	src/test/run-pass/issue-4545.rs
2015-03-27 16:10:25 -07:00
Alex Crichton 990202cd0e rollup merge of #23794: brson/slicegate
Conflicts:
	src/test/run-pass/issue-13027.rs
2015-03-27 16:09:52 -07:00
Brian Anderson 1639e51f6e Feature gate *all* slice patterns. #23121
Until some backwards-compatibility hazards are fixed in #23121,
these need to be unstable.

[breaking-change]
2015-03-27 12:50:49 -07:00
Alex Crichton 3f1d57fcde rollup merge of #23285: steveklabnik/gh11794
Fixes #11794

I mostly removed superflous examples which use the standard library.

I have one more quesiton here though: threads. They're mostly a library thing, at this point, right?
2015-03-27 12:43:59 -07:00
Richo Healey 13e4270bf9 Unquote all crate names without underscores 2015-03-27 10:58:12 -07:00
Alex Crichton 43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Alex Crichton 020efc78f1 rollup merge of #23662: steveklabnik/gh23421
I assume since both shifts say the same thing, I should fix both of them, but then I realized I don't strictly know about left shift.

Fixes #23421

r? @pnkfelix
2015-03-24 14:50:48 -07:00
Steve Klabnik f2e0810cb8 correct reference wrt shifts
Fixes #23421
2015-03-24 12:58:50 -04:00
Brian Anderson e9019101a8 Add #![feature] attributes to doctests 2015-03-23 14:40:26 -07:00
FuGangqiang 7ec80fa31c add lifetime for while and for expression 2015-03-23 04:54:27 +05:30
FuGangqiang 5836efdfe7 fix the attributes sytax 2015-03-23 04:54:27 +05:30
Johannes Oertel da96d22d3a Rename should_fail to should_panic in docs 2015-03-19 08:24:38 +05:30
Steve Klabnik ac67729baf Remove stdlib stuff from the Reference
Fixes #11794
2015-03-16 17:55:13 -04:00
Nick Cameron 432011d143 Fallout in testing. 2015-03-16 11:03:54 +13:00
mdinger fb0ee646e9 Add monospace font back to literals table 2015-03-12 00:37:47 -04:00
Manish Goregaokar fa8c6d94d0 Rollup merge of #23185 - steveklabnik:gh20051, r=alexcrichton
Fixes #20051
2015-03-10 14:59:39 +05:30
Steve Klabnik 7a86bfc5df Shrink table in the reference
Fixes #20051
2015-03-09 16:51:21 -04:00
bors 777f5d9599 Auto merge of #23219 - Manishearth:rollup, r=Manishearth 2015-03-09 16:02:29 +00:00
Manish Goregaokar 1149b4d08d Rollup merge of #22917 - randfur:master, r=steveklabnik
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-09 00:06:03 +05:30
Steve Klabnik 1014b22b31 remove confusing language about casting types
Fixes #17481
2015-03-08 10:35:58 -04:00
Keegan McAllister 491054f08e Make #[derive(Anything)] into sugar for #[derive_Anything]
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-06 18:20:16 -08:00
Huon Wilson 84b060ce29 Add #[allow_internal_unstable] to track stability for macros better.
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-06 00:18:28 +11:00
bors 68740b4054 Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallister
Fixes #19674
Fixes #17396 (already closed, yeah)

cc @kmcallister , @cmr
2015-03-05 04:32:51 +00:00
Piotr Czarnecki 3541abedeb Add quasiquote for matchers and attributes 2015-03-04 16:13:37 +01:00
Huon Wilson c195783c05 Feature gate #[static_assert].
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-03 13:00:10 +11:00
Alan Cutter 9b873faef5 Fix missed doc grammar rule rename from vec_elems to array_elems 2015-03-01 15:37:40 +11:00
Manish Goregaokar 040a811b91 Rollup merge of #22884 - japaric:obsolete, r=alexcrichton
This is leftover from #21843

If you still have `|&:| {}` closures in your code, simply remove the `&:` part.

[breaking-change]
2015-02-28 19:19:00 +05:30
Jorge Aparicio 7ad2e22e4e remove leftover annotations 2015-02-27 23:35:07 -05:00
Alexander Bliskovsky f618e2e1ec Changed prose to assert_eq! macro. 2015-02-25 20:29:13 -05:00
Alexander Bliskovsky 65b0655230 Added documentation of backslash ending string literals.
Closes #22698
2015-02-25 20:26:24 -05:00
Keegan McAllister 848a7e6921 Enhance and move information about macro debugging
Fixes #22424.
2015-02-24 16:34:18 -08:00
Manish Goregaokar 05d9999bb4 Rollup merge of #22711 - lummax:patch-1, r=dotdash
Update the reference page to the change in #20680.
2015-02-24 12:08:31 +05:30
Manish Goregaokar 4e73d4950d Rollup merge of #22660 - achernya:tuple-reference, r=alexcrichton
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-23 23:28:48 +05:30
lummax 282e278460 doc: Fix target_{word_size,pointer_width} renaming
Update the reference page to the change in #20680.
2015-02-23 14:53:16 +01:00
Manish Goregaokar 46a545100a Rollup merge of #22270 - steveklabnik:gh22152, r=huonw
Fixes #22152
2015-02-23 14:43:38 +05:30
Steve Klabnik d7c02c39e5 Link from literals to their representation
Fixes #22152
2015-02-22 14:13:16 -05:00
Alexander Chernyakhovsky 928341e188 Include tuple indexing in the Reference.
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-22 00:25:12 -05:00
bors 2b01a37ec3 Auto merge of #21959 - dhuseby:bitrig-support, r=brson
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-21 09:20:48 +00:00
Alex Crichton 1506b34e0c rollup merge of #22286: nikomatsakis/variance-4b
Conflicts:
	src/librustc/middle/infer/combine.rs
	src/librustc_typeck/check/wf.rs
2015-02-18 15:52:01 -08:00
Alex Crichton 231eeaa35b rollup merge of #22502: nikomatsakis/deprecate-bracket-bracket
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-18 15:48:40 -08:00
Niko Matsakis 9ea84aeed4 Replace all uses of &foo[] with &foo[..] en masse. 2015-02-18 17:36:03 -05:00
Niko Matsakis ef42c2befd Fallout: docs, elided examples often elided too much. 2015-02-18 10:25:13 -05:00
Niko Matsakis 8c34b26606 Update docs by dropping suffixes except where they served to instruct. 2015-02-18 09:09:14 -05:00