summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2016-01-14Fix rustdoc reexports.Lee Jeffery-1/+1
2016-01-12Use --cfg when running doctestsSeo Sanghyeon-7/+13
Previously passed --cfg was used only when collecting doctests.
2015-12-08Auto merge of #30036 - mitaa:doc_id, r=alexcrichtonbors-59/+120
This expands the code which generates unique IDs for Markdown headers within a single block to each rendered page. fixes #25001 fixes #29449
2015-12-07Auto merge of #30087 - petrochenkov:indi, r=nrcbors-2/+2
I've measured the time/memory consumption before and after - the difference is lost in statistical noise, so it's mostly a code simplification. Sizes of `enum`s are not affected. r? @nrc I wonder if AST/HIR visitors could run faster if `P`s are systematically removed (except for cases where they control `enum` sizes). Theoretically they should. Remaining unnecessary `P`s can't be easily removed because many folders accept `P<X>`s as arguments, but these folders can be converted to accept `X`s instead without loss of efficiency. When I have a mood for some mindless refactoring again, I'll probably try to convert the folders, remove remaining `P`s and measure again.
2015-12-07Remove some unnecessary indirection from HIR structuresVadim Petrochenkov-2/+2
2015-12-06Auto merge of #30222 - mitaa:fqn#2, r=alexcrichtonbors-23/+8
I missed this in #30149 fixes #30198 r? @alexcrichton
2015-12-06Auto merge of #30187 - alexcrichton:stabilize-1.6, r=aturonbors-2/+1
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-2/+1
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-05Add testsmitaa-0/+46
2015-12-05Reuse `record_extern_fqn`mitaa-23/+8
These locations erroneously used the local item-path instead of the extern item-path.
2015-12-04Split rustdoc css to modify it more easilyGuillaume Gomez-65/+144
2015-12-04Address review commentsmitaa-49/+43
2015-12-03Use the extern item-path for documentation linksmitaa-1/+1
The local item-path includes the local crates path to the extern crate declaration which breaks cross-crate rustdoc links if the extern crate is not linked into the crate root or renamed via `extern foo as bar`.
2015-12-03Initialize the ID map with known valuesmitaa-2/+22
2015-12-03Generate unique IDs for each rustdoc HTML pagemitaa-40/+36
2015-12-03Move ID generator to a more suited locationmitaa-40/+45
2015-11-28Auto merge of #30074 - jonas-schievink:macro-doc, r=sanxiynbors-2/+10
Fixes #17616 New docs for `panic!`: ```rust macro_rules! panic { () => { ... }; ($msg:expr) => { ... }; ($fmt:expr, $($arg:tt)+) => { ... }; } ``` New docs for `assert!`: ```rust macro_rules! assert { ( $ cond : expr ) => { ... }; ( $ cond : expr , $ ( $ arg : tt ) + ) => { ... }; } ``` <sup>not pretty, but at least it's not worse :joy:
2015-11-28Auto merge of #29383 - petrochenkov:empstr, r=pnkfelixbors-2/+2
Fixes https://github.com/rust-lang/rust/issues/28692 Fixes https://github.com/rust-lang/rust/issues/28992 Fixes some other similar issues (see the tests) [breaking-change], needs crater run (cc @brson or @alexcrichton ) The pattern with parens `UnitVariant(..)` for unit variants seems to be popular in rustc (see the second commit), but mostly used by one person (@nikomatsakis), according to git blame. If it causes breakage on crates.io I'll add an exceptional case for it.
2015-11-26;Jonas Schievink-1/+1
2015-11-26rustdoc: only show macro arm's lhsJonas Schievink-2/+10
2015-11-26fix tidyAriel Ben-Yehuda-2/+2
2015-11-26fix tests & rustdocAriel Ben-Yehuda-15/+16
2015-11-26make check worksAriel Ben-Yehuda-63/+70
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-20Auto merge of #29822 - petrochenkov:pubexport, r=alexcrichtonbors-31/+24
This patch implements the plan described in https://internals.rust-lang.org/t/privacy-and-its-interaction-with-docs-lints-and-stability/2880 with one deviation. It turns out, that rustdoc needs the "directly public" set for its docs inlining logic, so the privacy pass have to produce three sets and not two. Three is arguably too many, so I merged them in one map: `public_items/exported_items/reachable_items: NodeSet => access_levels: NodeMap<AccessLevel>` r? @alexcrichton
2015-11-19Show constness for functions of reexported docsmitaa-2/+15
2015-11-19Fix rustdocs `unsafe const fn` orderingmitaa-3/+3
2015-11-19Changes to data produced by privacy passVadim Petrochenkov-31/+24
2015-11-19Fix the falloutVadim Petrochenkov-2/+2
2015-11-19Auto merge of #29917 - shssoichiro:doc-sidebar-order, r=alexcrichtonbors-1/+1
A race condition in Javascript was causing unpredictable ordering of the sidebar boxes when loading documentation generated by rustdoc, due to the script that adds the Crates box being executed asynchronously. Disabling the asynchronous execution and deferring this script should ensure that the Crates box always appears last in the sidebox (this seemed to be the more common ordering prior to this change). Fixes #29698
2015-11-18Port a bunch of code new-visitor; all of these ports wereNiko Matsakis-4/+6
straightforward uses of `visit_all_items`. In some cases I had to remove empty `visit_item` calls that were just to suppress visiting nested items.
2015-11-18Fix unpredictable ordering of sidebar boxes in rustdocJoshua Holmer-1/+1
A race condition in Javascript was causing unpredictable ordering of the sidebar boxes when loading documentation generated by rustdoc, due to the script that adds the Crates box being executed asynchronously. Disabling the asynchronous execution and deferring this script should ensure that the Crates box always appears last in the sidebox (this seemed to be the more common ordering prior to this change). Fixes #29698
2015-11-17Auto merge of #29766 - oli-obk:impl_item, r=nikomatsakisbors-3/+3
[breaking change] I'm not sure if those renames are ok. [TokenType::Tt* to TokenType::*](https://github.com/rust-lang/rust/pull/29582) was obvious, but for all those Item-enums it's less obvious to me what the right way forward is due to the underscore.
2015-11-16Remove `TyParen` from HIRVadim Petrochenkov-1/+0
2015-11-16ImplItem_ -> ImplItemKind renameOliver Schneider-3/+3
2015-11-16rename ImplItem_::*ImplItem to ImplItem_::*Oliver Schneider-3/+3
[breaking change]
2015-11-09std: Migrate to the new libcAlex Crichton-51/+29
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-11-06Auto merge of #29600 - Ryman:rustdoc_better_testnames, r=alexcrichtonbors-12/+59
Old doctest names ```bash test sync::atomic::load_0 ... ok test sync::atomic::load_0 ... ok test sync::atomic::load_0 ... ok test sync::atomic::load_0 ... ok ``` New doctest names ```bash test sync::atomic::AtomicBool::load_0 ... ok test sync::atomic::AtomicIsize::load_0 ... ok test sync::atomic::AtomicPtr<T>::load_0 ... ok test sync::atomic::AtomicUsize::load_0 ... ok ```
2015-11-06librustdoc: improve testnames for doctestsKevin Butler-12/+59
2015-11-05librustdoc: don't override ctrl-s and other browser shortcutsIvan Kozik-0/+4
2015-11-04Auto merge of #29217 - nikomatsakis:mir-trans, r=dotdashbors-1/+1
This branch implements a variant of trans that is based on MIR. It is very incomplete (intentionally), and had only the goal of laying out enough work to enable more incremental follow-on patches. Currently, only fns tagged with `#[rustc_mir]` use the new trans code. I plan to build up a meta-issue as well that tracks the various "not-yet-implemented" points. The only fn that has been tested so far is this amazingly complex "spike" fn: ```rust #[rustc_mir] fn sum(x: i32, y: i32) -> i32 { x + y } ``` In general, the most interesting commit is the last one. There are some points on which I would like feedback from @rust-lang/compiler: - I did not use `Datum`. Originally, I thought that maybe just a `ValueRef` would be enough but I wound up with two very simple structures, `LvalueRef` and `OperandRef`, that just package up a `ValueRef` and a type. Because of MIR's structure, you don't wind up mixing by-ref and by-value so much, and I tend to think that a thinner abstraction layer is better here, but I'm not sure. - Related to the above, I expect that sooner or later we will analyze temps (and maybe variables too) to find those whose address is never taken and which are word-sized and which perhaps meet a few other criteria. For those, we'll probably want to avoid the alloca, just because it means prettier code. - I generally tried to re-use data structures from elsewhere in trans, though I'm sure we can trim these down. - I didn't do any debuginfo primarily because it seems to want node-ids and we have only spans. I haven't really read into that code so I don't know what's going on there. r? @nrc
2015-11-03Auto merge of #29529 - Ryman:rustdoc-cap-lints, r=alexcrichtonbors-0/+1
This sets the `cap-lints` setting to 'allow' for all doc compilations. There's precedent for this as rustdoc [already whitelists unstable code](https://github.com/rust-lang/rust/blob/master/src/librustdoc/core.rs#L112) when compiling documentation, with the expectation being that a regular compile will complain about any problems. I think the same justification applies here. Problem case in the wild: https://github.com/laumann/compiletest-rs/pull/28 r? @Manishearth
2015-11-03Auto merge of #29495 - meqif:fix_unindent_tabs, r=steveklabnikbors-6/+24
A line may be indented with either spaces or tabs, but not a mix of both. If there is a mix of tabs and spaces, only the kind that occurs first is counted. This addresses issue #29268.
2015-11-03Pass the mir map to transNiko Matsakis-1/+1
2015-11-02librustdoc: ignore lint warnings when compiling documentationKevin Butler-0/+1
2015-11-02Accept tabs as indentation characterRicardo Martins-6/+24
A line may be indented with both spaces or tabs. All leading whitespace is trimmed, even if it is mixed.
2015-10-31Remove PatWildMultiVadim Petrochenkov-2/+1
2015-10-28Rollup merge of #29264 - mdinger:colorify, r=steveklabnikSteve Klabnik-5/+8
This is an alternative to https://github.com/rust-lang/rust/pull/29240 which fixes #15307 by adding colors to primitives and aliases instead of underlining. Try to keep the discussion in https://github.com/rust-lang/rust/pull/29240 for now though so it can be kept track of. A sample rendering is [here](http://mdinger.github.io/rust_std_colored/std/index.html)
2015-10-26Auto merge of #29303 - petrochenkov:unistrimp, r=eddybbors-6/+6
And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_` Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648 plugin-[breaking-change] r? @eddyb
2015-10-25Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brsonbors-1/+4
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)