Commit Graph

313 Commits

Author SHA1 Message Date
Guillaume Gomez f34ae3f7ed Add nightly check on rustdoc --extend-css option 2016-04-05 01:39:36 +02:00
Guillaume Gomez ab835a12da Add --extend-css option to rustdoc 2016-04-05 01:39:35 +02:00
Oliver Schneider 3eac64747f move `const_eval` and `check_match` out of `librustc` 2016-03-30 13:43:36 +02:00
bors 98f0a9128f Auto merge of #32454 - eddyb:rollup, r=eddyb
Rollup of 11 pull requests

- Successful merges: #32404, #32420, #32423, #32425, #32429, #32430, #32431, #32434, #32437, #32441, #32443
- Failed merges:
2016-03-23 12:33:04 -07:00
Jorge Aparicio aa7fe93d4a sprinkle feature gates here and there 2016-03-22 22:02:47 -05:00
Jorge Aparicio 0f02309e4b try! -> ?
Automated conversion using the untry tool [1] and the following command:

```
$ find -name '*.rs' -type f | xargs untry
```

at the root of the Rust repo.

[1]: https://github.com/japaric/untry
2016-03-22 22:01:37 -05:00
mitaa 4c71347e94 Consider `doc(no_inline)` in crate-local inlining 2016-03-22 21:11:00 +01:00
Alex Crichton b53764c73b std: Clean out deprecated APIs
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.
2016-03-12 12:31:13 -08:00
bors 4b87655e69 Auto merge of #32101 - SimonSapin:patch-11, r=alexcrichton
Add info in `rustdoc --passes list`

CC @mitaa, https://github.com/rust-lang/rust/pull/32055/files#r55205006
2016-03-10 07:05:05 -08:00
bors cbbd3d9b92 Auto merge of #31631 - jonas-schievink:agoraphobia, r=nrc
[breaking-batch] Move more uses of `panictry!` out of libsyntax
2016-03-09 05:25:48 -08:00
Simon Sapin d9613237fd Add info in `rustdoc --passes list`
CC @mitaa, https://github.com/rust-lang/rust/pull/32055/files#r55205006
2016-03-07 16:40:23 +01:00
bors 72d588a620 Auto merge of #32055 - mitaa:rdoc-strip-priv-imports, r=alexcrichton
fixes #27104

