summary refs log tree commit diff
path: root/src/librustdoc/html/render.rs
AgeCommit message (Collapse)AuthorLines
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-6/+6
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-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-6/+6
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-6/+6
2014-09-29rollup merge of #17531 : tomjakubowski/rustdoc-where-clausesAlex Crichton-12/+16
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-12/+16
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-5/+5
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/+1
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-17rustdoc: Correctly distinguish enums and typesP1start-0/+1
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-16Fallout from renamingAaron Turon-4/+4
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-05auto merge of #16628 : pczarn/rust/hashmap-opt, r=nikomatsakisbors-1/+1
This is #15720, rebased and reopened. cc @nikomatsakis
2014-09-05Work around inability to link lifetime of ref bindings (#16994)Piotr Czarnecki-1/+1
2014-09-03Fix spelling errors and capitalization.Joseph Crail-1/+1
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-7/+7
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-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-2/+2
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-2/+2
This also deprecates HashMap::get. Use indexing instead.
2014-08-06make rustdoc more responsiveAlexis Beingessner-7/+7
* move some sidebar contents to a title bar when small * inline description toggle when small * make out-of-band and in-band content share space, rather than float and clash * compress wording of out-of-band content to avoid line-wrap as much as possible
2014-08-04rustdoc: Just "stability" instead of "stability dashboard"Brian Anderson-1/+1
The words "stability dashboard" take up too much space on small screens.
2014-08-04rustdoc: Emit keywords for all crate pagesBrian Anderson-0/+12
cc #12466
2014-08-04rustdoc: Put field instantiation in declaration order.Brian Anderson-3/+3
cc #12466
2014-08-04rustdoc: Use more descriptive description metadata.Brian Anderson-1/+19
This text appears in and improves search results. cc #12466
2014-08-02auto merge of #16180 : jbcrail/rust/fix-comments, r=steveklabnikbors-1/+1
2014-08-02Add hide/show detail toggles to rustdocAlexis Beingessner-0/+6
All doccomments are now collapsable via a nearby [-] button Adds [collapse all] and [expand all] buttons to the top of all api pages Tweaks some layout to accomadate this
2014-08-01Fix misspelled comments.Joseph Crail-1/+1
2014-07-29auto merge of #15989 : pcwalton/rust/borrowck-pattern-guards, r=pnkfelixbors-10/+12
the CFG for match statements. There were two bugs in issue #14684. One was simply that the borrow check didn't know about the correct CFG for match statements: the pattern must be a predecessor of the guard. This disallows the bad behavior if there are bindings in the pattern. But it isn't enough to prevent the memory safety problem, because of wildcards; thus, this patch introduces a more restrictive rule, which disallows assignments and mutable borrows inside guards outright. I discussed this with Niko and we decided this was the best plan of action. This breaks code that performs mutable borrows in pattern guards. Most commonly, the code looks like this: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz if self.f(...) => { ... } _ => { ... } } } } Change this code to not use a guard. For example: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz => { if self.f(...) { ... } else { ... } } _ => { ... } } } } Sometimes this can result in code duplication, but often it illustrates a hidden memory safety problem. Closes #14684. [breaking-change] r? @pnkfelix
2014-07-26rustdoc: Keep hidden struct fields out of searchTom Jakubowski-1/+5
Previously, private and `#[doc(hidden)]` struct fields appeared in the search index despite being hidden from the struct's documentation. Fix #15490
2014-07-25librustc: Disallow mutation and assignment in pattern guards, and modifyPatrick Walton-10/+12
the CFG for match statements. There were two bugs in issue #14684. One was simply that the borrow check didn't know about the correct CFG for match statements: the pattern must be a predecessor of the guard. This disallows the bad behavior if there are bindings in the pattern. But it isn't enough to prevent the memory safety problem, because of wildcards; thus, this patch introduces a more restrictive rule, which disallows assignments and mutable borrows inside guards outright. I discussed this with Niko and we decided this was the best plan of action. This breaks code that performs mutable borrows in pattern guards. Most commonly, the code looks like this: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz if self.f(...) => { ... } _ => { ... } } } } Change this code to not use a guard. For example: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz => { if self.f(...) { ... } else { ... } } _ => { ... } } } } Sometimes this can result in code duplication, but often it illustrates a hidden memory safety problem. Closes #14684. [breaking-change]
2014-07-17deprecate Vec::getNick Cameron-1/+1
2014-07-15Fix errorsAdolfo Ochagavía-2/+2
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-1/+1
Use `String::from_utf8` instead [breaking-change]
2014-07-12auto merge of #15602 : adrientetar/rust/name-fix, r=huonwbors-2/+2
Not sure how I did miss that in the first place... r? @alexcrichton
2014-07-11webfonts: name fixAdrien Tétar-2/+2
2014-07-10rustdoc: Add stability dashboardAaron Turon-5/+51
This commit adds a crate-level dashboard summarizing the stability levels of all items for all submodules of the crate. The information is also written as a json file, intended for consumption by pages like http://huonw.github.io/isrustfastyet/ Closes #13541
2014-07-09auto merge of #15530 : adrientetar/rust/proper-fonts, r=alexcrichtonbors-4/+8
- Treat WOFF as binary files so that git does not perform newline normalization. - Replace corrupt Heuristica files with Source Serif Pro &mdash; italics are [almost in production](https://github.com/adobe/source-serif-pro/issues/2) so I left Heuristica Italic which makes a good pair with SSP. Overall, Source Serif Pro is I think a better fit for rustdoc (cc @TheHydroImpulse). This ought to fix #15527. - Store Source Code Pro locally in order to make offline docs freestanding. Fixes #14778. Preview: http://adrientetar.legtux.org/cached/rust-docs/core.html r? @alexcrichton
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-07-08webfonts: serve Source Code Pro locallyAdrien Tétar-0/+4
So that we have freestanding docs.
2014-07-08webfonts: proper fixAdrien Tétar-4/+4