Skip to content

Rollup of 10 pull requests #64733

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

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9755fe8
Add fs::read_dir() and ReadDir warning about iterator order + example
Aug 7, 2019
8068812
Remove Iteration order heading
Aug 8, 2019
53c5046
Fix gramitcal error in read_dir example
Aug 15, 2019
3c820fe
Comment out println in read_dir sorting example
Aug 26, 2019
91fd8ef
document the unstable iter_order_by library feature
KodrAus Sep 8, 2019
1161aeb
Replace println statements with explanatory comments
Sep 9, 2019
612ef5f
add new tests for re_rebalance_coherence
nikomatsakis Sep 12, 2019
e69d1b6
change to check-pass
nikomatsakis Sep 13, 2019
df7789c
Made a thread local storage panic message more explanatory
tomtau Sep 14, 2019
68c3739
updated the panic message wording
tomtau Sep 16, 2019
3f004a1
Fix re-rebalance coherence implementation for fundamental types
weiznich Sep 17, 2019
a9c38d9
Add more tests
weiznich Sep 18, 2019
31b3012
Split line to fix tidy
weiznich Sep 18, 2019
983e035
add long error explanation for E0524
GuillaumeGomez Sep 13, 2019
d2b873b
update ui tests
GuillaumeGomez Sep 13, 2019
3ee2920
Fix some unused variable warnings
weiznich Sep 22, 2019
645cdca
reduce visibility of a bunch of stuff in ext::tt
matklad Sep 22, 2019
827a5b2
rename libsyntax::ext::tt to mbe
matklad Sep 22, 2019
49f849c
rename tt -> mbe, part 2
matklad Sep 22, 2019
e30c516
move mbe module to a separate file
matklad Sep 22, 2019
636b354
docstring for mbe module
matklad Sep 22, 2019
9fd75f5
pull mbe token tree definition up
matklad Sep 22, 2019
9835697
push TokenTree::parse down
matklad Sep 22, 2019
81fe857
make mbe::TokenTree private to module
matklad Sep 22, 2019
4ea371e
Delete iter-order-by.md
KodrAus Sep 23, 2019
0423c2a
Remove unused dependencies
sinkuu Sep 19, 2019
2666ae5
Remove whitespace from testname
weiznich Sep 23, 2019
8acf958
update test
andrewbanchich Sep 23, 2019
4fd9b99
Add cycle detection for graphs
ecstatic-morse Sep 18, 2019
c9e4816
Add convenience function for detecting cyclic CFGs
ecstatic-morse Sep 18, 2019
5aa5d57
fix one typo
Sep 24, 2019
164b0f3
Rollup merge of #63356 - ali-raheem:issue#63183, r=KodrAus
Centril Sep 24, 2019
781a8ed
Rollup merge of #64296 - KodrAus:chore/iter_order_by, r=Centril
Centril Sep 24, 2019
8f9ad07
Rollup merge of #64428 - GuillaumeGomez:error-explanation-E0524, r=Ce…
Centril Sep 24, 2019
e8311f8
Rollup merge of #64481 - tomtau:fix/tls-error-message, r=KodrAus
Centril Sep 24, 2019
f7d5c13
Rollup merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, …
Centril Sep 24, 2019
07cf9ff
Rollup merge of #64622 - ecstatic-morse:cycle-detector, r=oli-obk
Centril Sep 24, 2019
e3c4339
Rollup merge of #64689 - matklad:refactor-mbe, r=petrochenkov
Centril Sep 24, 2019
9b262e6
Rollup merge of #64702 - sinkuu:deps, r=jonas-schievink
Centril Sep 24, 2019
16cdc9e
Rollup merge of #64717 - andrewbanchich:master, r=joshtriplett
Centril Sep 24, 2019
592ea43
Rollup merge of #64725 - guanqun:typo-fix, r=zackmdavis
Centril Sep 24, 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
13 changes: 0 additions & 13 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3324,8 +3324,6 @@ dependencies = [
"log",
"rustc",
"rustc_data_structures",
"rustc_errors",
"syntax",
"syntax_pos",
]

