From 67a203f42cf9c215148a574ff285ca943dcb135e Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 15 May 2017 21:02:38 -0400 Subject: [PATCH 1/4] move issue-41697 to a mir-opt test --- src/test/{run-pass => mir-opt}/issue-41697.rs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/test/{run-pass => mir-opt}/issue-41697.rs (100%) diff --git a/src/test/run-pass/issue-41697.rs b/src/test/mir-opt/issue-41697.rs similarity index 100% rename from src/test/run-pass/issue-41697.rs rename to src/test/mir-opt/issue-41697.rs From d9a3f624330724c99a9f7dbedcf305c4c3407012 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 15 May 2017 21:12:40 -0400 Subject: [PATCH 2/4] remove compile-flags --- src/test/mir-opt/issue-41697.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/mir-opt/issue-41697.rs b/src/test/mir-opt/issue-41697.rs index d59b6a16562..47eeffe35a8 100644 --- a/src/test/mir-opt/issue-41697.rs +++ b/src/test/mir-opt/issue-41697.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags:-Zdump-mir=NEVER_MATCHED - // Regression test for #41697. Using dump-mir was triggering // artificial cycles: during type-checking, we had to get the MIR for // the constant expressions in `[u8; 2]`, which in turn would trigger From 7caf08447ee3a5a94c4214e8439b61bbef30c98f Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 11 May 2017 17:52:39 -0400 Subject: [PATCH 3/4] avoid cycles in mir-dump, take 2 --- src/librustc_mir/util/pretty.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc_mir/util/pretty.rs b/src/librustc_mir/util/pretty.rs index 14f277d1767..eaba573dcd2 100644 --- a/src/librustc_mir/util/pretty.rs +++ b/src/librustc_mir/util/pretty.rs @@ -324,7 +324,9 @@ fn write_mir_sig(tcx: TyCtxt, src: MirSource, mir: &Mir, w: &mut Write) MirSource::Promoted(_, i) => write!(w, "{:?} in", i)? } - write!(w, " {}", tcx.node_path_str(src.item_id()))?; + item_path::with_forced_impl_filename_line(|| { // see notes on #41697 elsewhere + write!(w, " {}", tcx.node_path_str(src.item_id())) + })?; if let MirSource::Fn(_) = src { write!(w, "(")?; From c9f9bc27804e9ff7f87481f3eb5edf167936a3bd Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 15 May 2017 21:23:51 -0400 Subject: [PATCH 4/4] fix typo making maps public --- src/librustc/ty/maps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/ty/maps.rs b/src/librustc/ty/maps.rs index 1fd9e8f7375..f448ca89347 100644 --- a/src/librustc/ty/maps.rs +++ b/src/librustc/ty/maps.rs @@ -592,7 +592,7 @@ macro_rules! define_map_struct { output: $output:tt) => { define_map_struct! { tcx: $tcx, - ready: ([pub] $attrs $name), + ready: ([] $attrs $name), input: ($($input)*), output: $output }