summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2016-04-12std: Stabilize APIs for the 1.9 releaseAlex Crichton-15/+8
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-04-08Auto merge of #32773 - mitaa:rdoc-ttfn-json, r=alexcrichtonbors-129/+31
rustdoc: Remove the json-{input, output} format (for reference #32698) fixes #25108 r? @alexcrichton
2016-04-07Make `hir::Visibility` non-copyable and add `ty::Visibility`Jeffrey Seyfried-35/+41
2016-04-07Remove rustdocs json formatmitaa-129/+31
2016-04-06Auto merge of #32230 - GuillaumeGomez:extend_css, r=alexcrichtonbors-53/+107
Add --extend-css option to rustdoc Fixes #32223 r? @brson
2016-04-06rustc: retire hir::map's paths.Eduard Burtescu-2/+6
2016-04-06Update to last rustdoc versionGuillaume Gomez-5/+5
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-9/+9
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-21/+19
2016-04-05Rollup merge of #32715 - nrc:rustdoc-highlight, r=cmrManish Goregaokar-26/+49
rustdoc: factor out function for getting inner html of highlighted source
2016-04-05Rollup merge of #32678 - mitaa:rdoc-stripped, r=alexcrichtonManish Goregaokar-239/+251
rustdoc: make rustdoc less pass-aware 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. r? @alexcrichton
2016-04-05Centralize nightly compiler flags handlingGuillaume Gomez-87/+65
2016-04-05Add nightly check on rustdoc --extend-css optionGuillaume Gomez-1/+35
2016-04-05Add --extend-css option to rustdocGuillaume Gomez-9/+51
2016-04-04rustdoc: factor out function for getting inner html of highlighted sourceNick Cameron-26/+49
2016-04-02Slim down `rustdoc::html::render::Context`mitaa-40/+47
Like the comment on `Context` explains, `Context` is supposed to be lightweight, so we're putting everything that's immutable after creation of the Context behind an `Arc<SharedContext>`.
2016-04-02Refactor `HiddenStructField` into `StrippedItem`mitaa-56/+32
2016-04-02Make the rendering process less pass-awaremitaa-146/+175
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-04-01Auto merge of #32544 - alexcrichton:rustbuild-dist-libtest, r=brsonbors-2/+0
rustbuild: Fix dist for non-host targets The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-04-01rustbuild: Fix dist for non-host targetsAlex Crichton-2/+0
The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-4/+6
2016-03-28Auto merge of #32461 - mitaa:rdoc-anchors, r=alexcrichtonbors-129/+179
rustdoc: Correct anchor for links to associated trait items fixes #28478 r? @alexcrichton
2016-03-27Don't initialize id-map when rendering md filesmitaa-8/+14
Adding these "known" values to the table of used ids is only required when embedding markdown into a rustdoc html page and may yield unexpected results when rendering a standalone `*.md` file.
2016-03-27Load struct-variant data correctly from metadatamitaa-12/+5
2016-03-27Linkify associated types and constantsmitaa-17/+41
2016-03-27Don't hardcode item-type anchor idsmitaa-13/+17
These should always correspond to the values in `ItemType::to_static_str`
2016-03-27Correct anchor for links to associated trait itemsmitaa-81/+104
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-8/+8
2016-03-27rustc: move middle::subst into middle::ty.Eduard Burtescu-3/+3
2016-03-26Rollup merge of #32492 - xitep:master, r=alexcrichtonManish Goregaokar-2/+0
Avoid page reload upon hitting "S" when browsing documentation in local mode The problem seems to have been introduced with commit 2910c0020661304df237fb8ed646296304c8e0d2
2016-03-25Avoid page reload upon hitting "S" when browing in local modeNovotnik, Petr-2/+0
2016-03-25Make CrateStore::crate_name() return an InternedString to avoid unnecessary ↵Michael Woerister-1/+1
allocations.
2016-03-24remove ErasedRegions from substitutionsNiko Matsakis-2/+2
This hack has long since outlived its usefulness; the transition to trans passing around full substitutions is basically done. Instead of `ErasedRegions`, just supply substitutions with a suitable number of `'static` entries, and invoke `erase_regions` when needed (the latter of which we already do).
2016-03-23Auto merge of #32454 - eddyb:rollup, r=eddybbors-12/+16
Rollup of 11 pull requests - Successful merges: #32404, #32420, #32423, #32425, #32429, #32430, #32431, #32434, #32437, #32441, #32443 - Failed merges:
2016-03-23Rollup merge of #32434 - mitaa:rdoc-no-inline, r=alexcrichtonEduard-Mihai Burtescu-11/+15
rustdoc: Consider `doc(no_inline)` in crate-local inlining Imports with `doc(no_inline)` will not be inlined, even when `doc(inline)` is present. fixes #32343 r? @alexcrichton
2016-03-22fix alignmentJorge Aparicio-158/+155
2016-03-22sprinkle feature gates here and thereJorge Aparicio-0/+1
2016-03-22try! -> ?Jorge Aparicio-400/+400
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-22Consider `doc(no_inline)` in crate-local inliningmitaa-11/+15
2016-03-22Omit `pub` for inlined variant-struct fieldsmitaa-1/+1
2016-03-19Rollup merge of #32329 - sfackler:assert-recover-safe-pub, r=aturonEduard-Mihai Burtescu-4/+4
Make AssertRecoverSafe's field public It's basically the very definition of a newtype, so we might as well make things easy on people and let them construct and access it directly. r? @aturon
2016-03-19Rollup merge of #32308 - bombless:patch-2, r=alexcrichtonEduard-Mihai Burtescu-2/+6
Fix usability problem when browse document locally You cannot use `history.replaceState` when you browse locally, it breaks the security policy of Chrome and perhaps other browsers. Closes https://github.com/rust-lang/rust/issues/32307 Thank @crumblingstatue for the help!
2016-03-17Make AssertRecoverSafe's field publicSteven Fackler-4/+4
It's basically the very definition of a newtype, so we might as well make things easy on people and let them construct and access it directly.
2016-03-17const_eval: Take just one set of substitutions in lookup_const_by_id.Eduard Burtescu-2/+2
2016-03-18Fix usability problem when browse document locallyYork Xiang-2/+6
2016-03-14Auto merge of #32169 - mitaa:anon-tip, r=nrcbors-2/+5
Allow custom filenames for anonymous inputs This came out of #29253 but doesn't fix it. I thought it might be worth merging on its own nonetheless.
2016-03-14Allow custom filenames for anonymous inputsmitaa-2/+5
2016-03-14Auto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakisbors-3/+3
typestrong const integers ~~It would be great if someone could run crater on this PR, as this has a high danger of breaking valid code~~ Crater ran. Good to go. ---- So this PR does a few things: 1. ~~const eval array values when const evaluating an array expression~~ 2. ~~const eval repeat value when const evaluating a repeat expression~~ 3. ~~const eval all struct and tuple fields when evaluating a struct/tuple expression~~ 4. remove the `ConstVal::Int` and `ConstVal::Uint` variants and replace them with a single enum (`ConstInt`) which has variants for all integral types * `usize`/`isize` are also enums with variants for 32 and 64 bit. At creation and various usage steps there are assertions in place checking if the target bitwidth matches with the chosen enum variant 5. enum discriminants (`ty::Disr`) are now `ConstInt` 6. trans has its own `Disr` type now (newtype around `u64`) This obviously can't be done without breaking changes (the ones that are noticable in stable) We could probably write lints that find those situations and error on it for a cycle or two. But then again, those situations are rare and really bugs imo anyway: ```rust let v10 = 10 as i8; let v4 = 4 as isize; assert_eq!(v10 << v4 as usize, 160 as i8); ``` stops compiling because 160 is not a valid i8 ```rust struct S<T, S> { a: T, b: u8, c: S } let s = S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 }; ``` stops compiling because `0xaa_aa_aa_aa` is not a valid i32 ---- cc @eddyb @pnkfelix related: https://github.com/rust-lang/rfcs/issues/1071
2016-03-12Auto merge of #32112 - alexcrichton:fix-issues, r=aturonbors-5/+3
std: Fix tracking issues and clean deprecated APIs This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.
2016-03-12std: Clean out deprecated APIsAlex Crichton-5/+3
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.