summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2015-10-26Auto merge of #29303 - petrochenkov:unistrimp, r=eddybbors-6/+6
And use `VariantData` instead of `P<VariantData>` in `Item_` and `Variant_` Improvements suggested by @eddyb in https://github.com/rust-lang/rust/pull/28816#discussion_r42483587 and https://github.com/rust-lang/rust/pull/28816#discussion_r42483648 plugin-[breaking-change] r? @eddyb
2015-10-25Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brsonbors-1/+4
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-1/+4
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-6/+6
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-24Auto merge of #29215 - fhahn:issue-28157-bad-semicolon, r=alexcrichtonbors-2/+2
PR for #28157. At the moment, `rustc` emits a warning when a bare semicolon is encountered (could also be a fail, but I think this is a backwards incompatible change). Also I am not sure where the best place for a test for that warning would be. Seems run-pass tests do not check warnings.
2015-10-24Remove bare semicolonsFlorian Hahn-2/+2
2015-10-22Auto merge of #28963 - mdinger:arrow, r=steveklabnikbors-7/+10
This is to make the link more prominent so hopefully people will actually see it. The new icon is partially because I wasn't sure how easy it would be to apply the previous transformations only to the last character of the string. As it is, I wasn't sure at first but I think the look is growing on me. A minor nitpick is that the space after `Runnable` is underlined and I tried to fix that but it wasn't working for me right now. I tried switching a link with subelements to a div with subelements but I missed something because it wasn't working correctly. --- Unselected: ![arrow](https://cloud.githubusercontent.com/assets/4156987/10414475/b1730ab2-6fa4-11e5-9062-15bc0c7c8b96.png) --- Selected: ![arrow_selected](https://cloud.githubusercontent.com/assets/4156987/10414483/4a78088e-6fa5-11e5-864e-c83f354769b1.png) Fixes https://github.com/rust-lang/rust/issues/28958
2015-10-21save-analysis: don't recompute crate nameNick Cameron-1/+1
2015-10-16Auto merge of #28683 - GuillaumeGomez:rustdoc_error, r=alexcrichtonbors-64/+107
This PR solves the following issues (or at least help users to understand the problem): ```Rust #![crate_name = "b"] #![crate_type = "rlib"] pub fn his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_() {} ``` ```Rust #![crate_name = "b"] #![crate_type = "rlib"] pub struct his_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_moreis_function_has_a_very_long_name_and_should_make_cargo_doc_explodes_because_it_will_want_to_make_a_filename_with_it_in_excess_of_the_max_filename_length_for_most_filesystem_this_is_not_yet_long_enough_i_need_more_; ``` For the maximum filename length chosen, @gkoz gave me [this link](http://unix.stackexchange.com/a/32834).
2015-10-17Improve error handling by providing Error struct with Path informationGuillaume Gomez-64/+107
2015-10-16Auto merge of #29014 - petrochenkov:stability, r=brsonbors-27/+32
Stricter checking of stability attributes + enforcement of their invariants at compile time (+ removed dead file librustc_front/attr.rs) I intended to enforce use of `reason` for unstable items as well (it normally presents for new items), but it turned out too intrusive, many older unstable items don't have `reason`s. r? @aturon I'm studying how stability works and do some refactoring along the way, so it's probably not the last PR.
2015-10-15rustdoc: Report deprecation reason firstVadim Petrochenkov-3/+8
2015-10-14Make the rustdoc example links more noticablemdinger-7/+10
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-2/+2
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-7/+7
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-12/+12
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-4/+2
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-18/+3
2015-10-13Unify structures and enum variants in HIRVadim Petrochenkov-3/+13
2015-10-13Refactor attr::StabilityVadim Petrochenkov-27/+27
Stricter checking + enforcement of invariants at compile time
2015-10-09Auto merge of #28857 - nrc:lowering, r=nikomatsakisbors-8/+10
r? @nikomatsakis
2015-10-09review commentsNick Cameron-5/+0
2015-10-09Misc fixupsNick Cameron-2/+2
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-4/+2
2015-10-09Fixes to rustdoc, etc.Nick Cameron-7/+16
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-3/+3
2015-10-04Auto merge of #28573 - ruud-v-a:rustdoc-license, r=brsonbors-0/+309
The output of rustdoc includes resources licensed under the SIL Open Font License, the MIT license, and the Apache License 2.0. All of these licenses permit redistribution provided that the license text is also redistributed. Previously this was not the case, making rustdoc output unsuitable for distribution by default. This resolves that problem by including the license texts in rustdoc output. See also: https://users.rust-lang.org/t/licensing-rustdoc-output/2880
2015-10-02Rollup merge of #28736 - nagisa:rustdocjsfix, r=alexcrichtonSteve Klabnik-12/+18
2015-10-02Auto merge of #28768 - alexcrichton:dep-info++, r=brsonbors-2/+4
This PR closes out #28716 and #28735 by making two changes to the compiler: 1. The `--emit` flag to the compiler now supports the ability to specify the output file name of a partuclar emit type. For example `--emit dep-info=bar.d,asm=foo.s,link` is now accepted. 2. The dep-info emission now emits a dummy target for all input file names to protect against deleted files.
2015-10-02Fix librustdoc search eventsSimonas Kazlauskas-11/+17
Previously only keyup event was looked at, which meant that pasting, cutting and otherwise changing the input without typing would not catch any updates to the search query.
2015-10-02Fix misnamed variable in rustdocSimonas Kazlauskas-1/+1
2015-10-02Auto merge of #28795 - marti1125:28696, r=alexcrichtonbors-0/+9
-Add a validation when input search is empty on top of 'startSearch()'
2015-10-01fixes #28696 Return to the default content when .search-input is empty -Add ↵Willy Aguirre-0/+9
a validation when input search is empty on top of 'startSearch()'
2015-10-01Convert DefId to use DefIndex, which is an index into a list ofNiko Matsakis-16/+16
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
2015-10-01build up a set of node-ids that we can construct def-ids fromNiko Matsakis-3/+6
2015-10-01Make calling def_id on a DefSelfTy an error; the previous defids thatNiko Matsakis-1/+7
were returned, either the trait or the *self type itself*, were not particularly representative of what the Def is (a type parameter). Rewrite paths to handle this case specially, just as they handle the primitive case specifically. This entire `def_id` codepath is kind of a mess.
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-50/+59
they are being used as an opaque "position identifier"
2015-10-01move job of creating local-def-ids to ast-map (with a few stragglers)Niko Matsakis-38/+39
2015-10-01move LOCAL_CRATE to cstoreNiko Matsakis-2/+5
2015-10-01kill the fake provided method stubsAriel Ben-Yehuda-7/+5
this simplifies the code while reducing the size of libcore.rlib by 3.3 MiB (~1M of which is bloat a separate patch of mine removes too), while reducing rustc memory usage on small crates by 18MiB. This also simplifies the code considerably.
2015-09-30rustc: Support output filenames for each emit typeAlex Crichton-2/+4
Currently the compiler supports the ability to emit multiple output types as part of one compilation (e.g. asm, LLVM IR, bytecode, link, dep-info, etc). It does not, however, support the ability to customize the output filename for each of these output types. The `-o` flag is ignored if multiple emit types are specified (and the compiler emits a warning about this). Normally this doesn't matter too much, but in the case of `dep-info` it can lead to a number of problems (e.g. see #28716). By allowing customization of the output filename for each emit type we're able to solve the problems in that issue. This commit adds support for the `--emit` option to the compiler to look like: rustc foo.rs --emit dep-info=.deps/foo.d,link This indicates that the `dep-info` output type will be placed at `.deps/foo.d` and the `link` output type will otherwise be determined via the `--out-dir` and `-o` flags. Closes #28716
2015-09-27rustdoc: Remove crate name from primitives, make them turn up first in searchManish Goregaokar-0/+7
2015-09-26Auto merge of #28649 - nhowell:improve-rustbook, r=steveklabnikbors-0/+2
Please see the commits for details. Live demo: http://www.nickhowell.com/rust/book/ Commit 0bebbab should fix #22682 r? @steveklabnik
2015-09-24Add 'use strict' to playpen.jsNick Howell-0/+2
2015-09-23Remove random Idents outside of libsyntaxVadim Petrochenkov-8/+2
2015-09-22Use Names in the remaining HIR structures with exception of...Vadim Petrochenkov-5/+5
PathSegment, PatIdent, ExprWhile, ExprLoop, ExprBreak and ExprAgain - they need Idents for resolve
2015-09-22Use Names in path fragments and MacroDefVadim Petrochenkov-10/+10
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-19/+19
2015-09-21Clarify rustdoc output licensing with a copyright fileRuud van Asseldonk-0/+66
2015-09-20Auto merge of #28499 - semmaz:doc-anchor-fix, r=steveklabnikbors-49/+62
This changes how rustic generate `id` and `href` attributes for section header anchor. Now they are more github-like. Also fixes breakage in docs caused by this and broken links in "Error Handling" section of book. r? @steveklabnik cc @alexcrichton