Skip to content

Commit c4b1638

Browse files
committed
Auto merge of #30187 - alexcrichton:stabilize-1.6, r=aturon
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. * `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
2 parents bf79ffa + 464cdff commit c4b1638

File tree

165 files changed

+712
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+712
-718
lines changed

src/compiletest/compiletest.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#![feature(rustc_private)]
1717
#![feature(str_char)]
1818
#![feature(test)]
19-
#![feature(vec_push_all)]
20-
#![feature(path_components_peek)]
2119

2220
#![deny(warnings)]
2321

src/compiletest/runtest.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,15 +1009,12 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError>,
10091009
}
10101010
}
10111011

1012-
fn is_compiler_error_or_warning(mut line: &str) -> bool {
1013-
// Remove initial prefix which may contain a colon
1014-
let mut components = Path::new(line).components();
1015-
if let Some(Component::Prefix(_)) = components.peek() {
1016-
components.next();
1017-
}
1018-
1019-
// Safe as path was originally constructed from a &str ^
1020-
line = components.as_path().to_str().unwrap();
1012+
fn is_compiler_error_or_warning(line: &str) -> bool {
1013+
let mut c = Path::new(line).components();
1014+
let line = match c.next() {
1015+
Some(Component::Prefix(_)) => c.as_path().to_str().unwrap(),
1016+
_ => line,
1017+
};
10211018

10221019
let mut i = 0;
10231020
return
@@ -1314,7 +1311,7 @@ fn make_compile_args<F>(config: &Config,
13141311
"-L".to_owned(),
13151312
config.build_base.to_str().unwrap().to_owned(),
13161313
format!("--target={}", target));
1317-
args.push_all(&extras);
1314+
args.extend_from_slice(&extras);
13181315
if !props.no_prefer_dynamic {
13191316
args.push("-C".to_owned());
13201317
args.push("prefer-dynamic".to_owned());

src/doc/book/custom-allocators.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ annotated version of `alloc_system`
8383
// Allocators are not allowed to depend on the standard library which in turn
8484
// requires an allocator in order to avoid circular dependencies. This crate,
8585
// however, can use all of libcore.
86-
#![feature(no_std)]
8786
#![no_std]
8887
8988
// Let's give a unique name to our custom allocator

src/doc/book/lang-items.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ and one for deallocation. A freestanding program that uses the `Box`
1616
sugar for dynamic allocations via `malloc` and `free`:
1717

1818
```rust
19-
#![feature(lang_items, box_syntax, start, no_std, libc)]
19+
#![feature(lang_items, box_syntax, start, libc)]
2020
#![no_std]
2121

2222
extern crate libc;

src/doc/book/no-stdlib.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ in the same format as C:
1616
# #![feature(libc)]
1717
#![feature(lang_items)]
1818
#![feature(start)]
19-
#![feature(no_std)]
2019
#![no_std]
2120

2221
// Pull in the system libc library for what crt0.o likely requires
@@ -46,7 +45,6 @@ compiler's name mangling too:
4645

4746
```rust
4847
# #![feature(libc)]
49-
#![feature(no_std)]
5048
#![feature(lang_items)]
5149
#![feature(start)]
5250
#![no_std]
@@ -104,9 +102,6 @@ vectors provided from C, using idiomatic Rust practices.
104102
# #![feature(libc)]
105103
#![feature(lang_items)]
106104
#![feature(start)]
107-
#![feature(no_std)]
108-
#![feature(core)]
109-
#![feature(core_slice_ext)]
110105
#![feature(raw)]
111106
#![no_std]
112107

src/etc/unicode.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ def emit_bsearch_range_table(f):
315315
f.write("""
316316
fn bsearch_range_table(c: char, r: &'static [(char, char)]) -> bool {
317317
use core::cmp::Ordering::{Equal, Less, Greater};
318-
use core::slice::SliceExt;
319318
r.binary_search_by(|&(lo, hi)| {
320319
if lo <= c && c <= hi {
321320
Equal
@@ -358,7 +357,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
358357
f.write("pub mod conversions {")
359358
f.write("""
360359
use core::cmp::Ordering::{Equal, Less, Greater};
361-
use core::slice::SliceExt;
362360
use core::option::Option;
363361
use core::option::Option::{Some, None};
364362
use core::result::Result::{Ok, Err};
@@ -404,7 +402,6 @@ def emit_charwidth_module(f, width_table):
404402
f.write("pub mod charwidth {\n")
405403
f.write(" use core::option::Option;\n")
406404
f.write(" use core::option::Option::{Some, None};\n")
407-
f.write(" use core::slice::SliceExt;\n")
408405
f.write(" use core::result::Result::{Ok, Err};\n")
409406
f.write("""
410407
fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 {

src/liballoc/boxed.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ pub struct ExchangeHeapSingleton {
104104
/// See the [module-level documentation](../../std/boxed/index.html) for more.
105105
#[lang = "owned_box"]
106106
#[stable(feature = "rust1", since = "1.0.0")]
107-
#[fundamental]
108107
pub struct Box<T: ?Sized>(Unique<T>);
109108

110109
/// `IntermediateBox` represents uninitialized backing storage for `Box`.

src/liballoc/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,15 @@
7575
#![cfg_attr(not(stage0), needs_allocator)]
7676

7777
#![cfg_attr(stage0, feature(rustc_attrs))]
78+
#![cfg_attr(stage0, feature(no_std))]
7879
#![cfg_attr(stage0, allow(unused_attributes))]
7980
#![feature(allocator)]
8081
#![feature(box_syntax)]
8182
#![feature(coerce_unsized)]
82-
#![feature(core)]
8383
#![feature(core_intrinsics)]
84-
#![feature(core_slice_ext)]
8584
#![feature(custom_attribute)]
8685
#![feature(fundamental)]
8786
#![feature(lang_items)]
88-
#![feature(no_std)]
8987
#![feature(nonzero)]
9088
#![feature(num_bits_bytes)]
9189
#![feature(optin_builtin_traits)]
@@ -103,9 +101,8 @@
103101
#![allow(unused_attributes)]
104102
#![feature(dropck_parametricity)]
105103
#![feature(unsize)]
106-
#![feature(core_slice_ext)]
107-
#![feature(core_str_ext)]
108104
#![feature(drop_in_place)]
105+
#![feature(fn_traits)]
109106

110107
#![cfg_attr(stage0, feature(alloc_system))]
111108
#![cfg_attr(not(stage0), feature(needs_allocator))]

src/liballoc/raw_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use core::ptr::Unique;
1212
use core::mem;
13-
use core::slice::{self, SliceExt};
13+
use core::slice;
1414
use heap;
1515
use super::oom;
1616
use super::boxed::Box;

src/liballoc_jemalloc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
issue = "27783")]
2222
#![feature(allocator)]
2323
#![feature(libc)]
24-
#![feature(no_std)]
2524
#![feature(staged_api)]
25+
#![cfg_attr(stage0, feature(no_std))]
2626

2727
extern crate libc;
2828

0 commit comments

Comments
 (0)