summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-2/+2
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-3/+3
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-21Auto merge of #27103 - wthrowe:doc_format, r=alexcrichtonbors-24/+18
This fixes a couple of bugs visible on https://doc.rust-lang.org/nightly/std/marker/trait.Sync.html . For example: * `impl<T> Sync for *const T` should read `impl<T> !Sync for *const T` * `impl<T> !Sync for Weak<T>` should read `impl<T> !Sync for Weak<T> where T: ?Sized` This does change a struct in librustdoc and it seems that almost everything there is marked public, so if librustdoc has stability guarantees that could be a problem. If it is, I'll find a way to rework the change to avoid modifying public structures.
2015-07-20librustdoc: blur page when help dialogue is presentAndreas Tolfsen-41/+62
Blurs the document's background when the help dialogue is present, making the contents of the dialogue stand out more.
2015-07-18Fix rustdoc formatting of implsWilliam Throwe-24/+18
Some cases displayed negative impls as positive, and some were missing where clauses. This factors all the impl formatting into one function so the different cases can't get out of sync again.
2015-07-17DRYTamir Duberstein-2/+2
2015-07-16Merge branch 'fix-26673' of https://github.com/nhowell/rust into rollup_centralSteve Klabnik-0/+6
2015-07-16Rollup merge of #26977 - brson:stddoc, r=GankroManish Goregaokar-0/+5
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint. r? @steveklabnik cc @aturon
2015-07-13Address feedbackBrian Anderson-0/+5
2015-07-12Set zero padding for pre tagsIvan Ukhov-0/+3
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-17/+17
Fixes #26900
2015-07-12Rollup merge of #26967 - tsurai:master, r=steveklabnikManish Goregaokar-1/+1
The very first code fragment off every struct and trait documentation page generates wrong playground code. This pull request adjusts ```playpen.js``` to only create a link for real examples. Documentation: ```rust pub struct String { // some fields omitted } ``` Playground: ```rust Struct std::String [−] [src] ``` r? @steveklabnik
2015-07-12Rollup merge of #26881 - andreastt:international_keyboard, r=alexcrichtonManish Goregaokar-44/+48
Avoids some code duplication and relies less on deprecated properties on `KeyboardEvent`. The code is still looking quite bad, but that’s primarily because interop in this area is a disaster zone.
2015-07-11Auto merge of #26882 - andreastt:style_improvements, r=alexcrichtonbors-5/+4
Sharpens the help dialogues edges by removing border-padding, which matches better with the rest of the document. Also increases somewhat the rounded edges of the key symbols to make it clear they are symbols. Also introduces closing apostrophes and ellipsis for search field placeholder.
2015-07-11doc: remove playground links for structs and traitsCristian Kubis-1/+1
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-17/+17
2015-07-10doc: set playground to nightly for unstable codeCristian Kubis-1/+8
2015-07-09Use vec![elt; n] where possibleUlrik Sverdrup-1/+1
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is exactly equivalent to `vec![elt; n]`, do this replacement in the whole tree. (Actually, vec![] is smart enough to only call clone n - 1 times, while the former solution would call clone n times, and this fact is virtually irrelevant in practice.)
2015-07-08librustdoc: generalise handling of keyboard shortcutsAndreas Tolfsen-44/+48
2015-07-08librustdoc: sharpen help dialogue edgesAndreas Tolfsen-5/+4
Sharpens the help dialogues edges by removing border-padding, which matches better with the rest of the document. Also increases somewhat the rounded edges of the key symbols to make it clear they are symbols. Also introduces closing apostrophes and ellipsis for search field placeholder.
2015-07-01rustdoc: Update jQuery from 2.1.0 to 2.1.4Nick Howell-6/+6
2015-07-01rustdoc: Reset the title when pressing the back buttonNick Howell-0/+6
Fixes #26673
2015-07-01In js from the docs, change keyboard eventlistener to be compatible with ↵Mathieu David-6/+33
non-english keyboard layouts. Fixes #26016 Fixes #16572
2015-06-22Auto merge of #26037 - nhowell:plain_js_playpen, r=steveklabnikbors-14/+34
Since the "Book" already avoids jQuery in its inline script tags and playpen.js is tiny, I figured I would convert it to plain old JS as well. Side note: This is a separate issue, but another thing I noticed in my testing is that the "⇱" character doesn't display correctly in Chrome on Windows 7. (Firefox and IE work fine; other browsers not tested) r? @steveklabnik Edit: Github didn't like the "script" tag above Edit 2: Actually, now IE seems to render "⇱" fine for me. Odd.
2015-06-18rustdoc: Update document title when displaying search resultsJohannes Oertel-0/+3
Fixes #26360.
2015-06-14Find type of orphan methods for rustdoc search.Mihnea Dobrescu-Balaur-1/+3
2015-06-12Convert playpen.js to plain JS.Nick Howell-14/+34
It is still compatible with IE9+. This removes the jQuery dependency from the "Book" entirely.
2015-06-11Conver reborrows to .iter() calls where appropriateJoshua Landau-1/+1
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-06-08Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichtonbors-4/+3
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical. Let’s deprecate now and plan to remove in the next cycle. (It’s `#[unstable]`.) r? @alexcrichton CC @nagisa
2015-06-08Auto merge of #25989 - jooert:implement_rfc839, r=Gankrobors-1/+1
I had to use `impl<'a, V: Copy> Extend<(usize, &'a V)> for VecMap<V>` instead of `impl<'a, V: Copy> Extend<(&'a usize, &'a V)> for VecMap<V>` as that's what is needed for doing ```rust let mut a = VecMap::new(); let b = VecMap::new(); b.insert(1, "foo"); a.extend(&b) ``` I can squash the commits after review. r? @Gankro
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-4/+3
2015-06-08Implement RFC 839Johannes Oertel-1/+1
Closes #25976.
2015-06-04Fix order of rustdoc arguments.Steven Allen-2/+2
rust-example-rendered should be a class, not an id. fixes #26013
2015-05-31rustdoc: Tweak css of function where clausesUlrik Sverdrup-3/+3
Method where clauses are put indented on a new line, do the same tweak to free functions, which makes it cleaner and easier to read.
2015-05-26Auto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichtonbors-10/+15
rustdoc: Associated type fixes The first commit fixes a bug with "dud" items in the search index from misrepresented `type` items in trait impl blocks. For a trait *implementation* there are typedefs which are the types for that particular trait and implementor. Skip these in the search index. There were lots of dud items in the search index due to this (search for Item, Iterator's associated type). Add a boolean to clean::TypedefItem so that it tracks whether the it is a type alias on its own, or if it's a `type` item in a trait impl. The second commit fixes a bug that made signatures and where bounds using associated types (if they were not on `Self`) incorrect. The third commit fixes so that where clauses in type alias definititons are shown. Fixes #22442 Fixes #24417 Fixes #25769
2015-05-25rustdoc: Show where clauses in type aliasesUlrik Sverdrup-2/+3
Yes, it's allowed. Example: type MapFn<I, B> where I: Iterator = Map<I, fn(I::Item) -> B>; Fixes #25769
2015-05-25rustdoc: Fix associated types in signaturesUlrik Sverdrup-3/+3
Functions such as `fn foo<I: Iterator>(x: I::Item)` would not render correctly and displayed `I` instead of `I::Item`. Same thing with `I::Item` appearing in where bounds. This fixes the bug by using paths for generics. Fixes #24417
2015-05-25Rustdoc: ignore deref-inherited static methodsAdolfo Ochagavía-22/+37
Fixes #24575
2015-05-24Auto merge of #25609 - nikomatsakis:const-fn, r=pnkfelixbors-13/+39
This is a port of @eddyb's `const-fn` branch. I rebased it, tweaked a few things, and added tests as well as a feature gate. The set of tests is still pretty rudimentary, I'd appreciate suggestions on new tests to write. Also, a double-check that the feature-gate covers all necessary cases. One question: currently, the feature-gate allows the *use* of const functions from stable code, just not the definition. This seems to fit our usual strategy, and implies that we might (perhaps) allow some constant functions in libstd someday, even before stabilizing const-fn, if we were willing to commit to the existence of const fns but found some details of their impl unsatisfactory. r? @pnkfelix
2015-05-22Rustdoc Search: Add Hint to Primitive Type ResultPascal Hertleif-0/+2
Closes #25167
2015-05-22Rustdoc Search: Increase Relevance of PrimitivesPascal Hertleif-0/+7
2015-05-22Rustdoc: Clean Up Some JSPascal Hertleif-60/+57
There are more possible optimizations left (cached length in loops) as well as some possible bugs (shadowed variables) to fix. This is mostly syntactic.
2015-05-21Make various fixes:Niko Matsakis-1/+1
- add feature gate - add basic tests - adjust parser to eliminate conflict between `const fn` and associated constants - allow `const fn` in traits/trait-impls, but forbid later in type check - correct some merge conflicts
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-13/+39
2015-05-21rustdoc: Skip types in impls in search indexUlrik Sverdrup-5/+9
For a trait *implementation* there are typedefs which are the types for that particular trait and implementor. Skip these in the search index. There were lots of dud items in the search index due to this (search for Item, Iterator's associated type). Add a boolean to clean::TypedefItem so that it tracks whether the it is a type alias on its own, or if it's a `type` item in a trait impl. Fixes #22442
2015-05-19rustdoc: Fix left margin for type aliasesUlrik Sverdrup-1/+1
Fixes #24655 Margin for associated types was applied to type aliases (in return value) by mistake.
2015-05-14syntax: replace sess.span_diagnostic.cm with sess.codemap().Eduard Burtescu-5/+3
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-1/+1
2015-05-11Auto merge of #25225 - bluss:doc-search-assoc-items, r=alexcrichtonbors-1/+15
Rustdoc fixes for associated items This is related to isssue #22442 and solves it partly. This solves the search index links of associated types and constants, so that they link to the trait page. Also add an Associated Constants section if constants are present.