Rollup merge of #86859 - JohnTitor:test-69323, r=jackh726

Add a regression test for issue-69323

Closes #69323
r? `@jackh726`
This commit is contained in:
Yuki Okushi 2021-07-05 07:13:26 +09:00 committed by GitHub
commit d3244e29e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -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

View File

@ -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() {}