summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2015-06-23Remove the mostly unecessary ParamBounds structJared Roesch-13/+0
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-20Auto merge of #26417 - brson:feature-err, r=steveklabnikbors-2/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-19Auto merge of #26351 - eddyb:tls-tcx, r=nikomatsakisbors-54/+55
Pre-requisite for splitting the type context into global and local parts. The `Repr` and `UserString` traits were also replaced by `Debug` and `Display`.
2015-06-19Rollup merge of #26401 - jooert:fix26360, r=steveklabnikManish Goregaokar-0/+3
Fixes #26360. r? @steveklabnik
2015-06-18Make a better error message for using #[feature] on stable rustBrian Anderson-2/+2
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-19rustc: replace Repr/UserString impls with Debug/Display ones.Eduard Burtescu-1/+1
2015-06-19rustc: enforce stack discipline on ty::ctxt.Eduard Burtescu-53/+54
2015-06-19rustc: remove ownership of tcx from trans' context.Eduard Burtescu-9/+9
2015-06-18rustdoc: Update document title when displaying search resultsJohannes Oertel-0/+3
Fixes #26360.
2015-06-17More test fixes and fallout of stability changesAlex Crichton-2/+2
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-6/+9
2015-06-14Find type of orphan methods for rustdoc search.Mihnea Dobrescu-Balaur-1/+3
2015-06-12Split TyArray into TyArray and TySlice.Eli Friedman-3/+3
Arrays and slices are closely related, but not that closely; making the separation more explicit is generally more clear.
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-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-41/+39
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-11Conver reborrows to .iter() calls where appropriateJoshua Landau-2/+2
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-19/+20
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-2/+3
2015-06-08Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichtonbors-6/+5
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-6/+5
2015-06-08Implement RFC 839Johannes Oertel-1/+1
Closes #25976.
2015-06-08Auto merge of #25823 - oli-obk:static_to_const_lint, r=alexcrichtonbors-1/+1
r? @eddyb
2015-06-07change some statics to constantsOliver 'ker' Schneider-1/+1
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-27Auto merge of #25796 - arielb1:default-assoc, r=eddybbors-39/+38
r? @eddyb Fixes #19476.
2015-05-26Auto merge of #25675 - bluss:rustdoc-assoc-types-index, r=alexcrichtonbors-28/+47
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-26Auto merge of #24657 - aochagavia:rustdoc, r=alexcrichtonbors-22/+37
Fixes #24575 Fixes #25673 r? @alexcrichton
2015-05-26Implement defaults for associated typesAriel Ben-Yehuda-39/+38
2015-05-26Make caching in stability work. This improves stability check performanceAriel Ben-Yehuda-1/+17
by 90%.
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-15/+29
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-20/+61
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-5/+8
- 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-18/+56
2015-05-21rustdoc: Skip types in impls in search indexUlrik Sverdrup-11/+15
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-17Auto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakisbors-13/+11
This allows compiling entire crates from memory or preprocessing source files before they are tokenized. Minor API refactoring included, which is a [breaking-change] for libsyntax users: * `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session` * `new_parse_sess` -> `ParseSess::new` * `new_parse_sess_special_handler` -> `ParseSess::with_span_handler` * `mk_span_handler` -> `SpanHandler::new` * `default_handler` -> `Handler::new` * `mk_handler` -> `Handler::with_emitter` * `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
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-8/+8
2015-05-12Auto merge of #25323 - eddyb:coherent-coherence, r=pnkfelixbors-1/+1
The loop to load all the known impls from external crates seems to have been used because `ty::populate_implementations_for_trait_if_necessary` wasn't doing its job, and solely relying on it resulted in loading only impls in the same crate as the trait. Coherence for `librustc` was reduced from 18.310s to 0.610s, from stage1 to stage2. Interestingly, type checking also went from 46.232s to 42.003s, though that could be noise or unrelated improvements. On a smaller scale, `fn main() {}` now spends 0.003s in coherence instead of 0.368s, which fixes #22068. It also peaks at only 1.2MB, instead of 16MB of heap usage.
2015-05-12rustc: rename ty::populate_implementations_for_type_if_necessary to make it ↵Eduard Burtescu-1/+1
clear that it only populates inherent impls.
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.