about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-11-08 11:27:06 +0000
committerbors <bors@rust-lang.org>2020-11-08 11:27:06 +0000
commit87a0997ef9c0bfad0ba362741afa601d8fb285b8 (patch)
treedcde719c8ced8d5cc54b328e6fdb596683992f97 /src/test/ui
parentf2ea2f648e117013b0217f001088ae89e0f163ca (diff)
parente06785b676bb639fef071feca302432c61fbddcc (diff)
Auto merge of #78410 - lcnr:revert75443, r=nikomatsakis
revert #75443, update mir validator

This PR reverts rust-lang#75443 to fix rust-lang#75992 and instead uses rust-lang#75419 to fix rust-lang#75313.

Adapts rust-lang#75419 to correctly deal with unevaluated constants as otherwise some `feature(const_evaluatable_checked)` tests would ICE.

Note that rust-lang#72793 was also fixed by rust-lang#75443, but as that issue only concerns `feature(type_alias_impl_trait)` I deleted that test case for now and would reopen that issue.

rust-lang#75443 may have also allowed some other code to now successfully compile which would make this revert a breaking change after 2 stable versions, but I hope that this is a purely theoretical concern.

See https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/generator.20upvars/near/214617274 for more reasoning about this.

r? `@nikomatsakis` `@eddyb` `@RalfJung`
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-72793.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/ui/type-alias-impl-trait/issue-72793.rs b/src/test/ui/type-alias-impl-trait/issue-72793.rs
deleted file mode 100644
index e643a8cab5b..00000000000
--- a/src/test/ui/type-alias-impl-trait/issue-72793.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-// build-pass
-
-// Regression test for #72793.
-// FIXME: This still shows ICE with `-Zmir-opt-level=2`.
-
-#![feature(type_alias_impl_trait)]
-
-trait T { type Item; }
-
-type Alias<'a> = impl T<Item = &'a ()>;
-
-struct S;
-impl<'a> T for &'a S {
-    type Item = &'a ();
-}
-
-fn filter_positive<'a>() -> Alias<'a> {
-    &S
-}
-
-fn with_positive(fun: impl Fn(Alias<'_>)) {
-    fun(filter_positive());
-}
-
-fn main() {
-    with_positive(|_| ());
-}