summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2016-08-13Rename empty/bang to neverAndrew Cann-1/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Remove obsolete divergence related stuffAndrew Cann-1/+0
Replace FnOutput with Ty Replace FnConverging(ty) with ty Purge FnDiverging, FunctionRetTy::NoReturn and FunctionRetTy::None
2016-08-12syntax: add anonymized type syntax, i.e. impl TraitA+TraitB.Eduard Burtescu-0/+10
2016-07-25rustdoc: Fix tuple struct where clause renderingOliver Middleton-2/+13
For tuple structs the where clause comes after the definition.
2016-07-22Auto merge of #34924 - cgswords:empty_delim, r=nrcbors-0/+1
Added empty CloseDelim to tokens for future use. Description says it all. I added a new DelimToken type, Empty, to indicate a Delimited tokenstream with no actual delimiters (which are variously useful for constructing macro output). r? @nrc
2016-07-19Introduced `NoDelim` and modified the compiler to support it.cgswords-0/+1
2016-07-19[CSS] Fix unwanted top margin for toggle wrapperggomez-1/+4
2016-07-12rustdoc: Fix methods in seach resultsOliver Middleton-46/+38
Currently methods from extern crates are sometimes added to the search index when they shouldn't be or added with the original path rather than the reexported path. This fixes that by making sure `cache().paths` only contains local paths like the description for it states. It also fixes a few minor issues with link rendering and redirect generation which would point to local crate docs even if the docs for that crate hadn't been generated. Also a bug with methods implemented on traits which caused wrong paths and so dead links in the search results has been fixed.
2016-07-11Auto merge of #34686 - alexcrichton:new-stage, r=luqmanabors-2/+1
rustc: Update stage0 to beta-2016-07-06 Hot off the presses, let's update our stage0 compiler!
2016-07-06Rollup merge of #34685 - GuillaumeGomez:section_header, r=steveklabnikSteve Klabnik-8/+0
Remove invalid CSS rule for doc titles r? @steveklabnik Before: ![issue](https://cloud.githubusercontent.com/assets/3050060/16625595/a2f65914-43a5-11e6-9ff2-bcdf11b68cc3.png) After: ![fixed](https://cloud.githubusercontent.com/assets/3050060/16625602/a9b635ee-43a5-11e6-9f9d-853137eb4e6b.png)
2016-07-06Rollup merge of #34626 - sylvestre:master, r=ManishearthSteve Klabnik-2/+2
Fix typos
2016-07-06rustc: Update stage0 to beta-2016-07-06Alex Crichton-2/+1
Hot off the presses, let's update our stage0 compiler!
2016-07-06Remove invalid CSS rule for doc titlesggomez-8/+0
2016-07-05Auto merge of #34587 - ollie27:rustdoc_prim_titles, r=steveklabnikbors-7/+8
rustdoc: Remove paths from primitive page <title> tags Currently primitive pages have a title like "std::u8 - Rust" this changes it to "u8 - Rust" as "std::u8" is the name of a module not a primitive type.
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-36/+25
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-07-03Fix a few typos in the codeSylvestre Ledru-2/+2
2016-06-30rustdoc: Remove paths from primitive page <title> tagsOliver Middleton-7/+8
Currently primitive pages have a title like "std::u8 - Rust" this changes it to "u8 - Rust" as "std::u8" is the name of a module not a primitive type.
2016-06-30Auto merge of #34541 - jseyfried:rollup, r=jseyfriedbors-16/+1
Rollup of 5 pull requests - Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
2016-06-29Rollup merge of #34536 - ollie27:rustdoc_module_impls, r=alexcrichtonManish Goregaokar-0/+3
rustdoc: Fix empty Implementations section on some module pages These are caused by `DefaultImpl`s. For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
2016-06-29Rollup merge of #34105 - ollie27:rustdoc_derived, r=alexcrichtonJeffrey Seyfried-16/+1
rustdoc: Remove Derived Implementations title As far as I know whether a trait was derived or not does not change the public API so there is no need to include this information in the docs. This title currently just adds an extra divide in the list of trait implementations which I don't think needs to be there.
2016-06-28rustdoc: Fix empty Implementations section on some module pagesOliver Middleton-0/+3
These are caused by `DefaultImpl`s.
2016-06-27Auto merge of #34424 - jseyfried:breaking_batch, r=Manishearthbors-1/+2
Batch up libsyntax breaking changes Batch of the following syntax-[breaking-change] changes: - #34213: Add a variant `Macro` to `TraitItemKind` - #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path` - #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream` - #33943: - Remove the type parameter from `visit::Visitor` - Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead. - Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`. - Remove the field `ctxt` of `ast::Mac_` - Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead. - #34316: - Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`. - Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`) - Rename `ast::ExprKind::Again` to `Continue`. - #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>` - Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>` - Use autoderef instead of `.as_attr_slice()` - #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list. - #34403: Move errors into a separate crate (unlikely to cause breakage)
2016-06-25Rollup merge of #34403 - jonathandturner:move_liberror, r=alexcrichtonJeffrey Seyfried-1/+2
This PR refactors the 'errors' part of libsyntax into its own crate (librustc_errors). This is the first part of a few refactorings to simplify error reporting and potentially support more output formats (like a standardized JSON output and possibly an --explain mode that can work with the user's code), though this PR stands on its own and doesn't assume further changes. As part of separating out the errors crate, I have also refactored the code position portion of codemap into its own crate (libsyntax_pos). While it's helpful to have the common code positions in a separate crate for the new errors crate, this may also enable further simplifications in the future.
2016-06-25rustdoc: Fix search result layout for enum variants and struct fieldsOliver Middleton-1/+1
2016-06-24Auto merge of #34439 - ollie27:rustdoc_panic_fix, r=alexcrichtonbors-10/+13
rustdoc: Fix panic caused by doc(hidden) trait methods Fixes: #34423 r? @alexcrichton
2016-06-23rustdoc: Fix panic caused by doc(hidden) trait methodsOliver Middleton-10/+13
2016-06-23Auto merge of #34372 - ollie27:rustdoc_sidebar, r=steveklabnikbors-1/+5
rustdoc: Add more types to the sidebar They're displayed in the same order as they are on modules pages. You can test [here](https://ollie27.github.io/rust_doc_test/std/). For example: [before](https://doc.rust-lang.org/nightly/std/char/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/char/constant.MAX.html) [before](https://doc.rust-lang.org/nightly/std/os/raw/type.c_char.html) [after](https://ollie27.github.io/rust_doc_test/std/os/raw/type.c_char.html)
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-1/+2
2016-06-22Rollup merge of #34387 - ollie27:rustdoc_src_links, r=alexcrichtonManish Goregaokar-6/+9
rustdoc: Fix a couple of issues with src links to external crates - src links/redirects to extern fn from another crate had an extra '/'. - src links to `pub use` of a crate module had an extra '/'. - src links to renamed reexports from another crate used the new name for the link but should use the original name. Fixes: #34274
2016-06-20Auto merge of #34186 - GuillaumeGomez:err-code-check, r=alexcrichtonbors-18/+37
Implementation of #34168 r? @brson cc @alexcrichton cc @steveklabnik cc @jonathandturner I only updated `librustc_privacy/diagnostics.rs`, and I already found a case where the code doesn't throw the expected error code (E0448). Fixes #34168.
2016-06-20rustdoc: Fix a couple of issues with src links to external cratesOliver Middleton-6/+9
- src links/redirects to extern fn from another crate had an extra '/'. - src links to `pub use` of a crate module had an extra '/'. - src links to renamed reexports from another crate used the new name for the link but should use the original name.
2016-06-20Add error code flagGuillaume Gomez-12/+15
2016-06-19rustdoc: Add more types to the sidebarOliver Middleton-1/+5
They're displayed in the same order as they are on modules pages.
2016-06-17Auto merge of #34292 - ollie27:rustdoc_depr_impl, r=GuillaumeGomezbors-17/+30
rustdoc: Add stability notices to impl items Also fixes missing stability notices on methods with no docs. For example [`f64::is_positive`](https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.is_positive) is missing its deprecation message.
2016-06-16Add an abs_path member to FileMap, use it when writing debug info.Ted Mielczarek-2/+2
When items are inlined from extern crates, the filename in the debug info is taken from the FileMap that's serialized in the rlib metadata. Currently this is just FileMap.name, which is whatever path is passed to rustc. Since libcore and libstd are built by invoking rustc with relative paths, they wind up with relative paths in the rlib, and when linked into a binary the debug info uses relative paths for the names, but since the compilation directory for the final binary, tools trying to read source filenames will wind up with bad paths. We noticed this in Firefox with source filenames from libcore/libstd having bad paths. This change stores an absolute path in FileMap.abs_path, and uses that if available for writing debug info. This is not going to magically make debuggers able to find the source, but it will at least provide sensible paths.
2016-06-15rustdoc: Add stability notices to impl itemsOliver Middleton-17/+30
Also fixes missing stability notices on methods with no docs.
2016-06-14Auto merge of #34245 - ollie27:rustdoc_redirect_rename, r=alexcrichtonbors-12/+10
rustdoc: Fix redirect pages for renamed reexports We need to use the name of the target not the name of the current item when creating the link. An example in `std` is [`std::sys::ext`](https://doc.rust-lang.org/nightly/std/sys/ext/index.html).
2016-06-14Auto merge of #34234 - GuillaumeGomez:bad_inlining, r=steveklabnikbors-2/+6
Fix invalid inlining r? @steveklabnik So to put a context. @nox found an issue on the generated doc: ![screenshot from 2016-06-11 19-53-38](https://cloud.githubusercontent.com/assets/3050060/15987898/f7341de0-303b-11e6-9cd7-f2a6df423ee7.png) So as you can see, the two variants are on the same where they shouldn't. I found out that the issue is also on structs: ![screenshot from 2016-06-11 19-53-31](https://cloud.githubusercontent.com/assets/3050060/15987900/0f66c5de-303c-11e6-90fc-5e49d11b6903.png) And so such is the result of the PR: ![screenshot from 2016-06-12 01-15-21](https://cloud.githubusercontent.com/assets/3050060/15987904/19d9183c-303c-11e6-91c1-7c3f1163fbb0.png) ![screenshot from 2016-06-12 01-15-24](https://cloud.githubusercontent.com/assets/3050060/15987905/1b5d2db0-303c-11e6-8f43-9a8ad2371007.png)
2016-06-14rustdoc: Fix redirect pages for renamed reexportsOliver Middleton-12/+10
We need to use the name of the target not the name of the current item when creating the link.
2016-06-12Add error codes block code flagGuillaume Gomez-6/+22
2016-06-12Auto merge of #34045 - ollie27:rustdoc_stripped, r=brsonbors-17/+24
rustdoc: Don't generate empty files for stripped items We need to traverse stripped modules to generate redirect pages, but we shouldn't generate anything else for them. This now renders the file contents to a Vec before writing it to a file in one go. I think that's probably a better strategy anyway. Fixes: #34025
2016-06-12Fix invalid inliningGuillaume Gomez-2/+6
2016-06-09Auto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrcbors-1/+4
Refactor away the prelude injection fold Instead, just inject `#[prelude_import] use [core|std]::prelude::v1::*;` at the crate root while injecting `extern crate [core|std];` and process `#[no_implicit_prelude]` attributes in `resolve`. r? @nrc
2016-06-08Auto merge of #32202 - arielb1:slice-patterns, r=nikomatsakisbors-3/+4
Implement RFC495 semantics for slice patterns non-MIR translation is still not supported for these and will happily ICE. This is a [breaking-change] for many uses of slice_patterns. [RFC 495 text](https://github.com/rust-lang/rfcs/blob/master/text/0495-array-pattern-changes.md)
2016-06-09fix damage in librustcAriel Ben-Yehuda-3/+4
2016-06-08Auto merge of #34068 - ollie27:rustdoc_redirect_const, r=brsonbors-1/+3
rustdoc: Fix generating redirect pages for statics and consts These were missing from the cache for some reason meaning the redirect pages failed to render.
2016-06-07Rollup merge of #34138 - hoodie:bug/bool_colors, r=steveklabnikSteve Klabnik-2/+2
Bug/bool colors This is actually #33661 @steveklabnik, sorry about this, github ate my homework
2016-06-07Fix bug in `librustdoc` in which an unmatched "</table>" is emitted.Jeffrey Seyfried-1/+4
2016-06-05rustdoc: Remove Derived Implementations titleOliver Middleton-16/+1
As far as I know whether a trait was derived or not does not change the public API so there is no need to include this information in the docs. This title currently just adds an extra divide in the list of trait implementations which I don't think needs to be there.
2016-06-04rustdoc: Fix a few missing colors in the CSSOliver Middleton-5/+6
This adds color to some of the search results and sidebar items which were missing.