summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-9/+9
2014-10-06auto merge of #17798 : tomjakubowski/rust/rustdoc-fix-bounds, r=alexcrichtonbors-3/+7
This PR adds support in rustdoc for properly naming lifetimes in bounds, instead of just showing `'static` for everything. It also adds support for unboxed function sugar bounds, which were also previously rendered as `'static`.
2014-10-06auto merge of #17796 : tomjakubowski/rust/rustdoc-ice-17736, r=alexcrichtonbors-1/+11
Previously, external code might call `markdown::render()` without having called `markdown::reset_headers()`, meaning the TLS key `used_header_map` was unset. Now `markdown::render()` ensures that `used_header_map` is set by calling `reset_headers` if necessary. Fix #17736
2014-10-06rustdoc: Remove dummy UnknownBound variantTom Jakubowski-5/+1
2014-10-06rustdoc: Support unboxed fn sugar in boundsTom Jakubowski-3/+3
2014-10-06rustdoc: Correctly name lifetimes in boundsTom Jakubowski-3/+11
Fix #16518
2014-10-06rustdoc: make calls of markdown::render saferTom Jakubowski-1/+11
Previously, external code might call `markdown::render()` without having called `markdown::reset_headers()`, meaning the TLS key `used_header_map` was unset. Now `markdown::render()` ensures that `used_header_map` is set by calling `reset_headers` if necessary. Fix #17736
2014-10-06Rename the file permission statics in std::io to be uppercaseP1start-1/+1
For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old name. Code using these statics should be updated accordingly.
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-1/+1
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-9/+9
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02rustdoc: remove handling of Gc.Eduard Burtescu-1/+1
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-9/+9
2014-09-29rollup merge of #17531 : tomjakubowski/rustdoc-where-clausesAlex Crichton-20/+53
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-20/+53
Fix #16546
2014-09-25rustdoc: replace DIV inside H1 with SPAN.NODA, Kai-3/+4
W3C HTML5 spec states that H1 must enclose "phrasing content" which doesn't include DIV. But SPAN is OK. http://www.w3.org/TR/html5/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements
2014-09-25auto merge of #17378 : Gankro/rust/hashmap-entry, r=aturonbors-7/+13
Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in favour of the "external mutation" Entry API as part of RFC 60. Part of #17320, but this still needs to be done on the rest of the maps. However they don't have any internal mutation methods defined, so they can be done without deprecating or breaking anything. Work on `BTree` is part of the complete rewrite in #17334. The implemented API deviates from the API described in the RFC in two key places: * `VacantEntry.set` yields a mutable reference to the inserted element to avoid code duplication where complex logic needs to be done *regardless* of whether the entry was vacant or not. * `OccupiedEntry.into_mut` was added so that it is possible to return a reference into the map beyond the lifetime of the Entry itself, providing functional parity to `VacantEntry.set`. This allows the full find_or_insert functionality to be implemented using this API. A PR will be submitted to the RFC to amend this. [breaking-change]
2014-09-24handling fallout from entry apiAlexis Beingessner-7/+13
2014-09-23Deal with the fallout of string stabilizationAlex Crichton-1/+2
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-2/+3
2014-09-19Add enum variants to the type namespaceNick Cameron-6/+6
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-0/+4
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-17rollup merge of #17226 : P1start/rustdoc-colourAlex Crichton-7/+12
2014-09-17auto merge of #17247 : huonw/rust/toggle-clone, r=alexcrichtonbors-1/+1
This needs a clone otherwise each successive insertion detaches `toggle` from the previous position. Fixes #17125.
2014-09-17rustdoc: Correctly distinguish enums and typesP1start-2/+3
This is done by adding a new field to the `DefTy` variant of `middle::def::Def`, which also clarifies an error message in the process. Closes #16712.
2014-09-17Restore colour to rustdoc, add colour to ffi functions and methodsP1start-5/+9
2014-09-16Fallout from renamingAaron Turon-5/+5
2014-09-14Display the doc-block toggle on everything again.Huon Wilson-1/+1
This needs a clone otherwise each successive insertion detaches `toggle` from the previous position. Fixes #17125.
2014-09-13librustc: Forbid inherent implementations that aren't adjacent to thePatrick Walton-0/+1
type they provide an implementation for. This breaks code like: mod foo { struct Foo { ... } } impl foo::Foo { ... } Change this code to: mod foo { struct Foo { ... } impl Foo { ... } } Additionally, if you used the I/O path extension methods `stat`, `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have been moved to the the `std::io::fs::PathExtensions` trait. This breaks code like: fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Change this code to: use std::io::fs::PathExtensions; fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Closes #17059. RFC #155. [breaking-change]
2014-09-07rustdoc: Don't strip #-lines if notrustAlex Crichton-15/+9
Other languages may not want to have a leading #-line get stripped.
2014-09-07auto merge of #17035 : huonw/rust/moar-jquery, r=alexcrichtonbors-13/+14
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
2014-09-06auto merge of #17011 : nodakai/rust/rustdoc-stronger-crate, r=alexcrichtonbors-0/+2
If you browse to, say, http://doc.rust-lang.org/libc/types/os/common/posix01/struct.timeval.html , you will see the "location" window showing `libc::types::os::common::posix01`. The first element points to a crate and others point modules. This patch adds the bold attribute to the first (ie. crate) element so that it stands out more.
2014-09-06Use more jQuery to avoid displaying Expand Description more often.Huon Wilson-13/+14
Sometimes (e.g. on Rust CI) the "expand description" text of the collapse toggle was displayed by default, when a page is first loaded (even though the description is expanded), because some Content-Security-Policy settings disable inline CSS. Setting it the style with the `.css` method allows the output to be used in more places.
2014-09-05auto merge of #16628 : pczarn/rust/hashmap-opt, r=nikomatsakisbors-1/+1
This is #15720, rebased and reopened. cc @nikomatsakis
2014-09-05rustdoc/html: emphasize the crate part of the full path.NODA, Kai-0/+2
2014-09-05Work around inability to link lifetime of ref bindings (#16994)Piotr Czarnecki-1/+1
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-1/+1
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.
2014-09-03Fix spelling errors and capitalization.Joseph Crail-1/+1
2014-08-31Make doc search results use <a> tags instead of js for navigatingCarol Nichols-38/+36
This has the primary advantage of not interfering with browser default behavior for links like being able to cmd/ctrl+click on a result to open the result in a new tab but leave the current page as-is (previous behavior both opened a new tab and changed the current tab's location to the result's)
2014-08-29auto merge of #16767 : SiegeLord/rust/reexported_methods, r=cmrbors-8/+10
Previously, this caused methods of re-exported types to not be inserted into the search index. This fix may introduce some false positives, but in my testing they appear as orphaned methods and end up not being inserted into the final search index at a later stage. Fixes issue #11943
2014-08-28auto merge of #16664 : aturon/rust/stabilize-option-result, r=alexcrichtonbors-12/+12
Per API meeting https://github.com/rust-lang/meeting-minutes/blob/master/Meeting-API-review-2014-08-13.md # Changes to `core::option` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. However, a few methods have been deprecated, either due to lack of use or redundancy: * `take_unwrap`, `get_ref` and `get_mut_ref` (redundant, and we prefer for this functionality to go through an explicit .unwrap) * `filtered` and `while` * `mutate` and `mutate_or_set` * `collect`: this functionality is being moved to a new `FromIterator` impl. # Changes to `core::result` Most of the module is marked as stable or unstable; most of the unstable items are awaiting resolution of conventions issues. * `collect`: this functionality is being moved to a new `FromIterator` impl. * `fold_` is deprecated due to lack of use * Several methods found in `core::option` are added here, including `iter`, `as_slice`, and variants. Due to deprecations, this is a: [breaking-change]
2014-08-28Fallout from stabilizing core::optionAaron Turon-12/+12
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-15/+8
2014-08-26Always insert methods into the search index, even if we're currently in a ↵SiegeLord-8/+10
private module. Previously, this caused methods of re-exported types to not be inserted into the search index. This fix may introduce some false positives, but in my testing they appear as orphaned methods and end up not being inserted into the final search index at a later stage. Fixes issue #11943
2014-08-26DST coercions and DST structsNick Cameron-1/+2
[breaking-change] 1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code. 2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible. 3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
2014-08-20Add #[repr(C)] to all the things!Corey Richardson-0/+4
2014-08-18libsyntax: Remove the `use foo = bar` syntax from the language in favorPatrick Walton-7/+5
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
2014-08-17rustdoc: Fix and improve line break hints with the <wbr> tagPiotr Czarnecki-3/+3
Prevents zero-width spaces from appearing in copy-pasted paths. Puts line breaks after `::`. Fixes #16555
2014-08-14librustc: Stop assuming that implementations and traits only containPatrick Walton-15/+30
methods. This paves the way to associated items by introducing an extra level of abstraction ("impl-or-trait item") between traits/implementations and methods. This new abstraction is encoded in the metadata and used throughout the compiler where appropriate. There are no functional changes; this is purely a refactoring.
2014-08-12auto merge of #16195 : P1start/rust/more-index, r=aturonbors-8/+8
Implement `Index` for `RingBuf`, `HashMap`, `TreeMap`, `SmallIntMap`, and `TrieMap`. If there’s anything that I missed or should be removed, let me know.
2014-08-12Implement Index for HashMapP1start-8/+8
This also deprecates HashMap::get. Use indexing instead.