about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2017-06-13Rollup merge of #42496 - Razaekel:feature/integer_max-min, r=BurntSushiCorey Farwell-0/+8
Add max and min to Ord Pursuant to issue #25663, this PR adds max and min methods with default implementations to std::cmp::Ord. It also modifies std::cmp::max|min to internally alias to Ord::max|min, so that any overrides of the default implementations are automatically used by std::cmp::max|min. Closes #25663
2017-06-12Fill in tracking issue for the profile featureMarco Castelluccio-2/+2
2017-06-07Auto merge of #42378 - steveklabnik:rustdoc-docs, r=frewsxcvbors-0/+500
The Rustdoc book A work-in-progress start for docs for rustdoc. This doesn't actually generate the docs yet; I wanted to open this PR to get feedback on this approach, the chapters headings themselves, and to see if anyone wanted to help fill in the ones that aren't done yet. Start of #42322. /cc @rust-lang/dev-tools @rust-lang/docs
2017-06-06Add max and min default fns to Ord traitNick Whitney-0/+8
Pursuant to issue #25663, this commit adds the max and min functions to the Ord trait, enabling items that implement Ord to use UFCS (ex. 1.max(2)) instead of the longer std::cmp::max(1,2) format.
2017-06-06Suggest 'profile' flagMarco Castelluccio-2/+2
2017-06-06Add basic documentation for the profile featureMarco Castelluccio-0/+16
2017-06-05fix testssteveklabnik-0/+2
2017-06-05address review feedbacksteveklabnik-18/+10
2017-06-04Merge branch 'profiling' of github.com:whitequark/rust into profilingMarco Castelluccio-0/+18
2017-06-03Rollup merge of #42353 - steveklabnik:update-books, r=GuillaumeGomezCorey Farwell-0/+0
Update various book repos for the next release.
2017-06-02Coming soonsteveklabnik-0/+10
2017-06-02Auto merge of #41670 - scottmcm:slice-rotate, r=alexcrichtonbors-0/+8
Add an in-place rotate method for slices to libcore A helpful primitive for moving chunks of data around inside a slice. For example, if you have a range selected and are drag-and-dropping it somewhere else (Example from [Sean Parent's talk](https://youtu.be/qH6sSOr-yk8?t=560)). (If this should be an RFC instead of a PR, please let me know.) Edit: changed example
2017-06-01Update various book repos for the next release.steveklabnik-0/+0
2017-06-01wipsteveklabnik-3/+494
2017-06-01Rollup merge of #42275 - scottmcm:try-trait, r=nikomatsakisCorey Farwell-0/+57
Lower `?` to `Try` instead of `Carrier` The easy parts of https://github.com/rust-lang/rfcs/pull/1859, whose FCP completed without further comments. Just the trait and the lowering -- neither the error message improvements nor the insta-stable impl for Option nor exhaustive docs. Based on a [github search](https://github.com/search?l=rust&p=1&q=question_mark_carrier&type=Code&utf8=%E2%9C%93), this will break the following: - https://github.com/pfpacket/rust-9p/blob/00206e34c680198a0ac7c2f066cc2954187d4fac/src/serialize.rs#L38 - https://github.com/peterdelevoryas/bufparse/blob/b1325898f4fc2c67658049196c12da82548af350/src/result.rs#L50 The other results appear to be files from libcore or its tests. I could also leave Carrier around after stage0 and `impl<T:Carrier> Try for T` if that would be better. r? @nikomatsakis Edit: Oh, and it might accidentally improve perf, based on https://github.com/rust-lang/rust/issues/37939#issuecomment-265803670, since `Try::into_result` for `Result` is an obvious no-op, unlike `Carrier::translate`.
2017-05-31add a new mdbook for rustdocsteveklabnik-0/+5
2017-05-31Add some try_trait ramblings to the unstable bookScott McMurray-0/+43
2017-05-31Give the `try_trait` feature its own tracking issueScott McMurray-2/+2
2017-05-28Auto merge of #42167 - scottmcm:iter-stepby-sizehint, r=alexcrichtonbors-0/+1
Override size_hint and propagate ExactSizeIterator for iter::StepBy Generally useful, but also a prerequisite for moving a bunch of unit tests off `Range*::step_by`. A small non-breaking subset of https://github.com/rust-lang/rust/pull/42110 (which I closed). Includes two small documentation changes @ivandardi requested on that PR. r? @alexcrichton
2017-05-27Auto merge of #42162 - est31:closure-to-fn-coercion, r=aturonbors-8/+0
Stabilize non capturing closure to fn coercion Stabilisation PR for non capturing closure to fn coercion. closes #39817
2017-05-26Rollup merge of #42169 - scottmcm:new-step-trait-issue, r=alexcrichtonCorey Farwell-2/+2
Give step_trait a distinct tracking issue from step_by iterator_step_by has decoupled their futures, so the tracking issue should split. Old issue: https://github.com/rust-lang/rust/issues/27741 New issue: https://github.com/rust-lang/rust/issues/42168 r? @alexcrichton (another follow-up to closed PR https://github.com/rust-lang/rust/pull/42110#issuecomment-303176049)
2017-05-26Auto merge of #42058 - froydnj:thiscall-support, r=nikomatsakisbors-0/+13
add thiscall calling convention support This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform. Fixes #42044.
2017-05-25Auto merge of #40847 - jseyfried:decl_macro, r=nrcbors-0/+10
Initial implementation of declarative macros 2.0 Implement declarative macros 2.0 (rust-lang/rfcs#1584) behind `#![feature(decl_macro)]`. Differences from `macro_rules!` include: - new syntax: `macro m(..) { .. }` instead of `macro_rules! m { (..) => { .. } }` - declarative macros are items: ```rust // crate A: pub mod foo { m!(); // use before definition; declaration order is irrelevant pub macro m() {} // `pub`, `pub(super)`, etc. work } fn main() { foo::m!(); // named like other items { use foo::m as n; n!(); } // imported like other items } pub use foo::m; // re-exported like other items // crate B: extern crate A; // no need for `#[macro_use]` A::foo::m!(); A::m!(); ``` - Racket-like hygiene for items, imports, methods, fields, type parameters, privacy, etc. - Intuitively, names in a macro definition are resolved in the macro definition's scope, not the scope in which the macro is used. - This [explaination](http://beautifulracket.com/explainer/hygiene.html) of hygiene for Racket applies here (except for the "Breaking Hygiene" section). I wrote a similar [explanation](https://github.com/jseyfried/rfcs/blob/hygiene/text/0000-hygiene.md) for Rust. - Generally speaking, if `fn f() { <body> }` resolves, `pub macro m() { <body> } ... m!()` also resolves, even if `m!()` is in a separate crate. - `::foo::bar` in a `macro` behaves like `$crate::foo::bar` in a `macro_rules!`, except it can access everything visible from the `macro` (thus more permissive). - See [`src/test/{run-pass, compile-fail}/hygiene`](https://github.com/rust-lang/rust/pull/40847/commits/afe7d89858fd72b983e24727d6f4058293153c19) for examples. Small example: ```rust mod foo { fn f() { println!("hello world"); } pub macro m() { f(); } } fn main() { foo::m!(); } ``` Limitations: - This does not address planned changes to matchers (`expr`,`ty`, etc.), c.f. #26361. - Lints (including stability and deprecation) and `unsafe` are not hygienic. - adding hygiene here will be mostly or entirely backwards compatible - Nested macro definitions (a `macro` inside another `macro`) don't always work correctly when invoked from external crates. - pending improvements in how we encode macro definitions in crate metadata - There is no way to "escape" hygiene without using a procedural macro. r? @nrc
2017-05-25Stabilize non capturing closure to fn coercionest31-8/+0
2017-05-25Lower `?` to `Try` instead of `Carrier`Scott McMurray-0/+14
The easy parts of RFC 1859. (Just the trait and the lowering, none of the error message improvements nor the insta-stable impl for Option.)
2017-05-25Declarative macros 2.0 without hygiene.Jeffrey Seyfried-0/+10
2017-05-24add thiscall calling convention supportNathan Froyd-0/+13
This support is needed for bindgen to work well on 32-bit Windows, and also enables people to begin experimenting with C++ FFI support on that platform. Fixes #42044.
2017-05-23Stabilize in 1.19Matthew-69/+496
2017-05-23Give step_trait a distinct tracking issue from step_byScott McMurray-2/+2
iterator_step_by has decoupled their futures, so the tracking issue should split.
2017-05-23Add iterator_step_by to the unstable book's summaryScott McMurray-0/+1
2017-05-23Rollup merge of #42122 - rust-lang:frewsxcv/unstable-book, r=steveklabnikCorey Farwell-0/+80
Add a few entries to the Unstable Book.
2017-05-23Rollup merge of #42016 - pietroalbini:stabilize/loop_break_value, r=nikomatsakisCorey Farwell-84/+0
Stabilize the loop_break_value feature Tracking issue: #37339. Documentation PRs already sent to the various repositories.
2017-05-21Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichtonbors-32/+0
Stabilize library features for 1.18.0 Closes #38863 Closes #38980 Closes #38903 Closes #36648 r? @alexcrichton @rust-lang/libs
2017-05-21Update slice_rotate to a real tracking numberScott McMurray-2/+2
2017-05-21Add an in-place rotate method for slices to libcoreScott McMurray-0/+8
A helpful primitive for moving chunks of data around inside a slice. In particular, adding elements to the end of a Vec then moving them somewhere else, as a way to do efficient multiple-insert. (There's drain for efficient block-remove, but no easy way to block-insert.) Talk with another example: <https://youtu.be/qH6sSOr-yk8?t=560>
2017-05-20Stabilize library features for 1.18.0Steven Fackler-32/+0
Closes #38863 Closes #38980 Closes #38903 Closes #36648
2017-05-20Add stub entry to unstable book for needs_dropAlexis Beingessner-0/+7
2017-05-20Add basic Unstable Book entry for `attr_literals`.Corey Farwell-0/+20
2017-05-20Add basic Unstable Book entry for `catch_expr`.Corey Farwell-0/+23
2017-05-20Add basic Unstable Book entry for `on_unimplemented`.Corey Farwell-0/+37
2017-05-19Auto merge of #41439 - ivandardi:master, r=BurntSushibors-0/+7
Stabilize step_by by adding it to Iterator (issue #27741) Inspired by itertools' `take()` method. See issue #27741
2017-05-17Stabilize the loop_break_value featurePietro Albini-84/+0
2017-05-17Auto merge of #41857 - dhardy:master, r=steveklabnikbors-0/+73
loop_break_value: add documentation for book Some notes at the top of the file. r? @steveklabnik
2017-05-17loop_break_value doc: remove note about other loopsDiggory Hardy-4/+0
2017-05-17Auto merge of #41476 - abonander:book_proc_macro, r=nrcbors-0/+231
Document the `proc_macro` feature in the Unstable Book Discusses the `proc_macro` feature flag and the features it enables: * Implicit enable of `extern_use_macros` feature and how to import proc macros * Error handling in proc macros (using panic messages) * Function-like proc macros using `#[proc_macro]` and a usage example for creating and invoking * Attribute-like proc macros using `#[proc_macro_attribute]` and a usage example for creating and invoking [Rendered](https://github.com/abonander/rust/blob/book_proc_macro/src/doc/unstable-book/src/language-features/proc-macro.md)
2017-05-16Document the `proc_macro` feature in the Unstable BookAustin Bonander-0/+231
2017-05-16Update the various books to lateststeveklabnik-0/+0
This includes a draft of chapter 20 of the book!
2017-05-16loop_break_value: fix tests (but ignore one expected not to compile)Diggory Hardy-2/+10
2017-05-16Auto merge of #41771 - clarcharr:resize_default, r=nikomatsakisbors-0/+8
Add Vec::resize_default. As suggested by #41758.
2017-05-15Add entry to the Unstable BookIvan Dardi-0/+7