summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2018-07-07Apply security patch for rustdocsteveklabnik-1/+7
CVE number has not yet been assigned, patch made by steveklabnik.
2018-06-03rustdoc: hide macro export statements from docsQuietMisdreavus-0/+7
2018-05-07Auto merge of #50305 - GuillaumeGomez:fix-mod-stackoverflow, r=QuietMisdreavusbors-9/+10
Prevent infinite recursion of modules Fixes #50196. r? @QuietMisdreavus
2018-05-07Prevent infinite recursion of modulesGuillaume Gomez-9/+10
2018-05-05Auto merge of #50419 - sinkuu:rustdoc_nested_impl_trait, r=QuietMisdreavusbors-31/+32
rustdoc: Resolve nested `impl Trait`s Fixes #50358. Populates `cx.impl_trait_bounds` incrementally while `clean`ing generic params, so that a synthetic type-parameter can refer to previous ones. cc #50366
2018-05-03Auto merge of #50413 - kennytm:rollup, r=kennytmbors-2/+2
Rollup of 12 pull requests Successful merges: - #50302 (Add query search order check) - #50320 (Fix invalid path generation in rustdoc search) - #50349 (Rename "show type declaration" to "show declaration") - #50360 (Clarify wordings of the `unstable_name_collision` lint.) - #50365 (Use two vectors in nearest_common_ancestor.) - #50393 (Allow unaligned reads in constants) - #50401 (Revert "Implement FromStr for PathBuf") - #50406 (Forbid constructing empty identifiers from concat_idents) - #50407 (Always inline simple BytePos and CharPos methods.) - #50416 (check if the token is a lifetime before parsing) - #50417 (Update Cargo) - #50421 (Fix ICE when using a..=b in a closure.) Failed merges:
2018-05-04Rollup merge of #50320 - GuillaumeGomez:fix-search-path-generation, ↵kennytm-1/+1
r=QuietMisdreavus Fix invalid path generation in rustdoc search Fixes #50311.
2018-05-03Fix invalid path generation in rustdoc searchGuillaume Gomez-1/+1
2018-05-04Rollup merge of #50349 - GuillaumeGomez:rename-type-declaration-label, ↵kennytm-1/+1
r=estebank Rename "show type declaration" to "show declaration" Fixes #50347. r? @QuietMisdreavus
2018-05-03rustdoc: Resolve nested `impl Trait`sShotaro Yamada-31/+32
2018-05-02make it compile againflip1995-6/+6
2018-05-02Fix failures in rustdocSeiichi Uchida-179/+63
2018-05-02Remove Option from the return type of Attribute::name()Seiichi Uchida-2/+2
2018-05-01Auto merge of #49982 - petrochenkov:noreex, r=alexcrichtonbors-14/+1
Remove unstable `macro_reexport` It's subsumed by `feature(use_extern_macros)` and `pub use` cc https://github.com/rust-lang/rust/issues/35896 closes https://github.com/rust-lang/rust/issues/29638 closes https://github.com/rust-lang/rust/issues/38951
2018-05-01Remove `macro_reexport`Vadim Petrochenkov-14/+1
It's subsumed by `feature(use_extern_macros)` and `pub use`
2018-04-30Rename "show type declaration" to "show declaration"Guillaume Gomez-1/+1
2018-04-30Removed unused dependencies on rustc_const_mathOliver Schneider-1/+0
2018-04-30Auto merge of #50326 - ollie27:rustdoc_cross_crate_const_link, r=GuillaumeGomezbors-0/+1
rustdoc: Fix links to constants in external crates r? @GuillaumeGomez
2018-04-30Auto merge of #50204 - Manishearth:approx-enum, r=estebankbors-1/+1
Use enum for approximate suggestions r? @nrc @killercup
2018-04-29rustdoc: Fix links to constants in external cratesOliver Middleton-0/+1
2018-04-28Rollup merge of #50284 - GuillaumeGomez:search-load-failure, r=SimonSapinkennytm-1/+1
fix search load page failure Fixes #50283. r? @QuietMisdreavus
2018-04-28Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakiskennytm-1/+2
Stabilize dyn trait This PR stabilizes RFC 2113. I followed the [stabilization guide](https://forge.rust-lang.org/stabilization-guide.html). Related issue: https://github.com/rust-lang/rust/issues/49218
2018-04-27rustdoc asks for dyn_trait feature in stage0Christian Poveda-0/+2
2018-04-27fix search load page failureGuillaume Gomez-1/+1
2018-04-27removed dyn trait attribute from librustdocChristian Poveda-1/+0
2018-04-27Rollup merge of #49894 - Zoxc:sync-internedstring, r=michaelwoeristerkennytm-8/+8
Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString This is an allocation-free alternative to https://github.com/rust-lang/rust/pull/46972.
2018-04-27Rollup merge of #50229 - GuillaumeGomez:search-one-result, r=QuietMisdreavuskennytm-31/+59
Add setting to go to item if there is only one result Fixes #50216. r? @QuietMisdreavus
2018-04-27Rename InternedString to LocalInternedString and introduce a new thread-safe ↵John Kåre Alsaker-8/+8
InternedString
2018-04-26Add setting to go to item if there is only one resultGuillaume Gomez-31/+59
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-5/+7
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-3/+2
2018-04-26Rollup merge of #50214 - GuillaumeGomez:JS-improvements, r=QuietMisdreavusGuillaume Gomez-32/+24
Js improvements r? @QuietMisdreavus
2018-04-25Approximate -> ApplicabilityManish Goregaokar-1/+1
2018-04-25Some JS improvementsGuillaume Gomez-32/+24
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-8/+8
2018-04-23fix search bar bugGuillaume Gomez-10/+18
2018-04-22Auto merge of #49954 - GuillaumeGomez:doc-settings, r=ollie27,QuietMisdreavusbors-26/+231
Add rustdoc settings menu Fixes #18167. r? @QuietMisdreavus
2018-04-22Auto merge of #49757 - GuillaumeGomez:never-search, r=QuietMisdreavusbors-11/+96
Add specific never search Fixes #49529. r? @QuietMisdreavus
2018-04-22Auto merge of #49896 - SimonSapin:inherent, r=alexcrichtonbors-0/+5
Add inherent methods in libcore for [T], [u8], str, f32, and f64 # Background Primitive types are defined by the language, they don’t have a type definition like `pub struct Foo { … }` in any crate. So they don’t “belong” to any crate as far as `impl` coherence is concerned, and on principle no crate would be able to define inherent methods for them, without a trait. Since we want these types to have inherent methods anyway, the standard library (with cooperation from the compiler) bends this rule with code like [`#[lang = "u8"] impl u8 { /*…*/ }`](https://github.com/rust-lang/rust/blob/1.25.0/src/libcore/num/mod.rs#L2244-L2245). The `#[lang]` attribute is permanently-unstable and never intended to be used outside of the standard library. Each lang item can only be defined once. Before this PR there is one impl-coherence-rule-bending lang item per primitive type (plus one for `[u8]`, which overlaps with `[T]`). And so one `impl` block each. These blocks for `str`, `[T]` and `[u8]` are in liballoc rather than libcore because *some* of the methods (like `<[T]>::to_vec(&self) -> Vec<T> where T: Clone`) need a global memory allocator which we don’t want to make a requirement in libcore. Similarly, `impl f32` and `impl f64` are in libstd because some of the methods are based on FFI calls to C’s `libm` and we want, as much as possible, libcore not to require “runtime support”. In libcore, the methods of `str` and `[T]` that don’t allocate are made available through two **unstable traits** `StrExt` and `SliceExt` (so the traits can’t be *named* by programs on the Stable release channel) that have **stable methods** and are re-exported in the libcore prelude (so that programs on Stable can *call* these methods anyway). Non-allocating `[u8]` methods are not available in libcore: https://github.com/rust-lang/rust/issues/45803. Some `f32` and `f64` methods are in an unstable `core::num::Float` trait with stable methods, but that one is **not in the libcore prelude**. (So as far as Stable programs are concerns it doesn’t exist, and I don’t know what the point was to mark these methods `#[stable]`.) https://github.com/rust-lang/rust/issues/32110 is the tracking issue for these unstable traits. # High-level proposal Since the standard library is already bending the rules, why not bend them *a little more*? By defining a few additional lang items, the compiler can allow the standard library to have *two* `impl` blocks (in different crates) for some primitive types. The `StrExt` and `SliceExt` traits still exist for now so that we can bootstrap from a previous-version compiler that doesn’t have these lang items yet, but they can be removed in next release cycle. (`Float` is used internally and needs to be public for libcore unit tests, but was already `#[doc(hidden)]`.) I don’t know if https://github.com/rust-lang/rust/issues/32110 should be closed by this PR, or only when the traits are entirely removed after we make a new bootstrap compiler. # Float methods Among the methods of the `core::num::Float` trait, three are based on LLVM intrinsics: `abs`, `signum`, and `powi`. PR https://github.com/rust-lang/rust/pull/27823 “Remove dependencies on libm functions from libcore” moved a bunch of `core::num::Float` methods back to libstd, but left these three behind. However they aren’t specifically discussed in the PR thread. The `compiler_builtins` crate defines `__powisf2` and `__powidf2` functions that look like implementations of `powi`, but I couldn’t find a connection with the `llvm.powi.f32` and `llvm.powi.f32` intrinsics by grepping through LLVM’s code. In discussion starting at https://github.com/rust-lang/rust/issues/32110#issuecomment-370647922 Alex says that we do not want methods in libcore that require “runtime support”, but it’s not clear whether that applies to these `abs`, `signum`, or `powi`. In doubt, I’ve **removed** them for the trait and moved them to inherent methods in libstd for now. We can move them back later (or in this PR) if we decide that’s appropriate. # Change details For users on the Stable release channel: * I believe this PR does not make any breaking change * Some methods for `[u8]`, `f32`, and `f64` are newly available to `#![no_std]` users (fixes https://github.com/rust-lang/rust/issues/45803) * There should be no visible change for `std` users in terms of what programs compile or what their behavior is. (Only in compiler error messages, possibly.) For Nightly users, additionally: * The unstable `StrExt` and `SliceExt` traits are gone * Their methods are now inherent methods of `str` and `[T]` (so only code that explicitly named the traits should be affected, not "normal" method calls) * The `abs`, `signum` and `powi` methods of the `Float` trait are gone * The `Float` trait’s unstable feature name changed to `float_internals` with no associated tracking issue, to reflect it being a permanently unstable implementation detail rather than a public API on a path to stabilization. * Its remaining methods are now inherent methods of `f32` and `f64`. ----- CC @rust-lang/libs for the API changes, @rust-lang/compiler for the new lang items
2018-04-21remove unused conditionGuillaume Gomez-5/+0
2018-04-21fix invalid items removalGuillaume Gomez-2/+4
2018-04-21Add aliases in the search as wellGuillaume Gomez-6/+20
2018-04-21Generate alias fileGuillaume Gomez-7/+76
2018-04-21Add specific never searchGuillaume Gomez-1/+6
2018-04-21Remove link generation on image, favicon and logo in settingsGuillaume Gomez-26/+19
2018-04-21Add some f32 and f64 inherent methods in libcoreSimon Sapin-0/+2
… previously in the unstable core::num::Float trait. Per https://github.com/rust-lang/rust/issues/32110#issuecomment-379503183, the `abs`, `signum`, and `powi` methods are *not* included for now since they rely on LLVM intrinsics and we haven’t determined yet whether those instrinsics lower to calls to libm functions on any platform.
2018-04-21Replace StrExt with inherent str methods in libcoreSimon Sapin-0/+1
2018-04-21Replace SliceExt with inherent [T] methods in libcoreSimon Sapin-0/+1
2018-04-21Move non-allocating [u8] inherent methods to libcoreSimon Sapin-0/+1
Fixes #45803
2018-04-21Auto merge of #50080 - klnusbaum:edition_49591, r=Manishearthbors-3/+3
add --edition option This adds an official `edition` flag to the rust compiler