Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 15 pull requests #58282

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7cdcdb5
Update reference of rlibc crate to compiler-builtins crate
king6cong Jan 2, 2019
5581207
Remove outdated comment
king6cong Jan 9, 2019
3ad0aab
Transition build_helper to 2018 edition
h-michael Feb 3, 2019
fab032a
Transition compiletest to Rust 2018
phansch Feb 3, 2019
bd4df0c
Add Cargo.lock automatically adding message
h-michael Feb 4, 2019
a6f2f7f
Transition rustdoc to 2018 edition
h-michael Feb 3, 2019
8d6e5fc
rustc: partially HirIdify
ljedrz Feb 4, 2019
44752c2
mir: partially HirIdify
ljedrz Feb 4, 2019
6da9129
typeck: partially HirIdify
ljedrz Feb 4, 2019
57c9269
Add embedded book to test such that checktools works
Mark-Simulacrum Feb 6, 2019
44b2cc0
librustc_allocator => 2018
taiki-e Feb 6, 2019
4deb595
display sugared return types for async functions
euclio Feb 5, 2019
ba0fbd7
librustc_save_analysis => 2018
taiki-e Feb 6, 2019
1d05f81
Add #[must_use] message to Fn* traits
taiki-e Feb 7, 2019
221b1c3
HirId-ify hir::BodyId
ljedrz Feb 4, 2019
81613ad
disable tests in Miri
RalfJung Feb 7, 2019
6cc7743
Rollup merge of #57259 - king6cong:master, r=alexcrichton
kennytm Feb 8, 2019
a890879
Rollup merge of #58091 - phansch:compiletest2018, r=Centril
kennytm Feb 8, 2019
595abfd
Rollup merge of #58115 - h-michael:rustdoc-2018, r=Centril
kennytm Feb 8, 2019
a89b77d
Rollup merge of #58120 - h-michael:build_helper-theme-2018, r=Centril
kennytm Feb 8, 2019
5472c5f
Rollup merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxc
kennytm Feb 8, 2019
6bb06ea
Rollup merge of #58152 - ljedrz:HirIdify_mir, r=Zoxc
kennytm Feb 8, 2019
1a23711
Rollup merge of #58153 - ljedrz:HirIdify_typeck, r=Zoxc
kennytm Feb 8, 2019
a62fcee
Rollup merge of #58157 - h-michael:cargo-lock, r=alexcrichton
kennytm Feb 8, 2019
d1170ad
Rollup merge of #58167 - ljedrz:HirIdify_body_id, r=Zoxc
kennytm Feb 8, 2019
7fcb618
Rollup merge of #58203 - euclio:rustdoc-async, r=GuillaumeGomez
kennytm Feb 8, 2019
6379aff
Rollup merge of #58213 - Mark-Simulacrum:fix-checktools, r=alexcrichton
kennytm Feb 8, 2019
0e57277
Rollup merge of #58222 - taiki-e:librustc_allocator-2018, r=Centril
kennytm Feb 8, 2019
a85cfaa
Rollup merge of #58233 - taiki-e:librustc_save_analysis-2018, r=Centril
kennytm Feb 8, 2019
05d4de9
Rollup merge of #58262 - taiki-e:must_use, r=estebank
kennytm Feb 8, 2019
4a89289
Rollup merge of #58275 - RalfJung:miri-test-libcore, r=Mark-Simulacrum
kennytm Feb 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "adler32"
version = "1.0.3"
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,7 @@ test_book!(
RustdocBook, "src/doc/rustdoc", "rustdoc", default=true;
RustcBook, "src/doc/rustc", "rustc", default=true;
RustByExample, "src/doc/rust-by-example", "rust-by-example", default=false;
EmbeddedBook, "src/doc/embedded-book", "embedded-book", default=false;
TheBook, "src/doc/book", "book", default=false;
UnstableBook, "src/doc/unstable-book", "unstable-book", default=true;
);
Expand Down
1 change: 1 addition & 0 deletions src/build_helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "build_helper"
version = "0.1.0"
authors = ["The Rust Project Developers"]
edition = "2018"

