Commit Graph

41092 Commits

Author SHA1 Message Date
Alex Crichton 77d164d809 rustdoc: Index inherent methods on primitives
The set of types which can have an inherent impl changed slightly and rustdoc
just needed to catch up to understand what it means to see a `impl str`!

Closes #23511
2015-04-07 17:54:35 -07:00
Alex Crichton 1b568ba0fd std: Hide facade extension traits in docs
These traits are currently all just unstable parts of the facade which are
implementation details for primitives further up the facade. This may make it
more difficult to find what set of methods you get if only linking to libcore,
but for now that's also unstable behavior.

Closes #22025
2015-04-07 17:54:35 -07:00
Alex Crichton f651bea822 std: Reorganize thread::local a bit
Make the structure more amenable to what rustdoc is expecting to ensure that
everything renders all nice and pretty in the output.

Closes #23705
Closes #23910
2015-04-07 17:54:35 -07:00
Alex Crichton 61d0365aac rustdoc: Handle duplicate reexports listed
This ends up causing duplicate output in rustdoc. The source of these duplicates
is that the item is defined in both resolve namespaces, so it's listed twice.

Closes #23207
2015-04-07 17:54:35 -07:00
Alex Crichton dbaa242418 rustdoc: Handle tests with bare `#` marks
Strip them from output like other `# `-starting lines.

Closes #23106
2015-04-07 17:54:34 -07:00
Alex Crichton 11b1ff1900 book: Fix a hyperlink to CONFIGS.md
Right now rustdoc replaces the string ".md)" with ".html)" to fix links between
markdown files, so use a different syntax that doesn't get caught in the
crossfire.

Closes #22900
2015-04-07 17:54:34 -07:00
Alex Crichton ed276caeec mk: Stop documenating non-facade crates
This commit ceases documentation-by-default of crates such as `term`,
`serialize`, and `alloc`. Crates like `term` and `rand` have duplicates on
`crates.io` and the search index entries generated in the local tree end up
only leading to confusion. Crates like the entire compiler infrastructure,
`flate`, or `rbml` don't need to be documented in such a prominent location.

This change also means that doc tests will no longer be run for crates beyond
the facade (e.g. `serialize` or `term`), but there were very few doc tests in
there to begin with.

Closes #22168
2015-04-07 17:54:34 -07:00
Alex Crichton 2b9076ee19 rustdoc: Encode ABI in all methods
This commit ensures that the ABI of functions is propagated all the way through
to the documentation.

Closes #22038
2015-04-07 17:54:34 -07:00
Alex Crichton 6950f68870 rustdoc: Simplify predicates with paren notation
This change is aimed at improving cross-crate (inlined) notation of generic
closures. The change modifies `simplify::where_predicates` to handle
parenthesized notation as well as starting to handle supertrait bounds as well.
This was necessary because all output constraints of closures are bound to
`FnOnce` but most trait bounds are that of `FnMut`.

Close #21801
2015-04-07 17:54:34 -07:00
Alex Crichton d7fcee8347 rustdoc: Detect provided methods on inlined traits
Closes #23864
2015-04-07 17:54:34 -07:00
Alex Crichton 947f1b66cb book: Emit links to play.rust-lang.org to run examples
Had to fix a bug in `--markdown-playground-url` for markdown files in rustdoc as
well as adding some necessary JS to the rustbook output as well.

Closes #21553
2015-04-07 17:54:34 -07:00
Alex Crichton 0f3183f42b rustdoc: Don't duplicate inlined impl blocks
Closes #21474
2015-04-07 17:54:34 -07:00
Alex Crichton ec412c2a94 rustdoc: Add a test for #21092
Close #21092
2015-04-07 17:54:34 -07:00
Alex Crichton 75ef0832ae rustdoc: Improve handling inlined associated types
* All bounds are now discovered through the trait to be inlined.
* The `?Sized` bound now renders correctly for inlined associated types.
* All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a
  hyperlink to the trait `B`. This should improve at least how the docs look at
  least.
* Supertrait bounds are now separated and display as the source lists them.

