Skip to content

Commit

Permalink
Rollup merge of #86859 - JohnTitor:test-69323, r=jackh726
Browse files Browse the repository at this point in the history
Add a regression test for issue-69323

Closes #69323
r? `@jackh726`
  • Loading branch information
JohnTitor authored Jul 4, 2021
2 parents 28dba82 + 2512e96 commit d3244e2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/type-alias-impl-trait/issue-69323.full.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-69323.rs:5:27
|
LL | #![cfg_attr(full, feature(type_alias_impl_trait))]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information

warning: 1 warning emitted

19 changes: 19 additions & 0 deletions src/test/ui/type-alias-impl-trait/issue-69323.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// check-pass

// revisions: min full
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full, feature(type_alias_impl_trait))]
//[full]~^ WARN incomplete

use std::iter::{once, Chain};

fn test1<A: Iterator<Item = &'static str>>(x: A) -> Chain<A, impl Iterator<Item = &'static str>> {
x.chain(once(","))
}

type I<A> = Chain<A, impl Iterator<Item = &'static str>>;
fn test2<A: Iterator<Item = &'static str>>(x: A) -> I<A> {
x.chain(once(","))
}

fn main() {}

0 comments on commit d3244e2

Please # to comment.