Commit Graph

22855 Commits

Author SHA1 Message Date
Steven Fackler
d8957e6332 Some struct visibility fixes 2013-09-25 19:42:02 -07:00
bors
00db6f6e7b auto merge of #9502 : brson/rust/fix-logo-icon, r=brson 2013-09-25 17:55:53 -07:00
David Creswick
252c6dbe85 Fix visibility of digest implementations 2013-09-25 19:39:17 -05:00
Alex Crichton
eb2b25dd6d Refactor the logging system for fewer allocations
This lifts various restrictions on the runtime, for example the character limit
when logging a message. Right now the old debug!-style macros still involve
allocating (because they use fmt! syntax), but the new debug2! macros don't
involve allocating at all (unless the formatter for a type requires allocation.
2013-09-25 16:30:05 -07:00
bors
41826c48ed auto merge of #9475 : alexcrichton/rust/rustdoc++, r=cmr
The commit messages are a good technical summary, a good visual summary (contrib is this version):

Pub use statements now rendered. Notice how almost all components are also clickable!
* http://static.rust-lang.org/doc/master/std/prelude/index.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/prelude/index.html

Private things hidden by default (for at least some approximation of privacy). I hope to improve this once privacy is totally ironed out.
* http://static.rust-lang.org/doc/master/std/hashmap/struct.HashMap.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/std/hashmap/struct.HashMap.html

Unindentation now works properly:
* http://static.rust-lang.org/doc/master/extra/getopts/index.html
* http://www.contrib.andrew.cmu.edu/~acrichto/doc/extra/getopts/index.html

Also sundown has massively reduced compilation time (of docs, not the of the crates)
2013-09-25 15:40:52 -07:00
Brian Anderson
e82db13760 Fix the rust logo icon 2013-09-25 15:21:37 -07:00
Felix S. Klock II
ee74ccb101 stop fighting with rust logo filetype. 2013-09-25 23:52:08 +02:00
Felix S. Klock II
48b4b1f52c errfunc ptr is nullable, so use Option as part of interface to glob (#7752). 2013-09-25 23:38:59 +02:00
Alex Crichton
3d5873fa42 rustdoc: Fix merge fallout 2013-09-25 14:28:20 -07:00
Alex Crichton
38eab97d16 rustdoc: Fix an unindentation bug when collapsing
Turns out eagerly trimming comes back to bite you :(
2013-09-25 14:27:43 -07:00
Alex Crichton
bcb8657842 rustdoc: Collapse before unindenting
Doesn't make much sense to unindent each line individually and *then* collapse
them all together.
2013-09-25 14:27:43 -07:00
Alex Crichton
e7fa081c18 rustdoc: Reduce ambiguity with clean::Type
The "Unresolved" variant could be completely removed becuase it turns out that
the interim state only very briefly lives.
2013-09-25 14:27:43 -07:00
Alex Crichton
f648690234 rustdoc: Strip hidden docs by default. 2013-09-25 14:27:43 -07:00
Alex Crichton
c4219a4783 rustdoc: Highlight function names
Closes #9460
2013-09-25 14:27:42 -07:00
Alex Crichton
5636ca625e rustdoc: Start rendering variants (redirect to enum)
This allows reasonable behavior when an enum is clicked in an import.
2013-09-25 14:27:42 -07:00
Alex Crichton
5c6f8a976f rustdoc: Linkify all reexports.
This way each component of a reexport path is click-able to the destination that
it's referencing.
2013-09-25 14:27:42 -07:00
Alex Crichton
c838351ba6 rustdoc: Implement stripping based on privacy
This will probably need to get tweaked once the privacy rules have been fully
agreed on, but for now this has all of the infrastructure necessary for
filtering out private items.

Closes #9410
2013-09-25 14:27:42 -07:00
Alex Crichton
acab4a8c8e rustdoc: Emit purity to function dox for traits
Closes #3804
2013-09-25 14:27:42 -07:00
Alex Crichton
eaaf2bd41f rustdoc: Add the ability to list all passes
In doing so, also remove the collapse-privacy pass because it's a little
over-zealous and may not be right 100% of the time (not used right now as well)
2013-09-25 14:27:42 -07:00
Alex Crichton
bcc7daa6bc rustdoc: Improve comment stripping
There is less implicit removal of various comment styles, and it also removes
extraneous stars occasionally found in docblock comments. It turns out that the
bug for getops was just a differently formatted block.

Closes #9425
Closes #9417
2013-09-25 14:27:42 -07:00
Alex Crichton
35c0cdff5a rustdoc: Enable various useful markdown extensions 2013-09-25 14:27:42 -07:00
Alex Crichton
3585c64d09 rustdoc: Change all code-blocks with a script
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g'
    find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g'
    find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-25 14:27:42 -07:00
Alex Crichton
db28c29980 rustdoc: Use sundown for markdown highlighting
This takes rendering times of documentation down from 30s to 0.5s. Kinda sad
that none of the parallelism is needed, but oh well!

Closes #7380
cc #3546
2013-09-25 14:27:42 -07:00
Alex Crichton
6aba140fa7 rustdoc: Add sundown to src/rt/
This also starts compiling it in the same manner as linenoise, it's just bundled
with librustrt directly, and we export just a few symbols out of it.
2013-09-25 14:27:41 -07:00
bors
24d46a0f45 auto merge of #9345 : Dretch/rust/digest-result-bytes, r=cmr
I would find this function useful.
2013-09-25 14:25:52 -07:00
Florian Hahn
23a067dc2c Rename from_utf8 to from_bytes again 2013-09-25 22:58:57 +02:00
bors
af25f58ac3 auto merge of #9498 : catamorphism/rust/rust-path-hack-fix, r=cmr,metajack
r? @metajack
2013-09-25 12:45:54 -07:00
Alex Crichton
324418f32b Don't die in try_unsafe_borrow if tls isn't ready
If there's no TLS key just yet, then there's nothing to unsafely borrow, so
continue returning None. This prevents causing the runtime to abort itself when
logging before the runtime is fully initialized.

Closes #9487
2013-09-25 11:40:30 -07:00
Brian Anderson
a05de31ae9 0.8 will be in September 2013-09-25 11:38:44 -07:00
bors
0186473bd2 auto merge of #9493 : huonw/rust/move-tuples, r=thestinger
The old behaviour of `foo.n0()` is replaced by `foo.n0_ref().clone()`.
2013-09-25 11:26:07 -07:00
Tim Chevalier
667adad26f rustpkg: Search for packages correctly when using the rust_path_hack
Previously, any package would match any other package ID when searching
using the rust_path_hack, so long as the directory had one or more crate
files in it. Now, rustpkg checks that the parent directory matches the
package ID.

Closes #9273
2013-09-25 11:12:24 -07:00
Tim Chevalier
22654165c6 std: Add an is_parent_of method to Path 2013-09-25 11:08:30 -07:00
bors
b6f74e696f auto merge of #9428 : alexcrichton/rust/llvm-zlib-and-libffi, r=pnkfelix
This should help bring fewer dependencies in to the snapshots.

Closes #9397
2013-09-25 10:01:00 -07:00
bors
5375cf8718 auto merge of #9491 : thestinger/rust/noreturn, r=huonw
Closes #9317
2013-09-25 07:25:56 -07:00
Felix S. Klock II
7e809819c6 #7752: use fcnptr for glob errfunc. 2013-09-25 15:50:15 +02:00
bors
797a373cd1 auto merge of #9492 : pnkfelix/rust/fsk-syntax-visit-refactor-remainder, r=huonw
r? anyone

Part of #7081.

Removed many unnecessary context arguments, turning them into visitors.  Removed some @allocation.

If this lands, then I think the only thing left that is unaddressed are:
 * the various lint visitors, and
 * middle/privacy.rs, which has `impl<'self> Visitor<&'self method_map> for PrivacyVisitor`
2013-09-25 06:10:57 -07:00
bors
df97d23c71 auto merge of #9455 : jesseray/rust/master, r=pnkfelix
In "/src/libstd/char.rs", there are function and method definitions for `is_lowercase()`, `is_uppercase()`, `is_whitespace()`, etc. However, there was no function or method for control characters, so I added the `is_control()` function and method definitions along with documentation and tests. Running `./configure && make check` shows that all tests for `is_control()` pass.
2013-09-25 03:55:56 -07:00
bors
f6c9ff392b auto merge of #9481 : jbclements/rust/minor-cleanup, r=cmr
Small stuff... might as well get it into the tree. One new test case, some issue # cleanup, remove some unused imports.
2013-09-25 02:15:59 -07:00
Felix S. Klock II
37481641b1 Fold env into CheckItemRecursionVisitor. 2013-09-25 11:01:43 +02:00
Felix S. Klock II
1ce1aae282 Fold ErrorCheckVisitor into Liveness. Removed some @allocation. 2013-09-25 11:01:09 +02:00
Felix S. Klock II
ffc9209471 Fold KindAnalysisVisitor into the Context. Removed unused current_item state. 2013-09-25 11:00:36 +02:00
Huon Wilson
04ca6dcd84 std: Replace CloneableTuple with Tuple, which takes self by-val.
The old behaviour of `foo.n0()` is replaced by `foo.n0_ref().clone()`.
2013-09-25 19:00:08 +10:00
Felix S. Klock II
339027ec15 Move unchanging portions of Context over to the Visitor. 2013-09-25 10:59:56 +02:00
Felix S. Klock II
bc13365007 Move unchanging portions of context over to the Visitor. 2013-09-25 10:59:31 +02:00
Felix S. Klock II
9d0727736b Fold context into CalleeTranslationVisitor. 2013-09-25 10:59:06 +02:00
Felix S. Klock II
2ceebf1070 Fold context into TransItemVisitor. 2013-09-25 10:58:40 +02:00
Felix S. Klock II
411dce85ea Fold type_use.rs Context into its Visitor. 2013-09-25 10:55:50 +02:00
Felix S. Klock II
eac429cc9e Move the linearly-updated flag state into the Visitor. 2013-09-25 10:55:04 +02:00
Daniel Micay
e76bfae7eb add noreturn attribute to functions returning !
Closes #9317
2013-09-25 04:45:29 -04:00
bors
4531184614 auto merge of #9432 : alexcrichton/rust/correct-item-visibility, r=pcwalton
This fixes private statics and functions from being usable cross-crates, along
with some bad privacy error messages. This is a reopening of #8365 with all the
privacy checks in privacy.rs instead of resolve.rs (where they should be
anyway).

These maps of exported items will hopefully get used for generating
documentation by rustdoc

Closes #8592
2013-09-25 00:55:53 -07:00