about summary refs log tree commit diff
path: root/src/librustdoc/passes.rs
AgeCommit message (Collapse)AuthorLines
2016-09-25Separate rustdoc passes into separate modules.Corey Farwell-416/+0
2016-09-25Privatize `unindent` function.Corey Farwell-1/+1
Doesn't look like it's used anywhere outside the module.
2016-09-03Support unions in rustdocVadim Petrochenkov-1/+1
2016-06-27rustdoc: Fix a few stripping issuesOliver Middleton-18/+40
We need to recurse into stripped modules to strip things like impl methods but when doing so we must not add any items to the `retained` set.
2016-05-09rustdoc: do not strip blanket impls in crate of originGeorg Brandl-3/+5
In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out. Now we check if they are generic, and keep them in that case. Fixes: #29503
2016-04-21Auto merge of #33074 - mitaa:rdoc-irlst, r=alexcrichtonbors-41/+22
rustdoc: Fix the strip-hidden `ImplStripper` Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`. fixes #33069 r? @alexcrichton
2016-04-19Auto merge of #33002 - mitaa:rdoc-cross-impls, r=alexcrichtonbors-4/+1
rustdoc: refine cross-crate impl inlining This changes the current rule that impls within `doc(hidden)` modules aren't inlined, to only inlining impls where the implemented trait and type are reachable in documentation. fixes #14586 fixes #31948 .. and also applies the reachability checking to cross-crate links. fixes #28480 r? @alexcrichton
2016-04-18Fix the strip-hidden `ImplStripper`mitaa-41/+22
Instead of stripping impls which reference *stripped* items, we keep impls which reference *retained* items. We do this because when we strip an item we immediately return, and do not recurse into it - leaving the contained items non-stripped from the point of view of the `ImplStripper`.
2016-04-14Fix fallout in rustdocJeffrey Seyfried-4/+3
2016-04-13Retire rustdocs `ANALYSISKEY`mitaa-4/+1
The thread-local isn't needed and consists of mostly empty fields which were just used to move the data into `html::render::CACHE_KEY`.
2016-04-07Remove rustdocs json formatmitaa-19/+18
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-1/+1
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-1/+1
2016-04-02Refactor `HiddenStructField` into `StrippedItem`mitaa-17/+5
2016-04-02Make the rendering process less pass-awaremitaa-20/+20
Instead of hardcoding knowledge about the strip-private pass into the rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`. Rustdoc will, for example, generate redirect pages for public items contained in private modules which have been re-exported to somewhere externally reachable - this will now not only work for the `strip-private` pass, but for other passes as well, such as the `strip-hidden` pass.
2016-03-27Correct anchor for links to associated trait itemsmitaa-8/+5
2016-03-22Consider `doc(no_inline)` in crate-local inliningmitaa-1/+1
2016-03-06Auto merge of #32055 - mitaa:rdoc-strip-priv-imports, r=alexcrichtonbors-7/+19
fixes #27104 r? @alexcrichton
2016-03-06Split out rustdoc pass to strip private importsmitaa-7/+19
2016-03-04This doesn't seem necessary?mitaa-4/+2
2016-03-04Refactor rustdocs attribute handlingmitaa-2/+2
2016-03-04Simplify `if let`/`match` expressionsmitaa-19/+14
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-1/+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-11-19Changes to data produced by privacy passVadim Petrochenkov-10/+8
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-24Remove bare semicolonsFlorian Hahn-2/+2
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-22/+17
they are being used as an opaque "position identifier"
2015-09-03std: Account for CRLF in {str, BufRead}::linesAlex Crichton-1/+1
This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of the `str::lines` and `BufRead::lines` iterators. Both iterators now account for `\r\n` sequences in addition to `\n`, allowing for less surprising behavior across platforms (especially in the `BufRead` case). Splitting *only* on the `\n` character can still be achieved with `split('\n')` in both cases. The `str::lines_any` function is also now deprecated as `str::lines` is a drop-in replacement for it. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md Closes #28032
2015-09-03Add an intital HIR and lowering stepNick Cameron-3/+4
2015-08-24fallout from moving def-idNiko Matsakis-5/+4
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-1/+1
Fixes #26900
2015-07-12Implement RFC 1058Simonas Kazlauskas-1/+1
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-1/+1
2015-04-23Structural changes for associated constantsSean Patrick Santos-1/+2
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-2/+2
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-2/+2
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-03-12rustdoc: Fix ICE with cross-crate default implsAlex Crichton-1/+1
This adds a special code path for impls which are listed as default impls to ensure that they're loaded correctly.
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-1/+1
2015-02-11rustc: Fix a number of stability lint holesAlex Crichton-3/+3
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes #8962 Closes #16360 Closes #20327 [breaking-change]
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-9/+9
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-2/+2
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-1/+1
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21Fallout from stabilization.Aaron Turon-1/+1
2015-01-21rustdoc: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-1/+1
2014-12-21Fallout of std::str stabilizationAlex Crichton-3/+3
2014-12-06librustdoc: remove unnecessary `as_slice()` callsJorge Aparicio-8/+8
2014-11-29Replace some verbose match statements with their `if let` equivalent.jfager-26/+17
No semantic changes, no enabling `if let` where it wasn't already enabled.
2014-11-26rustdoc: inherited vis. for struct variant fieldsTom Jakubowski-0/+4
Teach rustdoc that struct variant fields have inherited visibility. Fix #19048
2014-11-23std: Add a new top-level thread_local moduleAlex Crichton-1/+3
This commit removes the `std::local_data` module in favor of a new `std::thread_local` module providing thread local storage. The module provides two variants of TLS: one which owns its contents and one which is based on scoped references. Each implementation has pros and cons listed in the documentation. Both flavors have accessors through a function called `with` which yield a reference to a closure provided. Both flavors also panic if a reference cannot be yielded and provide a function to test whether an access would panic or not. This is an implementation of [RFC 461][rfc] and full details can be found in that RFC. This is a breaking change due to the removal of the `std::local_data` module. All users can migrate to the new thread local system like so: thread_local!(static FOO: Rc<RefCell<Option<T>>> = Rc::new(RefCell::new(None))) The old `local_data` module inherently contained the `Rc<RefCell<Option<T>>>` as an implementation detail which must now be explicitly stated by users. [rfc]: https://github.com/rust-lang/rfcs/pull/461 [breaking-change]
2014-10-21rustdoc: hide private traits in strip-private passTom Jakubowski-1/+12
Fix #16563