about summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2017-05-15Auto merge of #41992 - ollie27:linkchecker_base, r=alexcrichtonbors-11/+12
linkchecker: Add support for <base> tag Add support for the HTML <base> tag as used by mdBook so The Unstable Book can be checked. Also cleanup a few things: * Stop checking the name attribute. It should never have been used and mdBook has since been fixed not to use it. * Make sure we only check html files. * Remove a few unnecessary allocations. Finally, dead links in The Unstable Book have been fixed.
2017-05-14Fix some dead links in The Unstable BookOliver Middleton-11/+12
2017-05-11Add Vec::resize_default.Clar Charr-0/+8
2017-05-10Fix up stability annotations per feedback.Zack Weinberg-22/+2
2017-05-10Revise the eprint(ln)! feature.Zack Weinberg-0/+20
* Factor out the nigh-identical bodies of `_print` and `_eprint` to a helper function `print_to` (I was sorely tempted to call it `_doprnt`). * Update the issue number for the unstable `eprint` feature. * Add entries to the "unstable book" for `eprint` and `eprint_internal`. * Style corrections to the documentation.
2017-05-09loop_break_value book doc: remove some curiosities, regarding leodasvacas's ↵Diggory Hardy-13/+3
comments
2017-05-09loop_break_value: address review comments on book additionDiggory Hardy-5/+2
2017-05-09loop_break_value: add documentation for bookDiggory Hardy-0/+82
2017-05-08Update rustc-ux-guidelines.mdJing Zhao-1/+1
"A `note` to emitted to" changed to "A `note` is emitted to"
2017-05-08Grammar fixes to rustc-ux-guidelines.mdJing Zhao-7/+7
1) changed "long way into" to "long way toward" 2) changed "developer lives" to "developers' lives" 3) removed the "either... or..." format from second paragraph because there are more than 2 options 4) Minor revisions to paragraphs 3-6 to make them more consistent in format and to fix minor grammar issues.
2017-05-06Minor cleanup of UX guidelines.Mark Simulacrum-2/+6
2017-05-05Rollup merge of #41064 - Gankro:ptr-redux, r=alexcrichtonCorey Farwell-0/+0
refactor NonZero, Shared, and Unique APIs Major difference is that I removed Deref impls, as apparently LLVM has trouble maintaining metadata with a `&ptr -> &ptr` API. This was cited as a blocker for ever stabilizing this API. It wasn't that ergonomic anyway. * Added `get` to NonZero to replace Deref impl * Added `ptr` getter to Shared/Unique to replace Deref impl * Added Unique's `get` and `get_mut` conveniences to Shared * Deprecated `as_mut_ptr` on Shared in favour of `ptr` Note that Shared used to primarily expose only `*const` but there isn't a good justification for that, so I made it `*mut`.
2017-05-04update to latest nomiconAlexis Beingessner-0/+0
2017-05-01Added spin loop pause functionSteven Stewart-Gallus-0/+42
2017-05-01Add profiling support, through the rustc -Z profile flag.whitequark-0/+18
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.
2017-04-26Add some documentation for -Zremap-path-prefix to the unstable bookMichael Woerister-0/+38
2017-04-26Auto merge of #41258 - clarcharr:str_box_extras, r=Kimundibors-0/+10
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes) This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses. What's added: * `From<Box<str>> for Box<[u8]>` * `<Box<str>>::into_boxed_bytes` (just calls `Into::into`) * `alloc::str` (new module) * `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str` * exports `from_utf8_mut` in `collections::str` (missed from previous PR)
2017-04-25Rollup merge of #41527 - steveklabnik:gh41285, r=frewsxcvCorey Farwell-4/+9
Clarify the doc index With regards to the unstable book, the reference, and the processes involved. Also, fix up a link by pointing to the new tracking issue rather than the older one. Fixes #41285 r? @frewsxcv
2017-04-25Rollup merge of #41463 - SergioBenitez:master, r=alexcrichtonCorey Farwell-0/+12
Add internal accessor methods to io::{Chain, Take}. Resolves #29067.
2017-04-25Clarify the doc indexsteveklabnik-4/+9
With regards to the unstable book, the reference, and the processes involved. Also, fix up a link by pointing to the new tracking issue rather than the older one. Fixes #41285
2017-04-24Reference tracking issue for more_io_inner_methods.Sergio Benitez-1/+3
2017-04-24Add more_io_inner_methods feature to unstable book.Sergio Benitez-0/+10
2017-04-24More methods for str boxes.Clar Charr-0/+10
2017-04-24Fix more merge conflictsMatthew-70/+3
2017-04-23Add splice to the unstable book.Matt Ickstadt-0/+25
2017-04-23Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichtonbors-69/+0
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2017-04-22Resolve merge conflictmatthewjasper-1/+12
2017-04-22Auto merge of #41464 - frewsxcv:rollup, r=frewsxcvbors-2/+3
Rollup of 3 pull requests - Successful merges: #41077, #41355, #41450 - Failed merges:
2017-04-21Fix issue with single question mark or parenVadim Petrochenkov-2/+3
2017-04-20Remove float_extrasJosh Stone-8/+0
[unstable, deprecated since 1.11.0]
2017-04-20Remove num::{Zero,One}Josh Stone-9/+0
[unstable, deprecated since 1.11.0]
2017-04-20Remove RefCell::borrow_stateJosh Stone-8/+0
[unstable, deprecated since 1.15.0]
2017-04-20Remove {Cell,RefCell}::as_unsafe_cellJosh Stone-8/+0
[unstable, deprecated since 1.12.0]
2017-04-20Privatize Rc::is_uniqueJosh Stone-8/+0
[unstable, deprecated since 1.15.0]
2017-04-20Remove Rc::would_wrapJosh Stone-6/+0
[unstable, deprecated since 1.15.0]
2017-04-20Remove OccupiedEntry::remove_pairJosh Stone-6/+0
[unstable, deprecated since 1.12.0]
2017-04-20Remove BinaryHeap::{push_pop,replace}Josh Stone-8/+0
[unstable, deprecated since 1.13.0]
2017-04-20Remove EnumSetJosh Stone-8/+0
[unstable, deprecated since 1.16.0]
2017-04-21Added feature gate, updated error messages and tests.Cameron Hart-0/+12
2017-04-20Stabilize RFC 1506 - clarified ADT kindsMatthew-11/+0
2017-04-18Bump book and reference.Corey Farwell-0/+0
2017-04-18Add top level sections to the Unstable Book.Corey Farwell-226/+231
Prior to this commit, the contents of the Unstable Book were assumed to be unstable features. This commit moves features into 'language features' or 'library features' subsections. It also moves the 'linker_flavor' compiler flag into a new 'Compiler Flags' subsection. Even though it was helpful, I removed the tidy check that cross-references the SUMMARY.md links with the Unstable Book directory contents just because it would be difficult to maintain. Relevant PR: https://github.com/rust-lang/rust/issues/41142.
2017-04-18Rollup merge of #40290 - 3Hren:master, r=aturonCorey Farwell-0/+8
Add `as_bytes()` for `FromUtf8Error`. This change allows to obtain an underlying invalid UTF-8 bytes without `FromUtf8Error` destruction. Such method may be useful for example in a library that attempts to save both valid and invalid UTF-8 strings in some struct and to be able to provide immutable access to it without destruction. Personally without this change I ended with `Result<String, (Vec<u8>, Utf8Error)`, which almost copies the functionality of `FromUtf8Error`, but allows immutable view access.
2017-04-18Auto merge of #39271 - est31:add_float_bits, r=BurntSushibors-0/+8
Add functions to safely transmute float to int The safe subset of Rust tries to be as powerful as possible. While it is very powerful already, its currently impossible to safely transmute integers to floats. While crates exist that provide a safe interface, most prominently the `iee754` crate (which also inspired naming of the added functions), they themselves only use the unsafe `mem::transmute` function to accomplish this task. Also, including an entire crate for just two lines of unsafe code seems quite wasteful. That's why this PR adds functions to safely transmute integers to floats and vice versa, currently gated by the newly added `float_bits_conv` feature. The functions added are no niche case. Not just `ieee754` [currently implements](https://github.com/huonw/ieee754/blob/master/src/lib.rs#L441) float to int transmutation via unsafe code but also the [very popular `byteorder` crate](https://github.com/BurntSushi/byteorder/blob/1.0.0/src/lib.rs#L258). This functionality of byteorder is in turn used by higher level crates. I only give two examples out of many: [chor](https://github.com/pyfisch/cbor/blob/a7363ea9aaf372e3d24b52414b5c76552ecc91c8/src/ser.rs#L227) and [bincode](https://github.com/TyOverby/bincode/blob/f06a4cfcb5b194e54d4997c200c75b88b6c3fba4/src/serde/reader.rs#L218). One alternative would be to manually use functions like pow or multiplication by 1 to get a similar result, but they only work in the int -> float direction, and are not bit exact, and much slower (also, most likely the optimizer will never optimize it to a transmute because the conversion is not bit exact while the transmute is). Tracking issue: #40470
2017-04-17Rollup merge of #41262 - jonhoo:compiler-barrier-rename, r=alexcrichtonCorey Farwell-11/+11
Rename compiler_barrier to compiler_fence This addresses concerns raised following the merge of #41092. Specifically: > The naming of these seems surprising: the multithreaded functions (and both the single and multithreaded intrinsics themselves) are fences, but this is a barrier. It's not incorrect, but the latter is both inconsistent with the existing functions and slightly confusing with another type in std (e.g., `Barrier`). `compiler_fence` carries the same semantic implication that this is a compiler-only operation, while being more in line with the fence/barrier concepts already in use in `std`.
2017-04-18Add float_bits_conv to unstable bookest31-0/+8
2017-04-17Auto merge of #41345 - frewsxcv:rollup, r=frewsxcvbors-0/+15
Rollup of 3 pull requests - Successful merges: #41012, #41280, #41290 - Failed merges:
2017-04-17Rollup merge of #41012 - durka:vis-matcher, r=petrochenkovCorey Farwell-0/+15
:vis matcher for macro_rules Resurrection of @DanielKeep's implementation posted with [RFC 1575](https://github.com/rust-lang/rfcs/pull/1575). @jseyfried was of the opinion that this doesn't need an RFC. Needed before merge: - [x] sign-off from @DanielKeep since I stole his code - [x] feature gate - [x] docs
2017-04-17Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnikbors-2/+9
Fix old docs Fixes #41158
2017-04-17fix: remove `field_init_shorthand` from SUMMARY.mdEvgeny Safronov-1/+0