Commit Graph

398 Commits

Author SHA1 Message Date
Alex Crichton
9b0b5b45db Remove not(stage0) from deny(warnings)
Historically this was done to accommodate bugs in lints, but there hasn't been a
bug in a lint since this feature was added which the warnings affected. Let's
completely purge warnings from all our stages by denying warnings in all stages.
This will also assist in tracking down `stage0` code to be removed whenever
we're updating the bootstrap compiler.
2016-12-29 21:07:20 -08:00
Aidan Hobson Sayers
babb7daf35 Teach rustdoc --test about --sysroot, pass it when testing rust
This permits rustdoc tests to work in stage0
2016-12-24 17:15:07 +00:00
Tshepang Lekhonkhobe
8cd3081b5a rustdoc: a formatting nit 2016-12-15 20:43:57 +02:00
bors
b1a2ab86db Auto merge of #38179 - michael-zapata:rf/harmonise_rustdoc_errors, r=GuillaumeGomez
feat(rustdoc): harmonise error messages

Based on unix tools wording, it follows a standard format: `program_name: context: error message`, potentially prompting the user to use the `--help` option.

This is clearly meant to trigger some discussion on #38084, as messages still use `stdout` and `stderr` somewhat arbitrarily, and there are a few `error!()` calls as well.
2016-12-13 06:29:25 +00:00
Michael Zapata
430d39da9d
feat(rustdoc): harmonise error messages
Based on unix tools wording, it follows a standard format:
`program_name: context: error message` on stderr, prompting the user
to use the `--help` option in case of misuse.
2016-12-12 15:26:28 +01:00
bors
b4b1e5ece2 Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichton
Rename 'librustc_unicode' crate to 'libstd_unicode'.

Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-12 13:19:33 +00:00
bors
827eba4e70 Auto merge of #37911 - liigo:rustdoc-playground, r=alexcrichton
rustdoc: get back missing crate-name when --playground-url is used