Closes #20727
Closes #21145
2015-04-07 17:54:34 -07:00
Alex Crichton 11f26f9995 rustdoc: Simplify cross-crate where clauses
Add a custom module to rustdoc which simplifies the output of `middle::ty` into
a more readable form which tends to be written down anyway!

Closes #20646
2015-04-07 17:54:34 -07:00
Alex Crichton 8874fd4962 rustdoc: Show impls for references to types
It's somewhat common to impl traits for `&T` and `&mut T` so show these on the
pages for `T` to ensure they're listed somewhere at least.

Closes #20175
2015-04-07 17:54:34 -07:00
Alex Crichton 8f6855c8c8 rustdoc: Render methods/impls for bare traits
This renders a "Methods" and "Trait Implementations" section for each item
implemented for a bare trait itself.

Closes #19055
2015-04-07 17:54:34 -07:00
Alex Crichton ba402312fe std: Deny most warnings in doctests
Allow a few specific ones but otherwise this helps ensure that our examples are
squeaky clean!

Closes #18199
2015-04-07 17:54:34 -07:00
Alex Crichton 179719d450 rustdoc: Allowing specifying attrs for doctests
This adds support in rustdoc to blanket apply crate attributes to all doc tests
for a crate at once. The syntax for doing this is:

    #![doc(test(attr(...)))]

Each meta item in `...` will be applied to each doctest as a crate attribute.

cc #18199
2015-04-07 17:54:34 -07:00
Alex Crichton 641bca06c8 rustdoc: Link "Trait Implementations" to sources
All methods listed in "Trait Implementations" now hyperlink to the source trait
instead of themselves, allowing easy browsing of the documentation of a trait
method.

Closes #17476
2015-04-07 17:54:34 -07:00
Alex Crichton fcc89ea500 rustdoc: Only hide possibly private modules
If an empty public module has no documentation, it shouldn't emit a page that's
just a redirect loop to itself!

Closes #16265
2015-04-07 17:54:34 -07:00
Alex Crichton c47bb7cd50 rustdoc: Add a test for fixed issue #16019
Closes #16019
2015-04-07 17:54:34 -07:00
Alex Crichton a30f28edad rustdoc: Add a test for fixed issue #15347
Closes #15347
2015-04-07 17:54:34 -07:00
Alex Crichton 9ad133b4a1 rustdoc: Add a primitive page for raw pointers
Closes #15318
2015-04-07 17:54:33 -07:00
Alex Crichton c9c7be78db mk: Pass the same flags to rustdoc as rustc
This ensures that def ids don't drift too much over time.

Closes #15309
2015-04-07 17:54:33 -07:00
Alex Crichton 29299d56c9 rustdoc: Add a test for #15169 2015-04-07 17:54:33 -07:00
Alex Crichton 458102eefa rustdoc: Run external traits through filters
This ensures that all external traits are run through the same filters that the
rest of the AST goes through, stripping hidden function as necessary.

Closes #13698
2015-04-07 17:54:33 -07:00
Alex Crichton d3647fe815 test: Move all run-make rustdoc tests to test/rustdoc 2015-04-07 17:54:33 -07:00
Alex Crichton 10359de405 compiletest: Add support for running rustdoc tests
Add a new test directory called 'rustdoc' where all files inside are documented
and run against the `htmldocck` script to have assertions about the output.
2015-04-07 17:54:33 -07:00
bors dd6c4a8f15 Auto merge of #23293 - tbu-:pr_additive_multiplicative, r=alexcrichton
Previously it could not be implemented for types outside `libcore/iter.rs` due
to coherence issues.
2015-04-08 00:42:10 +00:00
Dave Huseby 5c3aa01045 disabling a test that is failing on bitrig. 2015-04-07 17:07:20 -07:00
Steve Klabnik f354c8a580 New TOC 2015-04-07 19:44:49 -04:00
Aaron Turon dddcbcfeac Fix range performance regression
A recent change to the implementation of range iterators meant that,
even when stepping by 1, the iterators *always* involved checked
arithmetic.

This commit reverts to the earlier behavior (while retaining the
refactoring into traits).