r? @alexcrichton
2016-03-06 17:08:36 +00:00
mitaa 688e52201e Split out rustdoc pass to strip private imports 2016-03-06 08:18:58 +01:00
mitaa 2a28b69948 Refactor rustdocs attribute handling 2016-03-04 19:39:52 +01:00
mitaa 8f6e09a956 Simplify `if let`/`match` expressions 2016-03-04 19:07:35 +01:00
dileepb fbfe70e6ab #31820 - Utilize `if..let` instead of single `match` branch 2016-02-23 21:21:51 +05:30
Jonas Schievink 3a872782d3 Move more uses of `panictry!` out of libsyntax
[breaking-change] for syntax extensions
2016-02-16 13:32:40 +01:00
Guillaume Gomez eb5b9037ad Add compile-fail test in rustdoc 2016-02-07 13:03:32 +01:00
Alex Crichton 2273b52023 mk: Move from `-D warnings` to `#![deny(warnings)]`
This commit removes the `-D warnings` flag being passed through the makefiles to
all crates to instead be a crate attribute. We want these attributes always
applied for all our standard builds, and this is more amenable to Cargo-based
builds as well.

Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)`
attribute currently to match the same semantics we have today
2016-01-24 20:35:55 -08:00
Alex Crichton 9a4f43b9b6 std: Stabilize APIs for the 1.7 release
This commit stabilizes and deprecates the FCP (final comment period) APIs for
the upcoming 1.7 beta release. The specific APIs which changed were:

Stabilized

* `Path::strip_prefix` (renamed from `relative_from`)
* `path::StripPrefixError` (new error type returned from `strip_prefix`)
* `Ipv4Addr::is_loopback`
* `Ipv4Addr::is_private`
* `Ipv4Addr::is_link_local`
* `Ipv4Addr::is_multicast`
* `Ipv4Addr::is_broadcast`
* `Ipv4Addr::is_documentation`
* `Ipv6Addr::is_unspecified`
* `Ipv6Addr::is_loopback`
* `Ipv6Addr::is_unique_local`
* `Ipv6Addr::is_multicast`
* `Vec::as_slice`
* `Vec::as_mut_slice`
* `String::as_str`
* `String::as_mut_str`
* `<[T]>::clone_from_slice` - the `usize` return value is removed
* `<[T]>::sort_by_key`
* `i32::checked_rem` (and other signed types)
* `i32::checked_neg` (and other signed types)
* `i32::checked_shl` (and other signed types)
* `i32::checked_shr` (and other signed types)
* `i32::saturating_mul` (and other signed types)
* `i32::overflowing_add` (and other signed types)
* `i32::overflowing_sub` (and other signed types)
* `i32::overflowing_mul` (and other signed types)
* `i32::overflowing_div` (and other signed types)
* `i32::overflowing_rem` (and other signed types)
* `i32::overflowing_neg` (and other signed types)
* `i32::overflowing_shl` (and other signed types)
* `i32::overflowing_shr` (and other signed types)
* `u32::checked_rem` (and other unsigned types)
* `u32::checked_neg` (and other unsigned types)
* `u32::checked_shl` (and other unsigned types)
* `u32::saturating_mul` (and other unsigned types)
* `u32::overflowing_add` (and other unsigned types)
* `u32::overflowing_sub` (and other unsigned types)
* `u32::overflowing_mul` (and other unsigned types)
* `u32::overflowing_div` (and other unsigned types)
* `u32::overflowing_rem` (and other unsigned types)
* `u32::overflowing_neg` (and other unsigned types)
* `u32::overflowing_shl` (and other unsigned types)
* `u32::overflowing_shr` (and other unsigned types)
* `ffi::IntoStringError`
* `CString::into_string`
* `CString::into_bytes`
* `CString::into_bytes_with_nul`
* `From<CString> for Vec<u8>`
* `From<CString> for Vec<u8>`
* `IntoStringError::into_cstring`
* `IntoStringError::utf8_error`
* `Error for IntoStringError`

Deprecated

* `Path::relative_from` - renamed to `strip_prefix`
* `Path::prefix` - use `components().next()` instead
* `os::unix::fs` constants - moved to the `libc` crate
* `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize
* `IntoCow` - conflicts with `Into` and may come back later
* `i32::{BITS, BYTES}` (and other integers) - not pulling their weight
* `DebugTuple::formatter` - will be removed
* `sync::Semaphore` - not used enough and confused with system semaphores

Closes #23284
cc #27709 (still lots more methods though)
Closes #27712
Closes #27722
Closes #27728
Closes #27735
Closes #27729
Closes #27755
Closes #27782
Closes #27798
2016-01-16 11:03:10 -08:00
Nick Cameron 11dcb48c6a Add a test
And fix bustage in make check
2016-01-15 10:24:12 +13:00
Alex Crichton cd1848a1a6 Register new snapshots
Lots of cruft to remove!
2015-12-21 09:26:21 -08:00
Nick Cameron 6309b0f5bb move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*
Also split out emitters into their own module.
2015-12-17 09:35:50 +13:00
Seo Sanghyeon eb25721063 Use --cfg when running doctests
Previously passed --cfg was used only when collecting doctests.
2015-12-15 18:03:55 +09:00
Alex Crichton 464cdff102 std: Stabilize APIs for the 1.6 release
This commit is the standard API stabilization commit for the 1.6 release cycle.
The list of issues and APIs below have all been through their cycle-long FCP and
the libs team decisions are listed below

Stabilized APIs