follow up PR #37763
r? @alexcrichton (since you r+ed to #37763 )

----

Edit: When `#![doc(html_playground_url="")]` is used, the current crate name is saved to `PLAYGROUND`, so rustdoc may generate `extern crate NAME;` into code snips automatically. But when `--playground-url` was introduced in PR #37763, I forgot saving crate name to `PLAYGROUND`. This PR fix that.

----

Update:
- add test
- unstable `--playground-url`
2016-12-01 07:07:32 +00:00
Alex Crichton
2186660b51 Update the bootstrap compiler
Now that we've got a beta build, let's use it!
2016-11-30 10:38:08 -08:00
Corey Farwell
274777a158 Rename 'librustc_unicode' crate to 'libstd_unicode'.
Fixes #26554.
2016-11-30 01:24:01 -05:00
Liigo Zhuang
d5785a368e rustdoc: fix up --playground-url 2016-11-30 10:33:23 +08:00
Liigo Zhuang
943bf96300 unstable --playground-url, add test code 2016-11-30 10:33:22 +08:00
Eduard-Mihai Burtescu
12c5f8cb75 rustdoc: use libsyntax ast::Attribute instead of "cleaning" them. 2016-11-24 01:40:52 +02:00
Liigo
dc3859d73e rustdoc: add cli argument --playground-url 2016-11-14 14:02:42 +08:00
Vadim Petrochenkov
74bb594563 Stabilize .. in tuple (struct) patterns 2016-11-03 01:38:15 +03:00
iirelu
e593c3b893 Changed most vec! invocations to use square braces
Most of the Rust community agrees that the vec! macro is clearer when
called using square brackets [] instead of regular brackets (). Most of
these ocurrences are from before macros allowed using different types of
brackets.

There is one left unchanged in a pretty-print test, as the pretty
printer still wants it to have regular brackets.
2016-10-31 22:51:40 +00:00
Nick Cameron
9bc6d26092 Stabilise ?
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-10-12 08:40:22 +13:00
Corey Farwell
a400cccd54 Cleanup return statements. 2016-10-02 21:58:20 -04:00
Jonathan Turner
ee2e115995 Rollup merge of #36729 - frewsxcv:rustdoc, r=alexcrichton
librustdoc refactoring and cleanup.

See each commit for more information. Biggest changes here is the addition of a `passes` module and each pass now lives in its own submodule.
2016-09-26 17:29:49 -07:00
Corey Farwell
bd62c4c83d Move pass contants/types into the new pass module. 2016-09-25 17:59:40 -04:00
Corey Farwell
a147a9d01b Fix incorrect alignment for if statement. 2016-09-25 13:57:12 -04:00
Corey Farwell
ae3ed31155 Use underscores to breakup long number. 2016-09-25 13:56:54 -04:00
Jorge Aparicio
e0c60b4d02 rustdoc: implement --sysroot
with the same semantics as rustc. This let us build documentation for a
crate that depends on a custom sysroot.
2016-09-19 15:56:38 -05:00
Vadim Petrochenkov
e05e74ac83 Replace _, _ with .. 2016-09-04 12:30:33 +03:00
Michael Woerister
6ef8198406 Move flock.rs from librustdoc to librustc_data_structures. 2016-08-29 14:27:40 -04:00
Michael Woerister
32414310b7 Add the notion of a dependency tracking status to commandline arguments.
Commandline arguments influence whether incremental compilation
can use its compilation cache and thus their changes relative to
previous compilation sessions need to be taking into account. This
commit makes sure that one has to specify for every commandline
argument whether it influences incremental compilation or not.
2016-08-11 09:56:00 -04:00
Oliver Schneider
9d33ce58b1
evaluate the array length of fixed size array types in rustdoc 2016-07-13 10:35:58 +02:00
Jonathan Turner
6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
mitaa
cfad7ad947 Perform doc-reachability check for inlined impls
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
2016-04-18 01:55:54 +02:00
mitaa
ea83349c9f Retire rustdocs ANALYSISKEY
The thread-local isn't needed and consists of mostly empty fields which
were just used to move the data into `html::render::CACHE_KEY`.
2016-04-13 19:39:17 +02:00
bors
bed32d83fc Auto merge of #32804 - alexcrichton:stabilize-1.9, r=brson
std: Stabilize APIs for the 1.9 release

This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:

Stable

* `std::panic`
* `std::panic::catch_unwind` (renamed from `recover`)
* `std::panic::resume_unwind` (renamed from `propagate`)
* `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`)
* `std::panic::UnwindSafe` (renamed from `RecoverSafe`)
* `str::is_char_boundary`
* `<*const T>::as_ref`
* `<*mut T>::as_ref`
* `<*mut T>::as_mut`
* `AsciiExt::make_ascii_uppercase`
* `AsciiExt::make_ascii_lowercase`
* `char::decode_utf16`
* `char::DecodeUtf16`
* `char::DecodeUtf16Error`
* `char::DecodeUtf16Error::unpaired_surrogate`
* `BTreeSet::take`
* `BTreeSet::replace`
* `BTreeSet::get`
* `HashSet::take`
* `HashSet::replace`
* `HashSet::get`
* `OsString::with_capacity`
* `OsString::clear`
* `OsString::capacity`
* `OsString::reserve`
* `OsString::reserve_exact`
* `OsStr::is_empty`
* `OsStr::len`
* `std::os::unix::thread`
* `RawPthread`
* `JoinHandleExt`
* `JoinHandleExt::as_pthread_t`
* `JoinHandleExt::into_pthread_t`
* `HashSet::hasher`
* `HashMap::hasher`
* `CommandExt::exec`
* `File::try_clone`
* `SocketAddr::set_ip`
* `SocketAddr::set_port`
* `SocketAddrV4::set_ip`
* `SocketAddrV4::set_port`
* `SocketAddrV6::set_ip`
* `SocketAddrV6::set_port`
* `SocketAddrV6::set_flowinfo`
* `SocketAddrV6::set_scope_id`
* `<[T]>::copy_from_slice`
* `ptr::read_volatile`
* `ptr::write_volatile`
* The `#[deprecated]` attribute
* `OpenOptions::create_new`

Deprecated

* `std::raw::Slice` - use raw parts of `slice` module instead
* `std::raw::Repr` - use raw parts of `slice` module instead
* `str::char_range_at` - use slicing plus `chars()` plus `len_utf8`
* `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8`
* `str::char_at` - use slicing plus `chars()`
* `str::char_at_reverse` - use slicing plus `chars().rev()`
* `str::slice_shift_char` - use `chars()` plus `Chars::as_str`
* `CommandExt::session_leader` - use `before_exec` instead.