Fixes #24095
cc #24014
2015-04-07 16:20:55 -07:00
Tobias Bucher 97f24a8596 Make `sum` and `product` inherent methods on `Iterator`
In addition to being nicer, this also allows you to use `sum` and `product` for
iterators yielding custom types aside from the standard integers.

Due to removing the `AdditiveIterator` and `MultiplicativeIterator` trait, this
is a breaking change.

[breaking-change]
2015-04-08 00:26:35 +02:00
Ralph Giles 9a51c63a2f rustup: let RUSTUP_PREFIX env override default prefix.
The idea here is if you don't want rust in /usr/local
you can put something like this is your .profile:

export RUSTUP_PREFIX=$HOME/.local/rust
export PATH=$PATH:${RUSTUP_PREFIX}/bin
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${RUSTUP_PREFIX}/lib

Then when you run rustup, it will update the install
in ${RUSTUP_PREFIX} without having to remember to pass
an explicit --prefix argument every time.
2015-04-07 14:05:02 -07:00
Hajime Morrita 334422184e Fix a typo 2015-04-07 13:19:17 -07:00
bors d9146bf8ba Auto merge of #24169 - Manishearth:rollup, r=Manishearth
- Successful merges: #24132, #24139, #24147, #24148, #24150, #24166
- Failed merges:
2015-04-07 19:49:59 +00:00
Manish Goregaokar 4e067f5273 Rollup merge of #24166 - lgvz:email, r=steveklabnik 2015-04-08 01:19:38 +05:30
Manish Goregaokar c4bd1c2bb2 Rollup merge of #24150 - wg:master, r=alexcrichton
This fix allows the gdb debuginfo tests to pass on FreeBSD when using the newer 7.8 package.
2015-04-08 01:19:38 +05:30
Manish Goregaokar fe2cff74f4 Rollup merge of #24148 - xfq:patch-2, r=steveklabnik
People use programming language *implementations* like Ruby MRI, CPython, and SpiderMonkey for executing programs.
2015-04-08 01:19:38 +05:30
Manish Goregaokar 2b34643638 Rollup merge of #24147 - lstat:needstest-22560, r=alexcrichton
Closes #22560
2015-04-08 01:19:38 +05:30
Manish Goregaokar 6295406d9f Rollup merge of #24139 - xfq:patch-1, r=steveklabnik
Use HTTPS where possible to avoid plaintext HTTP connections.
2015-04-08 01:19:37 +05:30
Manish Goregaokar 7b2e11844a Rollup merge of #24132 - kwantam:master, r=alexcrichton
@mahkoh points out in #15628 that unicode.py does not use
normative data for Grapheme classes. This pr fixes that issue,
and does some minor cleanup of the unicode.py script.

In addition, GC_RegionalIndicator is renamed GC_Regional_Indicator
in order to stay in line with the Unicode class name definitions.
I have updated refs in u_str.rs, and verified that there are no
refs elsewhere in the codebase. However, in principle someone
using the unicode tables for their own purposes might see breakage
from this.
2015-04-08 01:19:37 +05:30
Łukasz Niemier 4695bf0705 Remove another invalid example 2015-04-07 21:46:14 +02:00
Kevin Ballard df95719391 Add Clone impls for extern "C" and unsafe fns
We only implemented Clone on `extern "Rust" fn`s (for up to 8
parameters). This didn't cover `extern "C"` or `unsafe` (or `unsafe
extern "C"`) `fn`s, but there's no reason why they shouldn't be
cloneable as well.

The new impls are marked unstable because the existing impl for `extern
"Rust" fn`s is.

Fixes #24161.
2015-04-07 12:39:25 -07:00
Łukasz Niemier 4cf59304c1 Remove incorrect example from docs 2015-04-07 20:35:54 +02:00
Tero Hänninen f728e39572 Change my email 2015-04-07 21:21:46 +03:00
Michael Sproul 039a553998 Add more extended error messages for match exprs. 2015-04-07 11:16:32 -07:00
bors 1fd89b625b Auto merge of #24156 - Manishearth:rollup, r=Manishearth 2015-04-07 16:44:11 +00:00
Manish Goregaokar ae64d8e415 doc ignore (fixup #24059) 2015-04-07 22:10:55 +05:30