summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-12/+12
2014-10-06auto merge of #17798 : tomjakubowski/rust/rustdoc-fix-bounds, r=alexcrichtonbors-15/+42
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: Include lifetimes in re-exported boundsTom Jakubowski-0/+4
Fix #17818
2014-10-06rustdoc: Remove dummy UnknownBound variantTom Jakubowski-10/+4
2014-10-06rustdoc: Support unboxed fn sugar in boundsTom Jakubowski-9/+21
2014-10-06rustdoc: Correctly name lifetimes in boundsTom Jakubowski-13/+30
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-10/+2
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-12/+12
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-2/+1
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02syntax: mark the managed_boxes feature as Removed.Eduard Burtescu-1/+1
2014-10-02rustdoc: remove handling of Gc.Eduard Burtescu-8/+1
2014-10-02syntax: ast: remove TyBox and UnBox.Eduard Burtescu-1/+0
2014-10-02Put slicing syntax behind a feature gate.Nick Cameron-1/+2
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02Use slice syntax instead of slice_to, etc.Nick Cameron-12/+12
2014-10-01auto merge of #17653 : kaini/rust/master, r=alexcrichtonbors-6/+2
Fixes that unit-like structs cannot be used if they are re-exported and used in another crate. (ICE) The relevant changes are in `rustc::metadata::{decoder, encoder}` and `rustc::middle::ty`. A test case is included. The problem is that the expressoin `UnitStruct` is an `ExprPath` to an `DefFn`, which is of expr kind `RvalueDatumExpr`, but for unit-struct ctors the expr kind should be `RvalueDpsExpr`. I fixed this (in a I guess clean way) by introducing `CtorFn` in the metadata and including a `is_ctor` flag in `DefFn`.
2014-09-30Fix rustdocSteven Fackler-3/+2
2014-09-30Fixes ICE when using reexported unit-like structsMichael Kainer-6/+2
Fixes that unit-like structs cannot be used if they are reexported and used in another crate. The compiler fails with an ICE, because unit-like structs are exported as DefFn and the expression `UnitStruct` is interpreted as function pointer instead of a call to the constructor. To resolve this ambiguity tuple-like struct constructors are now exported as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new flag `is_ctor` in DefFn to true. Relevant changes are in `rustc::metadata::{encoder, decoder}` and in `rustc::middle::ty`. Closes #12660 and #16973.
2014-09-30auto merge of #17563 : brson/rust/wintcbfix, r=thestingerbors-41/+1
This is the bare minimum to stop using split stacks on Windows, fixing https://github.com/rust-lang/rust/issues/13259 and #14742, by turning on stack probes for all functions and disabling compiler and runtime support for split stacks on Windows. It does not restore the out-of-stack error message, which requires more runtime work. This includes a test that the Windows TCB is no longer being clobbered, but the out-of-stack test itself is pretty weak, only testing that the program exits abnormally, not that it isn't writing to bogus memory, so I haven't truly verified that this is providing the safety we claim. A more complete solution is in https://github.com/rust-lang/rust/pull/16388, which has some unresolved issues yet. cc @Zoxc @klutzy @vadimcn
2014-09-29rollup merge of #17531 : tomjakubowski/rustdoc-where-clausesAlex Crichton-21/+76
2014-09-29rustdoc: Render where clauses as appropriateTom Jakubowski-21/+76
Fix #16546
2014-09-28auto merge of #17529 : nodakai/rust/rustdoc-div-in-h1, r=alexcrichtonbors-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-26Remove windows TCB hack from rustdocBrian Anderson-41/+1
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 #17492 : alexcrichton/rust/issue-16274, r=aturonbors-2/+12
Details in the commits.
2014-09-25auto merge of #17378 : Gankro/rust/hashmap-entry, r=aturonbors-8/+18
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-8/+18
2014-09-23Deal with the fallout of string stabilizationAlex Crichton-5/+6
2014-09-23rustdoc: Don't try to inline the crate rootAlex Crichton-2/+5
Fixes other test cases found in #16274
2014-09-23rustdoc: Prevent infinite recursion when inliningAlex Crichton-2/+9
Cyclic pub-use chains triggered infinite recursion, and this commit adds a hash set to guard against cyclic recursion. This will cause one of the reexports to render as a `pub use` instead of inlining the documentation. Closes #16274
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-8/+9
2014-09-19Add enum variants to the type namespaceNick Cameron-29/+29
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-3/+77
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-9/+21
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-4/+12
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-41/+41
2014-09-15Port coherence to use the new trait matching codeNiko Matsakis-1/+1
2014-09-14auto merge of #17163 : pcwalton/rust/impls-next-to-struct, r=alexcrichtonbors-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 { ... } } Closes #17059. RFC #155. [breaking-change] r? @brson
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-14rustdoc: fix fallout from using ptr::P.Eduard Burtescu-154/+127
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-09rollup merge of #17090 : alexcrichton/rustdoc-no-stripAlex Crichton-15/+9
2014-09-08rustdoc: fix fallout from the addition of a 'tcx lifetime on tcx.Eduard Burtescu-472/+438
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.