Closes #27719
cc #27751 (deprecating the `Slice` bits)
Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with `before_exec`)
Closes #31405
Closes #31572
Closes #31755
Closes #31756
2016-04-12 04:17:36 -07:00
Alex Crichton
552eda70d3 std: Stabilize APIs for the 1.9 release
This commit applies all stabilizations, renamings, and deprecations that the
library team has decided on for the upcoming 1.9 release. All tracking issues
have gone through a cycle-long "final comment period" and the specific APIs
stabilized/deprecated are:

Stable

* `std::panic`
* `std::panic::catch_unwind` (renamed from `recover`)
* `std::panic::resume_unwind` (renamed from `propagate`)
* `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`)
* `std::panic::UnwindSafe` (renamed from `RecoverSafe`)
* `str::is_char_boundary`
* `<*const T>::as_ref`
* `<*mut T>::as_ref`
* `<*mut T>::as_mut`
* `AsciiExt::make_ascii_uppercase`
* `AsciiExt::make_ascii_lowercase`
* `char::decode_utf16`
* `char::DecodeUtf16`
* `char::DecodeUtf16Error`
* `char::DecodeUtf16Error::unpaired_surrogate`
* `BTreeSet::take`
* `BTreeSet::replace`
* `BTreeSet::get`
* `HashSet::take`
* `HashSet::replace`
* `HashSet::get`
* `OsString::with_capacity`
* `OsString::clear`
* `OsString::capacity`
* `OsString::reserve`
* `OsString::reserve_exact`
* `OsStr::is_empty`
* `OsStr::len`
* `std::os::unix::thread`
* `RawPthread`
* `JoinHandleExt`
* `JoinHandleExt::as_pthread_t`
* `JoinHandleExt::into_pthread_t`
* `HashSet::hasher`
* `HashMap::hasher`
* `CommandExt::exec`
* `File::try_clone`
* `SocketAddr::set_ip`
* `SocketAddr::set_port`
* `SocketAddrV4::set_ip`
* `SocketAddrV4::set_port`
* `SocketAddrV6::set_ip`
* `SocketAddrV6::set_port`
* `SocketAddrV6::set_flowinfo`
* `SocketAddrV6::set_scope_id`
* `<[T]>::copy_from_slice`
* `ptr::read_volatile`
* `ptr::write_volatile`
* The `#[deprecated]` attribute
* `OpenOptions::create_new`

Deprecated

* `std::raw::Slice` - use raw parts of `slice` module instead
* `std::raw::Repr` - use raw parts of `slice` module instead
* `str::char_range_at` - use slicing plus `chars()` plus `len_utf8`
* `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8`
* `str::char_at` - use slicing plus `chars()`
* `str::char_at_reverse` - use slicing plus `chars().rev()`
* `str::slice_shift_char` - use `chars()` plus `Chars::as_str`
* `CommandExt::session_leader` - use `before_exec` instead.

Closes #27719
cc #27751 (deprecating the `Slice` bits)
Closes #27754
Closes #27780
Closes #27809
Closes #27811
Closes #27830
Closes #28050
Closes #29453
Closes #29791
Closes #29935
Closes #30014
Closes #30752
Closes #31262
cc #31398 (still need to deal with `before_exec`)
Closes #31405
Closes #31572
Closes #31755
Closes #31756
2016-04-11 08:57:53 -07:00
mitaa
8bb19058d4 Remove rustdocs json format 2016-04-07 06:01:55 +02:00
bors
a9f34c86a4 Auto merge of #32230 - GuillaumeGomez:extend_css, r=alexcrichton
Add --extend-css option to rustdoc

Fixes #32223

r? @brson
2016-04-06 17:11:44 -07:00
Eduard Burtescu
8b0937293b rustc: move rustc_front to rustc::hir. 2016-04-06 09:01:55 +03:00
Guillaume Gomez
ded701bf64 Centralize nightly compiler flags handling 2016-04-05 04:13:30 +02:00
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
Aaron Turon
9fc51efe33 Stabilize std::convert and related code
* Marks `#[stable]` the contents of the `std::convert` module.

* Added methods `PathBuf::as_path`, `OsString::as_os_str`,
  `String::as_str`, `Vec::{as_slice, as_mut_slice}`.

* Deprecates `OsStr::from_str` in favor of a new, stable, and more
  general `OsStr::new`.

* Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
  to_cstring}` for ergonomic FFI usage.

[breaking-change]
2015-03-31 11:24:38 -07:00
Alex Crichton
990202cd0e rollup merge of #23794: brson/slicegate
Conflicts:
	src/test/run-pass/issue-13027.rs
2015-03-27 16:09:52 -07:00
Alex Crichton
d65fee28d3 Test fixes and rebase conflicts, round 2 2015-03-27 13:43:42 -07:00
Brian Anderson
1639e51f6e Feature gate *all* slice patterns. #23121
Until some backwards-compatibility hazards are fixed in #23121,
these need to be unstable.

[breaking-change]
2015-03-27 12:50:49 -07:00
Alex Crichton
28a6b16130 rollup merge of #23741: alexcrichton/remove-int-uint
Conflicts:
	src/librustc/middle/ty.rs
	src/librustc_trans/trans/adt.rs
	src/librustc_typeck/check/mod.rs
	src/libserialize/json.rs
	src/test/run-pass/spawn-fn.rs
2015-03-27 10:10:05 -07:00
Alex Crichton
956c2eb257 rollup merge of #23738: alexcrichton/snapshots
Conflicts:
	src/libcollections/vec.rs
2015-03-27 10:08:40 -07:00
Alexis Beingessner
1b98f6da7a default => or_insert per RFC 2015-03-27 07:42:03 -04:00
Alexis
93cdf1f278 update everything to use Entry defaults 2015-03-26 21:36:06 -04:00
Alex Crichton
43bfaa4a33 Mass rename uint/int to usize/isize
Now that support has been removed, all lingering use cases are renamed.
2015-03-26 12:10:22 -07:00
Alex Crichton
36ef29abf7 Register new snapshots 2015-03-26 09:57:05 -07:00
Alex Crichton
c608084ff5 rollup merge of #23598: brson/gate
Conflicts:
	src/compiletest/compiletest.rs
	src/libcollections/lib.rs
	src/librustc_back/lib.rs
	src/libserialize/lib.rs
	src/libstd/lib.rs
	src/libtest/lib.rs
	src/test/run-make/rustdoc-default-impl/foo.rs
	src/test/run-pass/env-home-dir.rs
2015-03-23 15:13:15 -07:00
Aaron Turon
8389253df0 Add generic conversion traits
This commit:

* Introduces `std::convert`, providing an implementation of
RFC 529.

* Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all
in favor of the corresponding generic conversion traits.

  Consequently, various IO APIs now take `AsRef<Path>` rather than
`AsPath`, and so on. Since the types provided by `std` implement both
traits, this should cause relatively little breakage.

* Deprecates many `from_foo` constructors in favor of `from`.

* Changes `PathBuf::new` to take no argument (creating an empty buffer,
  as per convention). The previous behavior is now available as
  `PathBuf::from`.

* De-stabilizes `IntoCow`. It's not clear whether we need this separate trait.

Closes #22751
Closes #14433

[breaking-change]
2015-03-23 15:01:45 -07:00
Brian Anderson
3d365f6a01 rustdoc: interpret all leading feature attributes in examples as crate attributes
This makes it possible to write `#![feature(foo)]` in doc tests.
2015-03-23 14:40:25 -07:00
Alex Crichton
212e03181e std: Remove old_io/old_path from the prelude
This commit removes the reexports of `old_io` traits as well as `old_path` types
and traits from the prelude. This functionality is now all deprecated and needs
to be removed to make way for other functionality like `Seek` in the `std::io`
module (currently reexported as `NewSeek` in the io prelude).

Closes #23377
Closes #23378
2015-03-20 20:07:19 -07:00
Alex Crichton
dedac5eb3c std: Stablize io::ErrorKind
This commit stabilizes the `ErrorKind` enumeration which is consumed by and
generated by the `io::Error` type. The purpose of this type is to serve as a
cross-platform namespace to categorize errors into. Two specific issues are
addressed as part of this stablization:

* The naming of each variant was scrutinized and some were tweaked. An example
  is how `FileNotFound` was renamed to simply `NotFound`. These names should not
  show either a Unix or Windows bias and the set of names is intended to grow
  over time. For now the names will likely largely consist of those errors
  generated by the I/O APIs in the standard library.

* The mapping of OS error codes onto kinds has been altered. Coalescing no
  longer occurs (multiple error codes become one kind). It is intended that each
  OS error code, if bound, corresponds to only one `ErrorKind`. The current set
  of error kinds was expanded slightly to include some networking errors.

This commit also adds a `raw_os_error` function which returns an `Option<i32>`
to extract the underlying raw error code from the `Error`.
2015-03-19 09:59:21 -07:00