Expand All @@ -3347,7 +3345,6 @@ dependencies = [
"log",
"memmap",
"num_cpus",
"parking_lot 0.9.0",
"rustc",
"rustc_apfloat",
"rustc_codegen_utils",
Expand All @@ -3366,7 +3363,6 @@ dependencies = [
name = "rustc_codegen_utils"
version = "0.0.0"
dependencies = [
"flate2",
"log",
"punycode",
"rustc",
Expand Down Expand Up @@ -3561,7 +3557,6 @@ name = "rustc_mir"
version = "0.0.0"
dependencies = [
"arena",
"byteorder",
"either",
"graphviz",
"log",
Expand Down Expand Up @@ -3614,7 +3609,6 @@ name = "rustc_plugin_impl"
version = "0.0.0"
dependencies = [
"rustc",
"rustc_errors",
"rustc_metadata",
"syntax",
"syntax_pos",
Expand All @@ -3638,7 +3632,6 @@ version = "0.0.0"
dependencies = [
"arena",
"bitflags",
"indexmap",
"log",
"rustc",
"rustc_data_structures",
Expand All @@ -3660,7 +3653,6 @@ dependencies = [
"rustc_codegen_utils",
"rustc_data_structures",
"rustc_target",
"rustc_typeck",
"serde_json",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3691,9 +3683,7 @@ checksum = "b725dadae9fabc488df69a287f5a99c5eaf5d10853842a8a3dfac52476f544ee"
name = "rustc_traits"
version = "0.0.0"
dependencies = [
"bitflags",
"chalk-engine",
"graphviz",
"log",
"rustc",
"rustc_data_structures",
Expand Down Expand Up @@ -4056,7 +4046,6 @@ version = "0.0.0"
dependencies = [
"alloc",
"backtrace",
"cc",
"cfg-if",
"compiler_builtins",
"core",
Expand Down Expand Up @@ -4241,7 +4230,6 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_lexer",
"rustc_macros",
"rustc_target",
"scoped-tls",
"serialize",
Expand All @@ -4257,7 +4245,6 @@ dependencies = [
"log",
"rustc_data_structures",
"rustc_errors",
"rustc_lexer",
"rustc_target",
"smallvec",
"syntax",
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2581,7 +2581,7 @@ pub trait Iterator {
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (x * x).cmp(&y)), Ordering::Equal);
/// assert_eq!(xs.iter().cmp_by(&ys, |&x, &y| (2 * x).cmp(&y)), Ordering::Greater);
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn cmp_by<I, F>(mut self, other: I, mut cmp: F) -> Ordering
where
Self: Sized,
Expand Down Expand Up @@ -2664,7 +2664,7 @@ pub trait Iterator {
/// Some(Ordering::Greater)
/// );
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn partial_cmp_by<I, F>(mut self, other: I, mut partial_cmp: F) -> Option<Ordering>
where
Self: Sized,
Expand Down Expand Up @@ -2729,7 +2729,7 @@ pub trait Iterator {
///
/// assert!(xs.iter().eq_by(&ys, |&x, &y| x * x == y));
/// ```
#[unstable(feature = "iter_order_by", issue = "0")]
#[unstable(feature = "iter_order_by", issue = "64295")]
fn eq_by<I, F>(mut self, other: I, mut eq: F) -> bool
where
Self: Sized,
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,9 @@ impl<T> fmt::Debug for Discriminant<T> {
///
/// enum Foo { A(&'static str), B(i32), C(i32) }
///
/// assert!(mem::discriminant(&Foo::A("bar")) == mem::discriminant(&Foo::A("baz")));
/// assert!(mem::discriminant(&Foo::B(1)) == mem::discriminant(&Foo::B(2)));
/// assert!(mem::discriminant(&Foo::B(3)) != mem::discriminant(&Foo::C(3)));
/// assert_eq!(mem::discriminant(&Foo::A("bar")), mem::discriminant(&Foo::A("baz")));
/// assert_eq!(mem::discriminant(&Foo::B(1)), mem::discriminant(&Foo::B(2)));
/// assert_ne!(mem::discriminant(&Foo::B(3)), mem::discriminant(&Foo::C(3)));
/// ```
#[stable(feature = "discriminant_value", since = "1.21.0")]
pub fn discriminant<T>(v: &T) -> Discriminant<T> {
Expand Down
6 changes: 6 additions & 0 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ impl<'tcx> Body<'tcx> {
dominators(self)
}

/// Returns `true` if a cycle exists in the control-flow graph that is reachable from the
/// `START_BLOCK`.
pub fn is_cfg_cyclic(&self) -> bool {
graph::is_cyclic(self)
}

#[inline]
pub fn local_kind(&self, local: Local) -> LocalKind {
let index = local.as_usize();
Expand Down
10 changes: 9 additions & 1 deletion src/librustc/traits/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,15 @@ fn orphan_check_trait_ref<'tcx>(
// Let Ti be the first such type.
// - No uncovered type parameters P1..=Pn may appear in T0..Ti (excluding Ti)
//
for input_ty in trait_ref.input_types() {
fn uncover_fundamental_ty(ty: Ty<'_>) -> Vec<Ty<'_>> {
if fundamental_ty(ty) {
ty.walk_shallow().flat_map(|ty| uncover_fundamental_ty(ty)).collect()
} else {
vec![ty]
}
}

for input_ty in trait_ref.input_types().flat_map(uncover_fundamental_ty) {
debug!("orphan_check_trait_ref: check ty `{:?}`", input_ty);
if ty_is_local(tcx, input_ty, in_crate) {
debug!("orphan_check_trait_ref: ty_is_local `{:?}`", input_ty);
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_ast_borrowck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ doctest = false

[dependencies]
log = "0.4"
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
# for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
# refers to the borrowck-specific graphviz adapter traits.
dot = { path = "../libgraphviz", package = "graphviz" }
rustc = { path = "../librustc" }
errors = { path = "../librustc_errors", package = "rustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" }
1 change: 0 additions & 1 deletion src/librustc_codegen_ssa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ memmap = "0.6"
log = "0.4.5"
libc = "0.2.44"
jobserver = "0.1.11"
parking_lot = "0.9"
tempfile = "3.1"

rustc_serialize = { path = "../libserialize", package = "serialize" }
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ path = "lib.rs"
test = false

[dependencies]
flate2 = "1.0"
log = "0.4"
punycode = "0.4.0"
rustc-demangle = "0.1.16"
Expand Down
Loading