* `Read::read_exact`
* `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`)
* libcore -- this was a bit of a nuanced stabilization, the crate itself is now
  marked as `#[stable]` and the methods appearing via traits for primitives like
  `char` and `str` are now also marked as stable. Note that the extension traits
  themeselves are marked as unstable as they're imported via the prelude. The
  `try!` macro was also moved from the standard library into libcore to have the
  same interface. Otherwise the functions all have copied stability from the
  standard library now.
* The `#![no_std]` attribute
* `fs::DirBuilder`
* `fs::DirBuilder::new`
* `fs::DirBuilder::recursive`
* `fs::DirBuilder::create`
* `os::unix::fs::DirBuilderExt`
* `os::unix::fs::DirBuilderExt::mode`
* `vec::Drain`
* `vec::Vec::drain`
* `string::Drain`
* `string::String::drain`
* `vec_deque::Drain`
* `vec_deque::VecDeque::drain`
* `collections::hash_map::Drain`
* `collections::hash_map::HashMap::drain`
* `collections::hash_set::Drain`
* `collections::hash_set::HashSet::drain`
* `collections::binary_heap::Drain`
* `collections::binary_heap::BinaryHeap::drain`
* `Vec::extend_from_slice` (renamed from `push_all`)
* `Mutex::get_mut`
* `Mutex::into_inner`
* `RwLock::get_mut`
* `RwLock::into_inner`
* `Iterator::min_by_key` (renamed from `min_by`)
* `Iterator::max_by_key` (renamed from `max_by`)

Deprecated APIs

* `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`)
* `OsString::from_bytes`
* `OsStr::to_cstring`
* `OsStr::to_bytes`
* `fs::walk_dir` and `fs::WalkDir`
* `path::Components::peek`
* `slice::bytes::MutableByteVector`
* `slice::bytes::copy_memory`
* `Vec::push_all` (renamed to `extend_from_slice`)
* `Duration::span`
* `IpAddr`
* `SocketAddr::ip`
* `Read::tee`
* `io::Tee`
* `Write::broadcast`
* `io::Broadcast`
* `Iterator::min_by` (renamed to `min_by_key`)
* `Iterator::max_by` (renamed to `max_by_key`)
* `net::lookup_addr`

New APIs (still unstable)

* `<[T]>::sort_by_key` (added to mirror `min_by_key`)

Closes #27585
Closes #27704
Closes #27707
Closes #27710
Closes #27711
Closes #27727
Closes #27740
Closes #27744
Closes #27799
Closes #27801
cc #27801 (doesn't close as `Chars` is still unstable)
Closes #28968
2015-12-05 15:09:44 -08:00
Ariel Ben-Yehuda 52dd2b4c35 fix tests & rustdoc 2015-11-26 18:22:40 +02:00
Vadim Petrochenkov be8ace8cac Remove all uses of `#[staged_api]` 2015-11-25 21:55:26 +03:00
Alex Crichton ff49733274 std: Stabilize library APIs for 1.5
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-25 09:36:32 -07:00
Lee Jeffery 140e2d3a09 Miscellaneous cleanup for old issues. 2015-09-20 11:37:08 +01:00
Nick Cameron facdf2ebb1 Add an intital HIR and lowering step 2015-09-03 10:02:36 +12:00
Barosl Lee 71f39c1a2f Respect `--color` when printing early errors
Currently, `early_error` and `early_warn` in `librustc::session` always
use `ColorConfig::Auto`. Modify them to follow the color configuration
set by the `--color` option.

As colored output is also printed during the early stage, parsing the
`--color` option should be done as early as possible. However, there are
still some cases when the output needs to be colored before knowing the
exact color settings. In these cases, it will be defaulted to
`ColorConfig::Auto`, which is the same as before.

Fixes #27879.
2015-08-25 18:08:57 +09:00
Alex Crichton 2972b77134 Add issue for the rustc_private feature everywhere 2015-08-15 18:09:17 -07:00
Alex Crichton 8d90d3f368 Remove all unstable deprecated functionality
This commit removes all unstable and deprecated functions in the standard
library. A release was recently cut (1.3) which makes this a good time for some
spring cleaning of the deprecated functions.
2015-08-12 14:55:17 -07:00
Eli Friedman bbbfed2f93 Use https URLs to refer to rust-lang.org where appropriate.
Also fixes a few outdated links.
2015-08-09 14:28:46 -07:00
Alex Crichton b3aa1a6d4a std: Deprecate a number of unstable features
Many of these have long since reached their stage of being obsolete, so this
commit starts the removal process for all of them. The unstable features that
were deprecated are:

* cmp_partial
* fs_time
* hash_default
* int_slice
* iter_min_max
* iter_reset_fuse
* iter_to_vec
* map_in_place
* move_from
* owned_ascii_ext
* page_size
* read_and_zero
* scan_state
* slice_chars
* slice_position_elem
* subslice_offset
2015-07-27 16:38:25 -07:00
Steve Klabnik 82d0442cea rustdoc: properly capture rustc output
When rustc gives an error, there's a ton of extra output from the panic.
Now, we use monitor() to supress the excess output.

Fixes #27014
2015-07-16 21:35:01 -04:00
Simonas Kazlauskas 7a90865db5 Implement RFC 1058 2015-07-12 00:47:56 +03:00
Alex Crichton b4a2823cd6 More test fixes and fallout of stability changes 2015-06-17 09:07:17 -07:00
Alex Crichton ce1a965cf5 Fallout in tests and docs from feature renamings 2015-06-17 09:07:16 -07:00
Alex Crichton 0e21beb761 libs: Move favicon URLs to HTTPS
Helps prevent mixed content warnings if accessing docs over HTTPS.

Closes #25459
2015-05-15 16:04:01 -07:00
kwantam c361e13d71 implement rfc 1054: split_whitespace() fn, deprecate words()
For now, words() is left in (but deprecated), and Words is a type alias for
struct SplitWhitespace.

Also cleaned up references to s.words() throughout codebase.

Closes #15628
2015-04-21 15:31:51 -04:00
bors 7a5754b330 Auto merge of #24428 - kwantam:deprecate_unicode_fns, r=alexcrichton
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-18 07:09:22 +00:00
Manish Goregaokar c98115cefb Remove info for path (fixup #24452) 2015-04-17 19:01:33 +05:30
kwantam 29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
Alex Crichton 0a46933c4d rustdoc: Overhaul stability displays
This commit is an overhaul to how rustdoc deals with stability of the standard
library. The handling has all been revisited with respect to Rust's current
approach to stability in terms of implementation as well as the state of the
standard library today. The high level changes made were:

* Stable items now have no marker by default
* Color-based small stability markers have been removed
* Module listings now fade out unstable/deprecated items slightly
* Trait methods have a separate background color based on stability and also
  list the reason that they are unstable.
* `impl` blocks with stability no longer render at all. This may be re-added
  once the compiler recognizes stability on `impl` blocks.
* `impl` blocks no longer have stability of the methods implemente indicated
* The stability summary has been removed

Closes #15468
Closes #21674
Closes #24201
2015-04-16 09:44:33 -07:00
Tamir Duberstein 29ac04402d Positive case of `len()` -> `is_empty()`
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14 20:26:03 -07:00
Aaron Turon a9fd41e1f9 Fallout: move from scoped to spawn 2015-04-14 08:15:45 -07:00
Remi Rampin e13f0e9a25 Changes rustdoc --passes help message
The current help string ("space separated list") suggests that
`--passes "pass1 pass2"` is expected; the correct usage is
`--passes pass1 --passes pass2`.
2015-04-05 22:39:21 -04:00
Alex Crichton e98dce3e00 std: Changing the meaning of the count to splitn
This commit is an implementation of [RFC 979][rfc] which changes the meaning of
the count parameter to the `splitn` function on strings and slices. The
parameter now means the number of items that are returned from the iterator, not
the number of splits that are made.

[rfc]: https://github.com/rust-lang/rfcs/pull/979

Closes #23911
[breaking-change]
2015-04-01 13:29:42 -07:00
Alex Crichton 30532884f8 Test fixes and rebase conflicts, round 2 2015-03-31 15:56:33 -07:00