Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a regression test for issue-69323 #86859

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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() {}