about summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-3/+5
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-20Mass rename if_ok! to try!Alex Crichton-211/+211
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037
2014-02-20move extra::test to libtestLiigo Zhuang-9/+10
2014-02-19librustc: Remove unique vector patterns from the language.Patrick Walton-14/+13
Preparatory work for removing unique vectors from the language, which is itself preparatory work for dynamically sized types.
2014-02-19rustdoc: Handle links to reexported itemsAlex Crichton-13/+28
When building up our path cache, we don't plaster over a path which was previously inserted if we're inserting a non-public-item thing. Closes #11678
2014-02-19rustdoc: Clickable links on methods themselvesAlex Crichton-17/+12
Useful for getting the link to a method or function. Closes #10332
2014-02-19rustdoc: Fix json output and inputAlex Crichton-6/+5
Turns out a hash map with integer keys isn't serializable to json. Closes #10115
2014-02-19rustdoc: Highlight methods jumped toAlex Crichton-0/+2
This helps figure out where you actually jumped to, especially if the thing you jumped to is at the very bottom of the page. Closes #9905
2014-02-19rustdoc: Show macros in documentationAlex Crichton-4/+53
Any macro tagged with #[macro_export] will be showed in the documentation for that module. This also documents all the existing macros inside of std::macros. Closes #3163 cc #5605 Closes #9954
2014-02-19rustdoc: Fixup links to enum variantsAlex Crichton-1/+8
Pages aren't emitted for enum variants, so whenever we're linking to an enum variant instead link to the parent enum instead. Closes #12289
2014-02-18rustdoc: Only inject extern crates if not presentSteven Fackler-5/+7
2014-02-17auto merge of #12284 : brson/rust/install, r=alexcrichtonbors-0/+1
Work toward #9876. This adds `prepare.mk`, which is simply a more heavily-parameterized `install.mk`, then uses `prepare` to implement both `install` and the windows installer (`dist`). Smoke tested on both Linux and Windows.
2014-02-16Address review feedbackBrian Anderson-0/+1
2014-02-17Improve naming of tuple getters, and add mutable tuple getterBrendan Zabarauskas-3/+3
Renames the `n*` and `n*_ref` tuple getters to `val*` and `ref*` respectively, and adds `mut*` getters.
2014-02-15auto merge of #12298 : alexcrichton/rust/rustdoc-testing, r=sfacklerbors-15/+18
It's too easy to forget the `rust` tag to test something. Closes #11698
2014-02-14Update rustdoc testing to test all code blocksAlex Crichton-15/+18
It's too easy to forget the `rust` tag to have a code example tested, and it's far more common to have testable code than untestable code. This alters rustdoc to have only two directives, `ignore` and `should_fail`. The `ignore` directive ignores the code block entirely, and the `should_fail` directive has been fixed to only fail the test if the code execution fails, not also compilation.
2014-02-14extern mod => extern crateAlex Crichton-10/+10
This was previously implemented, and it just needed a snapshot to go through
2014-02-14auto merge of #12277 : alexcrichton/rust/fix-rustdoc-render, r=huonwbors-2/+4
The std macros used to be injected with a filename of "<std-macros>", but macros are now injected with a filename of "<{} macros>" where `{}` is filled in with the crate name. This updates rustdoc to understand this new system so it'll render source more frequently.
2014-02-14Update restrictions on rustdoc source renderingAlex Crichton-2/+4
The std macros used to be injected with a filename of "<std-macros>", but macros are now injected with a filename of "<{} macros>" where `{}` is filled in with the crate name. This updates rustdoc to understand this new system so it'll render source more frequently.
2014-02-14rustdoc: Strip impls of traits on #[doc(hidden)] typesKevin Ballard-19/+51
In the strip-hidden pass, record all types that were stripped, and make a second pass stripping all impls of traits for these types.
2014-02-14rustdoc: Strip impls of stripped private typesKevin Ballard-2/+10
In strip-private, also strip impls of traits for private types. This fixes the search index so searching for "drop", "eq", etc doesn't throw an exception.
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-14/+6
2014-02-13auto merge of #12061 : pongad/rust/delorderable, r=cmrbors-2/+2
#12057
2014-02-13Removed num::OrderableMichael Darakananda-2/+2
2014-02-13auto merge of #12017 : FlaPer87/rust/replace-mod-crate, r=alexcrichtonbors-79/+79
The first setp for #9880 is to add a new `crate` keyword. This PR does exactly that. I took a chance to refactor `parse_item_foreign_mod` and I broke it down into 2 separate methods to isolate each feature. The next step will be to push a new stage0 snapshot and then get rid of all `extern mod` around the code.
2014-02-13Add some missing Show implementations in libstdBrendan Zabarauskas-19/+29
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-79/+79
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-11librustdoc -- move closure to clarify scopeNiko Matsakis-1/+1
2014-02-10auto merge of #12155 : sanxiyn/rust/binary, r=pnkfelixbors-3/+0
The field is unused.
2014-02-11Move replace and swap to std::mem. Get rid of std::utilEdward Wang-3/+2
Also move Void to std::any, move drop to std::mem and reexport in prelude.
2014-02-11Remove binary fieldSeo Sanghyeon-3/+0
2014-02-10auto merge of #12084 : alexcrichton/rust/codegen-opts, r=cmrbors-1/+4
Move them all behind a new -C switch. This migrates some -Z flags and some top-level flags behind this -C codegen option. The -C flag takes values of the form "-C name=value" where the "=value" is optional for some flags. Flags affected: * --llvm-args => -C llvm-args * --passes => -C passes * --ar => -C ar * --linker => -C linker * --link-args => -C link-args * --target-cpu => -C target-cpu * --target-feature => -C target-fature * --android-cross-path => -C android-cross-path * --save-temps => -C save-temps * --no-rpath => -C no-rpath * -Z no-prepopulate => -C no-prepopulate-passes * -Z no-vectorize-loops => -C no-vectorize-loops * -Z no-vectorize-slp => -C no-vectorize-slp * -Z soft-float => -C soft-float * -Z gen-crate-map => -C gen-crate-map * -Z prefer-dynamic => -C prefer-dynamic * -Z no-integrated-as => -C no-integrated-as As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g or --debuginfo flag. * -Z debug-info => removed * -Z extra-debug-info => -g or --debuginfo Closes #9770 Closes #12000
2014-02-10Consolidate codegen-related compiler flagsAlex Crichton-1/+4
Move them all behind a new -C switch. This migrates some -Z flags and some top-level flags behind this -C codegen option. The -C flag takes values of the form "-C name=value" where the "=value" is optional for some flags. Flags affected: * --llvm-args => -C llvm-args * --passes => -C passes * --ar => -C ar * --linker => -C linker * --link-args => -C link-args * --target-cpu => -C target-cpu * --target-feature => -C target-fature * --android-cross-path => -C android-cross-path * --save-temps => -C save-temps * --no-rpath => -C no-rpath * -Z no-prepopulate => -C no-prepopulate-passes * -Z no-vectorize-loops => -C no-vectorize-loops * -Z no-vectorize-slp => -C no-vectorize-slp * -Z soft-float => -C soft-float * -Z gen-crate-map => -C gen-crate-map * -Z prefer-dynamic => -C prefer-dynamic * -Z no-integrated-as => -C no-integrated-as As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g or --debuginfo flag. * -Z debug-info => removed * -Z extra-debug-info => -g or --debuginfo Closes #9770 Closes #12000
2014-02-09std: Add init and uninit to mem. Replace direct intrinsic usageBrian Anderson-2/+3
2014-02-07Rewrite path::Display to reduce unnecessary allocationKevin Ballard-1/+1
2014-02-08std::fmt: convert the formatting traits to a proper self.Huon Wilson-70/+69
Poly and String have polymorphic `impl`s and so require different method names.
2014-02-07moved collections from libextra into libcollectionsHeroesGrave-1/+2
2014-02-07Removed @self and @Trait.Eduard Burtescu-13/+6
2014-02-06auto merge of #12020 : alexcrichton/rust/output-flags, r=brsonbors-3/+5
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib, --lib, and --bin flags from rustc, adding the following flags: * --emit=[asm,ir,bc,obj,link] * --crate-type=[dylib,rlib,staticlib,bin,lib] The -o option has also been redefined to be used for *all* flavors of outputs. This means that we no longer ignore it for libraries. The --out-dir remains the same as before. The new logic for files that rustc emits is as follows: 1. Output types are dictated by the --emit flag. The default value is --emit=link, and this option can be passed multiple times and have all options stacked on one another. 2. Crate types are dictated by the --crate-type flag and the #[crate_type] attribute. The flags can be passed many times and stack with the crate attribute. 3. If the -o flag is specified, and only one output type is specified, the output will be emitted at this location. If more than one output type is specified, then the filename of -o is ignored, and all output goes in the directory that -o specifies. The -o option always ignores the --out-dir option. 4. If the --out-dir flag is specified, all output goes in this directory. 5. If -o and --out-dir are both not present, all output goes in the directory of the crate file. 6. When multiple output types are specified, the filestem of all output is the same as the name of the CrateId (derived from a crate attribute or from the filestem of the crate file). Closes #7791 Closes #11056 Closes #11667
2014-02-06Redesign output flags for rustcAlex Crichton-3/+5
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib, --lib, and --bin flags from rustc, adding the following flags: * --emit=[asm,ir,bc,obj,link] * --crate-type=[dylib,rlib,staticlib,bin,lib] The -o option has also been redefined to be used for *all* flavors of outputs. This means that we no longer ignore it for libraries. The --out-dir remains the same as before. The new logic for files that rustc emits is as follows: 1. Output types are dictated by the --emit flag. The default value is --emit=link, and this option can be passed multiple times and have all options stacked on one another. 2. Crate types are dictated by the --crate-type flag and the #[crate_type] attribute. The flags can be passed many times and stack with the crate attribute. 3. If the -o flag is specified, and only one output type is specified, the output will be emitted at this location. If more than one output type is specified, then the filename of -o is ignored, and all output goes in the directory that -o specifies. The -o option always ignores the --out-dir option. 4. If the --out-dir flag is specified, all output goes in this directory. 5. If -o and --out-dir are both not present, all output goes in the current directory of the process. 6. When multiple output types are specified, the filestem of all output is the same as the name of the CrateId (derived from a crate attribute or from the filestem of the crate file). Closes #7791 Closes #11056 Closes #11667
2014-02-06getopts: replaced base functions with those from groupArcterus-5/+4
2014-02-06Move getopts out of extraArcterus-4/+4
2014-02-06auto merge of #12048 : sanxiyn/rust/crate-config, r=alexcrichtonbors-4/+4
2014-02-05auto merge of #11989 : adridu59/rust/tidy, r=alexcrichtonbors-8/+6
Closes #11985 Closes #4533 @huonw, @alexcrichton
2014-02-05rustdoc: update depsAdrien Tétar-8/+6
2014-02-05pull extra::{serialize, ebml} into a separate libserialize crateJeff Olson-1/+2
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
2014-02-06Avoid cloning ast::CrateConfigSeo Sanghyeon-4/+4
2014-02-05move concurrent stuff from libextra to libsyncJeremyLetang-1/+2
2014-02-03Fixing remaining warnings and errors throughoutAlex Crichton-3/+2
2014-02-03rustdoc: Remove io_error usageAlex Crichton-416/+495