about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2017-07-28Add documentation for generatorsAlex Crichton-0/+232
2017-07-26Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturonbors-20/+0
Stabilize more APIs for the 1.20.0 release In addition to the few stabilizations that have already landed, this cleans up the remaining APIs that are in `final-comment-period` right now to be stable by the 1.20.0 release
2017-07-26Rollup merge of #42959 - SimonSapin:nonzero-checked, r=sfacklerMark Simulacrum-0/+0
Make the "main" constructors of NonZero/Shared/Unique return Option Per discussion in https://github.com/rust-lang/rust/issues/27730#issuecomment-303939441. This is a breaking change to unstable APIs. The old behavior is still available under the name `new_unchecked`. Note that only that one can be `const fn`, since `if` is currently not allowed in constant contexts. In the case of `NonZero` this requires adding a new `is_zero` method to the `Zeroable` trait. I mildly dislike this, but it’s not much worse than having a `Zeroable` trait in the first place. `Zeroable` and `NonZero` are both unstable, this can be reworked later.
2017-07-25Stabilize the `compile_error_macro` featureAlex Crichton-20/+0
Stabilizes: * `compile_error!` as a macro defined by rustc Closes #40872
2017-07-22Rename {NonZero,Shared,Unique}::new to new_uncheckedSimon Sapin-0/+0
2017-07-20Document use of `compiler_builtins` with `no_std` binariesJoe Ranweiler-0/+43
The docs for the `compiler_builtins_lib` library feature were removed in #42899. But, though the `compiler_builtins` library has been migrated out-of-tree, the feature remains, and is needed to use the stand-alone crate. We reintroduce the docs for the feature, and add a reference to them when describing how to create a `no_std` executable.
2017-07-14Update the books.steveklabnik-0/+0
2017-07-10Test src/doc once moreMark Simulacrum-3/+3
2017-07-06remove associated_consts feature gateSean McArthur-85/+0
2017-07-06Auto merge of #42899 - alexcrichton:compiler-builtins, r=nikomatsakisbors-35/+0
Switch to rust-lang-nursery/compiler-builtins This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-06Auto merge of #42727 - alexcrichton:allocators-new, r=eddybbors-119/+78
rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-119/+78
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-54/+49
2017-07-05Switch to rust-lang-nursery/compiler-builtinsAlex Crichton-35/+0
This commit migrates the in-tree `libcompiler_builtins` to the upstream version at https://github.com/rust-lang-nursery/compiler-builtins. The upstream version has a number of intrinsics written in Rust and serves as an in-progress rewrite of compiler-rt into Rust. Additionally it also contains all the existing intrinsics defined in `libcompiler_builtins` for 128-bit integers. It's been the intention since the beginning to make this transition but previously it just lacked the manpower to get done. As this PR likely shows it wasn't a trivial integration! Some highlight changes are: * The PR rust-lang-nursery/compiler-builtins#166 contains a number of fixes across platforms and also some refactorings to make the intrinsics easier to read. The additional testing added there also fixed a number of integration issues when pulling the repository into this tree. * LTO with the compiler-builtins crate was fixed to link in the entire crate after the LTO process as these intrinsics are excluded from LTO. * Treatment of hidden symbols was updated as previously the `#![compiler_builtins]` crate would mark all symbol *imports* as hidden whereas it was only intended to mark *exports* as hidden.
2017-07-02Auto merge of #43010 - stjepang:stabilize-sort-unstable, r=alexcrichtonbors-40/+0
Stabilize feature sort_unstable Closes #40585
2017-07-02Documentationest31-2/+4
2017-07-02Stabilize feature sort_unstableStjepan Glavina-40/+0
2017-06-30Stabilize 'more_io_inner_methods' feature.Sergio Benitez-11/+0
2017-06-30Track `iterator_for_each` in #42986Josh Stone-2/+2
2017-06-30Auto merge of #42782 - cuviper:iterator_for_each, r=alexcrichtonbors-0/+17
Add `Iterator::for_each` This works like a `for` loop in functional style, applying a closure to every item in the `Iterator`. It doesn't allow `break`/`continue` like a `for` loop, nor any other control flow outside the closure, but it may be a more legible style for tying up the end of a long iterator chain. This was tried before in #14911, but nobody made the case for using it with longer iterators. There was also `Iterator::advance` at that time which was more capable than `for_each`, but that no longer exists. The `itertools` crate has `Itertools::foreach` with the same behavior, but thankfully the names won't collide. The `rayon` crate also has a `ParallelIterator::for_each` where simple `for` loops aren't possible. > I really wish we had `for_each` on seq iterators. Having to use a > dummy operation is annoying. - [@nikomatsakis][1] [1]: https://github.com/nikomatsakis/rayon/pull/367#issuecomment-308455185
2017-06-29Give a tracking-issue number for unsized tuple coercion.Masaki Hara-2/+2
2017-06-29Move unsized_tuple_coercion behind a feature gate.Masaki Hara-0/+27
2017-06-28Fix link referenceAndreas Sommer-1/+1
2017-06-26Implement `quote!` and other `proc_macro` API.Jeffrey Seyfried-0/+7
2017-06-21Rollup merge of #42620 - wesleywiser:compile_error, r=brsonCorey Farwell-0/+20
Add compile_error! Related to #40872
2017-06-20Add `Read::initializer`.Steven Fackler-0/+7
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2017-06-20Add `Iterator::for_each`Josh Stone-0/+17
This works like a `for` loop in functional style, applying a closure to every item in the `Iterator`. It doesn't allow `break`/`continue` like a `for` loop, nor any other control flow outside the closure, but it may be a more legible style for tying up the end of a long iterator chain. This was tried before in #14911, but nobody made the case for using it with longer iterators. There was also `Iterator::advance` at that time which was more capable than `for_each`, but that no longer exists. The `itertools` crate has `Itertools::foreach` with the same behavior, but thankfully the names won't collide. The `rayon` crate also has a `ParallelIterator::for_each` where simple `for` loops aren't possible. > I really wish we had `for_each` on seq iterators. Having to use a > dummy operation is annoying. - [@nikomatsakis][1] [1]: https://github.com/nikomatsakis/rayon/pull/367#issuecomment-308455185
2017-06-20Rollup merge of #42271 - tinaun:charfromstr, r=alexcrichtonCorey Farwell-0/+5
add `FromStr` Impl for `char` fixes #24939. is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
2017-06-20added `FromStr` Impl for `char`tinaun-0/+5
2017-06-20Auto merge of #42495 - alexcrichton:new-stage0, r=Mark-Simulacrumbors-13/+0
Bump to 1.20.0 and update stage0 compiler Betas are hot off the bots, let's get them while they're fresh.
2017-06-19Bump version and stage0 compilerAlex Crichton-13/+0
2017-06-20Auto merge of #42313 - pnkfelix:allocator-integration, r=alexcrichtonbors-0/+15
Allocator integration Lets start getting some feedback on `trait Alloc`. Here is: * the `trait Alloc` itself, * the `struct Layout` and `enum AllocErr` that its API relies on * a `struct HeapAlloc` that exposes the system allocator as an instance of `Alloc` * an integration of `Alloc` with `RawVec` * ~~an integration of `Alloc` with `Vec`~~ TODO * [x] split `fn realloc_in_place` into `grow` and `shrink` variants * [x] add `# Unsafety` and `# Errors` sections to documentation for all relevant methods * [x] remove `Vec` integration with `Allocator` * [x] add `allocate_zeroed` impl to `HeapAllocator` * [x] remove typedefs e.g. `type Size = usize;` * [x] impl `trait Error` for all error types in PR * [x] make `Layout::from_size_align` public * [x] clarify docs of `fn padding_needed_for`. * [x] revise `Layout` constructors to ensure that [size+align combination is valid](https://github.com/rust-lang/rust/pull/42313#issuecomment-306845446) * [x] resolve mismatch re requirements of align on dealloc. See [comment](https://github.com/rust-lang/rust/pull/42313#issuecomment-306202489).
2017-06-19Add compile_error!() to the unsable bookWesley Wiser-0/+20
2017-06-18Remove SUMMARY.md of the unstable book as its autogeneratedest31-225/+0
Its being autogenerated now, as of PR #42612. It seems I forgot to remove it.
2017-06-18Rollup merge of #42723 - ubsan:master, r=QuietMisdreavusMark Simulacrum-13/+13
Add `_` to the list of keywords also, make sure the keyword table is correctly spaced note: the reference also needs to be updated. This is not the only way to do this in the grammar, but it's my preferred way.
2017-06-17Reintroduce deprecated `collections` crateMurarth-0/+6
2017-06-17Add `_` to the list of keywordsubsan-13/+13
also, make sure the keyword table is correctly spaced
2017-06-17Correct location of unstable book docsAlex Crichton-0/+0
2017-06-16Rollup merge of #42660 - steveklabnik:gh42632, r=frewsxcvCorey Farwell-0/+0
update book with redirect fixes Fixes #42632
2017-06-16Auto merge of #42612 - est31:master, r=nagisabors-1130/+1
Autogenerate stubs and SUMMARY.md in the unstable book Removes a speed bump in compiler development by autogenerating stubs for features in the unstable book. See #42454 for discussion. The PR contains three commits, separated in order to make review easy: * The first commit converts the tidy tool from a binary crate to a crate that contains both a library and a binary. In the second commit, we'll use the tidy library * The second and main commit introduces autogeneration of SUMMARY.md and feature stub files * The third commit turns off the tidy lint that checks for features without a stub, and removes the stub files. A separate commit due to the large number of files touched Members of the doc team who wish to document some features can either do this (where `$rustsrc` is the root of the rust repo git checkout): 1. cd to `$rustsrc/src/tools/unstable-book-gen` and then do `cargo run $rustsrc/src $rustsrc/src/doc/unstable-book` to put the stubs into the unstable book 2. cd to `$rustsrc` and run `git ls-files --others --exclude-standard` to list the newly added stubs 3. choose a file to edit, then `git add` it and `git commit` 4. afterwards, remove all changes by the tool by doing `git --reset hard` and `git clean -f` Or they can do this: 1. remove the comment marker in `src/tools/tidy/src/unstable_book.rs` line 122 2. run `./x.py test src/tools/tidy` to list the unstable features which only have stubs 3. revert the change in 1 3. document one of the chosen unstable features The changes done by this PR also allow for further development: * tidy obtains information about tracking issues. We can now forbid differing tracking issues between differing `#![unstable]` annotations. I haven't done this but plan to in a future PR * we now have a general framework for generating stuff for the unstable book at build time. Further changes can autogenerate a list of the API a given library feature exposes. The old way to simply click through the documentation after it has been uploaded to rust-lang.org works as well. r? @nagisa Fixes #42454
2017-06-16Rollup merge of #42656 - VBChunguk:struct-field-attributes, r=nikomatsakisCorey Farwell-11/+0
Remove struct_field_attributes feature gate Part of #41681. ~This PR only removes the feature gate; this *does not* update any documentations.~ This PR removes the feature gate and the corresponding chapter of the Unstable Book. I'm not very sure about the changes I made though... Just followed the stabilization guideline. r? @nikomatsakis
2017-06-15placeholder for documentation of `allocator_api` library feature.Felix S. Klock II-0/+15
Alpha-renamed `Allocator` to `Alloc`.
2017-06-15Auto merge of #42648 - murarth:merge-alloc-collections, r=alexcrichtonbors-6/+0
Merge crate `collections` into `alloc` This is a necessary step in order to merge #42565
2017-06-15Remove struct_field_attributes from the Unstable BookWonwoo Choi-11/+0
2017-06-15Remove some more stubsest31-78/+0
2017-06-14update book with redirect fixessteveklabnik-0/+0
Fixes #42632
2017-06-14Auto merge of #42433 - marco-c:profiling, r=alexcrichtonbors-0/+34
Build instruction profiler runtime as part of compiler-rt r? @alexcrichton This is #38608 with some fixes. Still missing: - [x] testing with profiler enabled on some builders (on which ones? Should I add the option to some of the already existing configurations, or create a new configuration?); - [x] enabling distribution (on which builders?); - [x] documentation.
2017-06-13Merge crate `collections` into `alloc`Murarth-6/+0
2017-06-14Don't require that stubs exist for features in the unstable bookest31-1061/+0
Also, remove stubs.
2017-06-14Autogenerate stubs and the summary of the unstable bookest31-1/+1