summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2015-01-07rollup merge of #20721: japaric/snapAlex Crichton-3/+3
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
2015-01-07rollup merge of #20725: tomjakubowski/rustdoc-miscAlex Crichton-2/+18
Conflicts: src/librustdoc/html/format.rs
2015-01-07rollup merge of #20722: alexcrichton/audit-showAlex Crichton-3/+18
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustdoc/html/format.rs
2015-01-07rollup merge of #20708: aturon/new-int-modulesAlex Crichton-257/+0
Conflicts: src/libserialize/lib.rs
2015-01-07rustdoc: Render associated type bindingsTom Jakubowski-2/+25
e.g. `Foo<Output=A>` This does not work cross-crate unfortunately. Part of #20646
2015-01-07std: Tweak String implementationsAlex Crichton-3/+18
This commit performs a pass over the implementations of the new `String` trait in the formatting module. Some implementations were removed as a conservative move pending an upcoming convention about `String` implementations, and some were added in order to retain consistency across the libraries. Specifically: * All "smart pointers" implement `String` now, adding missing implementations for `Arc` and `Rc`. * The `Vec<T>` and `[T]` types no longer implement `String`. * The `*const T` and `*mut T` type no longer implement `String`. * The `()` type no longer implements `String`. * The `Path` type's `Show` implementation does not surround itself with `Path {}` (a minor tweak). All implementations of `String` in this PR were also marked `#[stable]` to indicate that the types will continue to implement the `String` trait regardless of what it looks like.
2015-01-07use slicing sugarJorge Aparicio-3/+3
2015-01-07register new snapshotsJorge Aparicio-257/+0
2015-01-07Register new snapshotsAlex Crichton-257/+0
2015-01-08Fix rustdoc fallout from #20092Barosl Lee-1/+1
Due to the CSS changes done by the previous patch to make the line numbers clickable (#20092), the sidebar became unclickable. This commit reverts the changes and adopts an alternative approach.
2015-01-07Merge pull request #20682 from sfackler/fix-implsbors-1/+1
Fix JS error Reviewed-by: alexcrichton
2015-01-06More test fixesAlex Crichton-2/+0
2015-01-06Fix JS errorSteven Fackler-1/+1
ECMAScript 6 isn't really supported anywhere Closes #20681
2015-01-06rollup merge of #20653: alexcrichton/entry-unstableAlex Crichton-3/+3
There's been some debate over the precise form that these APIs should take, and they've undergone some changes recently, so these APIs are going to be left unstable for now to be fleshed out during the next release cycle.
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-12/+277
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-07falloutNick Cameron-10/+10
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-12/+277
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Replace full slice notation with index callsNick Cameron-3/+3
2015-01-06[breaking change] Revert Entry behaviour to take keys by value.Dylan Ede-3/+3
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-0/+3
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05rollup merge of #20507: alexcrichton/issue-20444Alex Crichton-7/+9
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-05rollup merge of #20092: barosl/rustdoc-line-number-clickableAlex Crichton-8/+49
While talking on IRC, someone wanted to post a link to the Rust source code, but while the lines of the rendered source code do have anchors (`<span id="[line number]">`), there is no convenient way to make links as they are not clickable. This PR makes them clickable. Also, a minor fix of the FAQ is included.
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-0/+3
2015-01-05std: Redesign c_str and c_vecAlex Crichton-7/+9
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-04[breaking change] Update entry API as part of RFC 509.Ben Foppa-13/+7
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-14/+14
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2015-01-02rollup merge of #20410: japaric/assoc-typesAlex Crichton-11/+21
Conflicts: src/liballoc/lib.rs src/libcollections/lib.rs src/libcollections/slice.rs src/libcore/ops.rs src/libcore/prelude.rs src/libcore/ptr.rs src/librustc/middle/traits/project.rs src/libstd/c_str.rs src/libstd/io/mem.rs src/libstd/io/mod.rs src/libstd/lib.rs src/libstd/path/posix.rs src/libstd/path/windows.rs src/libstd/prelude.rs src/libstd/rt/exclusive.rs src/libsyntax/lib.rs src/test/compile-fail/issue-18566.rs src/test/run-pass/deref-mut-on-ref.rs src/test/run-pass/deref-on-ref.rs src/test/run-pass/dst-deref-mut.rs src/test/run-pass/dst-deref.rs src/test/run-pass/fixup-deref-mut.rs src/test/run-pass/issue-13264.rs src/test/run-pass/overloaded-autoderef-indexing.rs
2015-01-02rollup merge of #20377: alexcrichton/issue-20352Alex Crichton-40/+41
2015-01-02rustdoc: fix rendering of associated typesCorey Richardson-11/+21
2015-01-02std: Stabilize the prelude moduleAlex Crichton-1/+3
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2015-01-01std: Enforce Unicode in fmt::WriterAlex Crichton-40/+41
This commit is an implementation of [RFC 526][rfc] which is a change to alter the definition of the old `fmt::FormatWriter`. The new trait, renamed to `Writer`, now only exposes one method `write_str` in order to guarantee that all implementations of the formatting traits can only produce valid Unicode. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md One of the primary improvements of this patch is the performance of the `.to_string()` method by avoiding an almost-always redundant UTF-8 check. This is a breaking change due to the renaming of the trait as well as the loss of the `write` method, but migration paths should be relatively easy: * All usage of `write` should move to `write_str`. If truly binary data was being written in an implementation of `Show`, then it will need to use a different trait or an altogether different code path. * All usage of `write!` should continue to work as-is with no modifications. * All usage of `Show` where implementations just delegate to another should continue to work as-is. [breaking-change] Closes #20352
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-1/+1
2014-12-31rustdoc: unbox closures used in let bindingsJorge Aparicio-1/+1
2014-12-30Fallout from stabilizationAaron Turon-4/+6
2014-12-30Remove the def-id from type parameters. Having this def-id was bad for ↵Niko Matsakis-3/+2
several reasons: 1. Produced more unique types than is necessary. This increases memory consumption. 2. Linking the type parameter to its definition *seems* like a good idea, but it encourages reliance on the bounds listing. 3. It made pretty-printing harder and in particular was causing bad error messages when errors occurred before the `TypeParameterDef` entries were fully stored.
2014-12-29rollup merge of #20269: dirk/indent-whereAlex Crichton-1/+7
* Add <span class=‘where’> around clause * CSS rule to format the span (for issue #20176)
2014-12-29rollup merge of #20194: nick29581/dst-syntaxAlex Crichton-9/+10
Part of #19607. r? @nikomatsakis
2014-12-28Use CSS whitespace rather than padding to indentDirk Gadsden-2/+4
2014-12-27Indent where clause in rustdocDirk Gadsden-1/+5
* Add <span class=‘where’> around clause * CSS rule to format the span (for #20176)
2014-12-27auto merge of #19916 : SimonSapin/rust/ascii-reform, r=sfacklerbors-1/+1
Implements [RFC 486](https://github.com/rust-lang/rfcs/pull/486). Fixes #19908. * Rename `to_ascii_{lower,upper}` to `to_ascii_{lower,upper}case`, per #14401 * Remove the `Ascii` type and associated traits: `AsciiCast`, `OwnedAsciiCast`, `AsciiStr`, `IntoBytes`, and `IntoString`. * As a replacement, add `.is_ascii()` to `AsciiExt`, and implement `AsciiExt` for `u8` and `char`. [breaking-change]
2014-12-27Make the line numbers of the source code clickableBarosl Lee-8/+49
2014-12-26auto merge of #20183 : japaric/rust/doctests, r=alexcrichtonbors-13/+14
#20075 introduced a bug where unmarked code fences weren't considered as doctests. This PR fixes the logic. --- This passed `check-stage1-rustdoc`, and I manually checked that: ``` rust //! ``` //! println!("Hello") //! ``` //! //! ``` rust //! println!("Hello") //! ``` //! //! ``` sh //! println!("Hello") //! ``` //! //! ``` ignore //! println!("Hello") //! ``` ``` Generated: ``` rust running 3 tests test _2 ... ignored test _0 ... ok test _1 ... ok ``` I'd love to add that as a test, but I have no idea how to do that with our testing infrastructure. If anyone knows how, do let me know! r? @alexcrichton @seanmonstar feedback?
2014-12-26Changes to RustDocNick Cameron-9/+10
2014-12-25auto merge of #20180 : jroesch/rust/clean-where-predicate, r=alexcrichtonbors-2/+20
Add support for all variants of ast::WherePredicate in clean/mod.rs. Fixes #20048, but will need modification when EqualityPredicates are fully implemented in #20041.
2014-12-25auto merge of #19934 : tomjakubowski/rust/rustdoc-unboxed-closures-redux, ↵bors-50/+85
r=alexcrichton We render HRTB and the unboxed closure trait sugar (the so-called "parenthesized" notation) where appropriate. Also address the new `for` syntax on the old closures.
2014-12-24Rename to_ascii_{lower,upper} to to_ascii_{lower,upper}case, per #14401Simon Sapin-1/+1
[breaking-change]
2014-12-24rustdoc: Use unboxed closure sugarTom Jakubowski-39/+58
This unfortunately leaves sugaring Fn/FnMut/FnOnce on cross-crate re-exports for future work. cc #19909
2014-12-24rustdoc: render higher-rank trait boundsTom Jakubowski-9/+25
Fix #19915
2014-12-24rustdoc: render `for<>` on old closure lifetimesTom Jakubowski-2/+2