[lib]
name = "build_helper"
Expand Down
2 changes: 2 additions & 0 deletions src/build_helper/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![deny(rust_2018_idioms)]

use std::fs::File;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/arc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::any::Any;
use std::sync::{Arc, Weak};
use std::cell::RefCell;
Expand Down
1 change: 1 addition & 0 deletions src/liballoc/tests/binary_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ fn assert_covariance() {
//
// Destructors must be called exactly once per element.
#[test]
#[cfg(not(miri))]
fn panic_safe() {
static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);

Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/btree/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

mod map;
mod set;

Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/heap.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::alloc::{Global, Alloc, Layout, System};

/// https://github.com/rust-lang/rust/issues/45955
Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/rc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::any::Any;
use std::rc::{Rc, Weak};
use std::cell::RefCell;
Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/slice.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::cell::Cell;
use std::cmp::Ordering::{self, Equal, Greater, Less};
use std::mem;
Expand Down
21 changes: 21 additions & 0 deletions src/liballoc/tests/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fn test_rfind() {
}

#[test]
#[cfg(not(miri))]
fn test_collect() {
let empty = "";
let s: String = empty.chars().collect();
Expand Down Expand Up @@ -118,6 +119,7 @@ fn test_concat_for_different_types() {
#[test]
fn test_concat_for_different_lengths() {
let empty: &[&str] = &[];
#[cfg(not(miri))]
test_concat!("", empty);
test_concat!("a", ["a"]);
test_concat!("ab", ["a", "b"]);
Expand Down Expand Up @@ -146,6 +148,7 @@ fn test_join_for_different_types() {
#[test]
fn test_join_for_different_lengths() {
let empty: &[&str] = &[];
#[cfg(not(miri))]
test_join!("", empty, "-");
test_join!("a", ["a"], "-");
test_join!("a-b", ["a", "b"], "-");
Expand All @@ -159,13 +162,15 @@ fn test_join_for_different_lengths_with_long_separator() {
assert_eq!("~~~~~".len(), 15);

let empty: &[&str] = &[];
#[cfg(not(miri))]
test_join!("", empty, "~~~~~");
test_join!("a", ["a"], "~~~~~");
test_join!("a~~~~~b", ["a", "b"], "~~~~~");
test_join!("~~~~~a~~~~~bc", ["", "a", "bc"], "~~~~~");
}

#[test]
#[cfg(not(miri))]
fn test_unsafe_slice() {
assert_eq!("ab", unsafe {"abc".get_unchecked(0..2)});
assert_eq!("bc", unsafe {"abc".get_unchecked(1..3)});
Expand Down Expand Up @@ -238,6 +243,7 @@ fn test_replacen() {
#[test]
fn test_replace() {
let a = "a";
#[cfg(not(miri))]
assert_eq!("".replace(a, "b"), "");
assert_eq!("a".replace(a, "b"), "b");
assert_eq!("ab".replace(a, "b"), "bb");
Expand Down Expand Up @@ -297,6 +303,7 @@ fn test_replace_pattern() {
// The current implementation of SliceIndex fails to handle methods
// orthogonally from range types; therefore, it is worth testing
// all of the indexing operations on each input.
#[cfg(not(miri))]
mod slice_index {
// Test a slicing operation **that should succeed,**
// testing it on all of the indexing methods.
Expand Down Expand Up @@ -679,6 +686,7 @@ fn test_str_slice_rangetoinclusive_ok() {

#[test]
#[should_panic]
#[cfg(not(miri))]
fn test_str_slice_rangetoinclusive_notok() {
let s = "abcαβγ";
&s[..=3];
Expand All @@ -694,6 +702,7 @@ fn test_str_slicemut_rangetoinclusive_ok() {

#[test]
#[should_panic]
#[cfg(not(miri))]
fn test_str_slicemut_rangetoinclusive_notok() {
let mut s = "abcαβγ".to_owned();
let s: &mut str = &mut s;
Expand Down Expand Up @@ -883,6 +892,7 @@ fn test_as_bytes() {

#[test]
#[should_panic]
#[cfg(not(miri))]
fn test_as_bytes_fail() {
// Don't double free. (I'm not sure if this exercises the
// original problem code path anymore.)
Expand Down Expand Up @@ -972,6 +982,7 @@ fn test_split_at_mut() {

#[test]
#[should_panic]
#[cfg(not(miri))]
fn test_split_at_boundscheck() {
let s = "ศไทย中华Việt Nam";
s.split_at(1);
Expand Down Expand Up @@ -1066,6 +1077,7 @@ fn test_rev_iterator() {
}

#[test]
#[cfg(not(miri))]
fn test_chars_decoding() {
let mut bytes = [0; 4];
for c in (0..0x110000).filter_map(std::char::from_u32) {
Expand All @@ -1077,6 +1089,7 @@ fn test_chars_decoding() {
}

#[test]
#[cfg(not(miri))]
fn test_chars_rev_decoding() {
let mut bytes = [0; 4];
for c in (0..0x110000).filter_map(std::char::from_u32) {
Expand Down Expand Up @@ -1306,6 +1319,7 @@ fn test_splitator() {
}

#[test]
#[cfg(not(miri))]
fn test_str_default() {
use std::default::Default;

Expand Down Expand Up @@ -1365,6 +1379,7 @@ fn test_bool_from_str() {
assert_eq!("not even a boolean".parse::<bool>().ok(), None);
}

#[cfg(not(miri))]
fn check_contains_all_substrings(s: &str) {
assert!(s.contains(""));
for i in 0..s.len() {
Expand All @@ -1375,6 +1390,7 @@ fn check_contains_all_substrings(s: &str) {
}

#[test]
#[cfg(not(miri))]
fn strslice_issue_16589() {
assert!("bananas".contains("nana"));

Expand All @@ -1384,13 +1400,15 @@ fn strslice_issue_16589() {
}

#[test]
#[cfg(not(miri))]
fn strslice_issue_16878() {
assert!(!"1234567ah012345678901ah".contains("hah"));
assert!(!"00abc01234567890123456789abc".contains("bcabc"));
}


#[test]
#[cfg(not(miri))]
fn test_strslice_contains() {
let x = "There are moments, Jeeves, when one asks oneself, 'Do trousers matter?'";
check_contains_all_substrings(x);
Expand Down Expand Up @@ -1528,6 +1546,7 @@ fn trim_ws() {

#[test]
fn to_lowercase() {
#[cfg(not(miri))]
assert_eq!("".to_lowercase(), "");
assert_eq!("AÉDžaé ".to_lowercase(), "aédžaé ");

Expand Down Expand Up @@ -1561,6 +1580,7 @@ fn to_lowercase() {

#[test]
fn to_uppercase() {
#[cfg(not(miri))]
assert_eq!("".to_uppercase(), "");
assert_eq!("aéDžßfiᾀ".to_uppercase(), "AÉDŽSSFIἈΙ");
}
Expand Down Expand Up @@ -1592,6 +1612,7 @@ fn test_cow_from() {
}

#[test]
#[cfg(not(miri))]
fn test_repeat() {
assert_eq!("".repeat(3), "");
assert_eq!("abc".repeat(0), "");
Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/string.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::borrow::Cow;
use std::collections::CollectionAllocErr::*;
use std::mem::size_of;
Expand Down
2 changes: 2 additions & 0 deletions src/liballoc/tests/vec.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use std::borrow::Cow;
use std::mem::size_of;
use std::{usize, isize};
Expand Down
7 changes: 7 additions & 0 deletions src/liballoc/tests/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ fn test_index() {

#[test]
#[should_panic]
#[cfg(not(miri))]
fn test_index_out_of_bounds() {
let mut deq = VecDeque::new();
for i in 1..4 {
Expand Down Expand Up @@ -906,20 +907,24 @@ fn test_append() {
// normal append
a.append(&mut b);
assert_eq!(a.iter().cloned().collect::<Vec<_>>(), [1, 2, 3, 4, 5, 6]);
#[cfg(not(miri))]
assert_eq!(b.iter().cloned().collect::<Vec<_>>(), []);

// append nothing to something
a.append(&mut b);
assert_eq!(a.iter().cloned().collect::<Vec<_>>(), [1, 2, 3, 4, 5, 6]);
#[cfg(not(miri))]
assert_eq!(b.iter().cloned().collect::<Vec<_>>(), []);

// append something to nothing
b.append(&mut a);
assert_eq!(b.iter().cloned().collect::<Vec<_>>(), [1, 2, 3, 4, 5, 6]);
#[cfg(not(miri))]
assert_eq!(a.iter().cloned().collect::<Vec<_>>(), []);
}

#[test]
#[cfg(not(miri))]
fn test_append_permutations() {
fn construct_vec_deque(
push_back: usize,
Expand Down Expand Up @@ -1120,6 +1125,7 @@ fn test_reserve_exact_2() {
}

#[test]
#[cfg(not(miri))]
fn test_try_reserve() {

// These are the interesting cases:
Expand Down Expand Up @@ -1221,6 +1227,7 @@ fn test_try_reserve() {
}

#[test]
#[cfg(not(miri))]
fn test_try_reserve_exact() {

// This is exactly the same as test_try_reserve with the method changed.
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//! often generated by LLVM. Additionally, this library can make explicit
//! calls to these functions. Their signatures are the same as found in C.
//! These functions are often provided by the system libc, but can also be
//! provided by the [rlibc crate](https://crates.io/crates/rlibc).
//! provided by the [compiler-builtins crate](https://crates.io/crates/compiler_builtins).
//!
//! * `rust_begin_panic` - This function takes four arguments, a
//! `fmt::Arguments`, a `&'static str`, and two `u32`'s. These four arguments
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/ops/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
label="expected an `Fn<{Args}>` closure, found `{Self}`",
)]
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use]
#[must_use = "closures are lazy and do nothing unless called"]
pub trait Fn<Args> : FnMut<Args> {
/// Performs the call operation.
#[unstable(feature = "fn_traits", issue = "29625")]
Expand Down Expand Up @@ -141,7 +141,7 @@ pub trait Fn<Args> : FnMut<Args> {
label="expected an `FnMut<{Args}>` closure, found `{Self}`",
)]
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use]
#[must_use = "closures are lazy and do nothing unless called"]
pub trait FnMut<Args> : FnOnce<Args> {
/// Performs the call operation.
#[unstable(feature = "fn_traits", issue = "29625")]
Expand Down Expand Up @@ -220,7 +220,7 @@ pub trait FnMut<Args> : FnOnce<Args> {
label="expected an `FnOnce<{Args}>` closure, found `{Self}`",
)]
#[fundamental] // so that regex can rely that `&str: !FnMut`
#[must_use]
#[must_use = "closures are lazy and do nothing unless called"]
pub trait FnOnce<Args> {
/// The returned type after the call operator is used.
#[stable(feature = "fn_once_output", since = "1.12.0")]
Expand Down
2 changes: 2 additions & 0 deletions src/libcore/tests/cell.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

use core::cell::*;
use core::default::Default;
use std::mem::drop;
Expand Down
2 changes: 2 additions & 0 deletions src/libcore/tests/fmt/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

mod builders;
mod float;
mod num;
Expand Down
2 changes: 2 additions & 0 deletions src/libcore/tests/hash/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(not(miri))]

mod sip;

use std::hash::{Hash, Hasher};
Expand Down
Loading