Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk

Remove min_type_alias_impl_trait in favor of type_alias_impl_trait

r? ``@oli-obk``
This commit is contained in:
Yuki Okushi 2021-07-28 18:28:19 +09:00 committed by GitHub
commit 23479f716a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
363 changed files with 949 additions and 5121 deletions

View file

@ -287,7 +287,7 @@ impl<'a> PostExpansionVisitor<'a> {
if let ast::TyKind::ImplTrait(..) = ty.kind {
gate_feature_post!(
&self.vis,
min_type_alias_impl_trait,
type_alias_impl_trait,
ty.span,
"`impl Trait` in type aliases is unstable"
);

View file

@ -21,7 +21,8 @@
#![feature(iter_map_while)]
#![feature(maybe_uninit_uninit_array)]
#![feature(min_specialization)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(new_uninit)]
#![feature(nll)]
#![feature(once_cell)]

View file

@ -486,7 +486,7 @@ declare_features! (
(active, async_closure, "1.37.0", Some(62290), None),
/// Allows `impl Trait` to be used inside type aliases (RFC 2515).
(incomplete, type_alias_impl_trait, "1.38.0", Some(63063), None),
(active, type_alias_impl_trait, "1.38.0", Some(63063), None),
/// Allows the definition of `const extern fn` and `const unsafe extern fn`.
(active, const_extern_fn, "1.40.0", Some(64926), None),
@ -619,9 +619,6 @@ declare_features! (
/// Allows macro attributes to observe output of `#[derive]`.
(active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None),
/// Allows the use of type alias impl trait in function return positions
(active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),
/// Allows associated types in inherent impls.
(incomplete, inherent_associated_types, "1.52.0", Some(8995), None),

View file

@ -111,7 +111,7 @@ declare_features! (
Some("subsumed by `.await` syntax")),
/// Allows defining `existential type`s.
(removed, existential_type, "1.38.0", Some(63063), None,
Some("removed in favor of `#![feature(min_type_alias_impl_trait)]`")),
Some("removed in favor of `#![feature(type_alias_impl_trait)]`")),
/// Allows using the macros:
/// + `__diagnostic_used`
/// + `__register_diagnostic`
@ -152,6 +152,10 @@ declare_features! (
(removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
/// Allows the use of type alias impl trait in function return positions
(removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None,
Some("removed in favor of full type_alias_impl_trait")),
// -------------------------------------------------------------------------
// feature-group-end: removed features
// -------------------------------------------------------------------------

View file

@ -142,7 +142,8 @@
#![feature(alloc_layout_extra)]
#![feature(trusted_random_access)]
#![feature(try_trait_v2)]
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(bootstrap, feature(min_type_alias_impl_trait))]
#![cfg_attr(not(bootstrap), feature(type_alias_impl_trait))]
#![feature(associated_type_bounds)]
#![feature(slice_group_by)]
#![feature(decl_macro)]

View file

@ -2,7 +2,7 @@
// check-pass
#![feature(trait_alias)]
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
/// look at this trait right here
pub trait ThisTrait {

View file

@ -1,5 +1,5 @@
// check-pass
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
pub trait ValidTrait {}
type ImplTrait = impl ValidTrait;

View file

@ -1,5 +1,5 @@
// check-pass
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
pub trait ValidTrait {}
type ImplTrait = impl ValidTrait;

View file

@ -1,6 +1,6 @@
//edition:2018
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
pub trait Foo {
type X: std::future::Future<Output = ()>;

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
trait MyTrait {}
impl MyTrait for i32 {}

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
pub trait Backend {}

View file

@ -1,492 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/duplicate.rs:4:32
|
LL | #![cfg_attr(full_tait, 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
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:10:36
|
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:12:36
|
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:14:39
|
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:16:45
|
LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:18:45
|
LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:20:48
|
LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:23:34
|
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:25:34
|
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:27:37
|
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:29:43
|
LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:31:43
|
LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:33:46
|
LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:36:35
|
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:38:35
|
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:40:38
|
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:42:44
|
LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:44:44
|
LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:46:47
|
LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:49:32
|
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:51:32
|
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:53:35
|
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:55:43
|
LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:57:43
|
LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:59:46
|
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:65:40
|
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:67:40
|
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:69:43
|
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:72:35
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:74:35
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:76:38
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:78:44
|
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:80:44
|
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:82:47
|
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:85:36
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:87:36
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:89:39
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:91:40
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:93:40
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:95:43
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:98:36
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:100:36
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:102:39
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:104:34
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:106:34
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:108:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:110:45
|
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:112:45
|
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:114:48
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:132:40
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:134:44
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:136:43
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:125:43
|
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:127:43
|
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:129:46
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error: aborting due to 60 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0719`.

View file

@ -1,50 +1,110 @@
#![feature(associated_type_bounds)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![feature(untagged_unions)]
use std::iter;
struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
struct SI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
struct SW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
struct SW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
struct SW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
enum EI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
V(T),
}
enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
V(T),
}
enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
V(T),
}
enum EW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
enum EW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
enum EW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
V(T),
}
union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
union UI1<T: Iterator<Item: Copy, Item: Send>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
union UI2<T: Iterator<Item: Copy, Item: Copy>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
union UI3<T: Iterator<Item: 'static, Item: 'static>> {
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
f: T,
}
union UW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
union UW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
union UW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
f: T,
}
fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
@ -52,16 +112,34 @@ fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FW1<T>()
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
fn FW2<T>()
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
fn FW3<T>()
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> { iter::empty() }
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> { iter::empty() }
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> { iter::empty() }
fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
iter::empty()
}
fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
iter::empty()
}
fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
iter::empty()
}
fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
@ -75,12 +153,21 @@ type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
type TAW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
= T;
type TAW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
= T;
type TAW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
= T;
type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
@ -107,27 +194,57 @@ trait TRS2: Iterator<Item: Copy, Item: Copy> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRS3: Iterator<Item: 'static, Item: 'static> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
trait TRW1<T>
where
T: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRW2<T>
where
T: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRW3<T>
where
T: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRSW1
where
Self: Iterator<Item: Copy, Item: Send>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRSW2
where
Self: Iterator<Item: Copy, Item: Copy>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRSW3
where
Self: Iterator<Item: 'static, Item: 'static>,
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
{
}
trait TRA1 {
type A: Iterator<Item: Copy, Item: Send>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
trait TRA2 {
type A: Iterator<Item: Copy, Item: Copy>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
trait TRA3 {
type A: Iterator<Item: 'static, Item: 'static>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
}
type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]

View file

@ -1,149 +1,149 @@
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:10:36
--> $DIR/duplicate.rs:7:36
|
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:12:36
--> $DIR/duplicate.rs:11:36
|
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:14:39
--> $DIR/duplicate.rs:15:39
|
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:16:45
--> $DIR/duplicate.rs:21:29
|
LL | struct SW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:18:45
--> $DIR/duplicate.rs:28:29
|
LL | struct SW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:20:48
--> $DIR/duplicate.rs:35:32
|
LL | struct SW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:23:34
--> $DIR/duplicate.rs:41:34
|
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> { V(T) }
LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:25:34
--> $DIR/duplicate.rs:45:34
|
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> { V(T) }
LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:27:37
--> $DIR/duplicate.rs:49:37
|
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> { V(T) }
LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:29:43
--> $DIR/duplicate.rs:55:29
|
LL | enum EW1<T> where T: Iterator<Item: Copy, Item: Send> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:31:43
--> $DIR/duplicate.rs:62:29
|
LL | enum EW2<T> where T: Iterator<Item: Copy, Item: Copy> { V(T) }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:33:46
--> $DIR/duplicate.rs:69:32
|
LL | enum EW3<T> where T: Iterator<Item: 'static, Item: 'static> { V(T) }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:36:35
--> $DIR/duplicate.rs:75:35
|
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> { f: T }
LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:38:35
--> $DIR/duplicate.rs:79:35
|
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> { f: T }
LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:40:38
--> $DIR/duplicate.rs:83:38
|
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> { f: T }
LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:42:44
--> $DIR/duplicate.rs:89:29
|
LL | union UW1<T> where T: Iterator<Item: Copy, Item: Send> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:44:44
--> $DIR/duplicate.rs:96:29
|
LL | union UW2<T> where T: Iterator<Item: Copy, Item: Copy> { f: T }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:46:47
--> $DIR/duplicate.rs:103:32
|
LL | union UW3<T> where T: Iterator<Item: 'static, Item: 'static> { f: T }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:49:32
--> $DIR/duplicate.rs:109:32
|
LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| ---------- ^^^^^^^^^^ re-bound here
@ -151,7 +151,7 @@ LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:51:32
--> $DIR/duplicate.rs:111:32
|
LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| ---------- ^^^^^^^^^^ re-bound here
@ -159,7 +159,7 @@ LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:53:35
--> $DIR/duplicate.rs:113:35
|
LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -167,31 +167,31 @@ LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:55:43
--> $DIR/duplicate.rs:117:29
|
LL | fn FW1<T>() where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:57:43
--> $DIR/duplicate.rs:123:29
|
LL | fn FW2<T>() where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:59:46
--> $DIR/duplicate.rs:129:32
|
LL | fn FW3<T>() where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:65:40
--> $DIR/duplicate.rs:143:40
|
LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| ---------- ^^^^^^^^^^ re-bound here
@ -199,7 +199,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:67:40
--> $DIR/duplicate.rs:145:40
|
LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| ---------- ^^^^^^^^^^ re-bound here
@ -207,7 +207,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:69:43
--> $DIR/duplicate.rs:147:43
|
LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -215,7 +215,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:72:35
--> $DIR/duplicate.rs:150:35
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| ---------- ^^^^^^^^^^ re-bound here
@ -223,7 +223,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:74:35
--> $DIR/duplicate.rs:152:35
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| ---------- ^^^^^^^^^^ re-bound here
@ -231,7 +231,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:76:38
--> $DIR/duplicate.rs:154:38
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -239,31 +239,31 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:78:44
--> $DIR/duplicate.rs:158:29
|
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:80:44
--> $DIR/duplicate.rs:163:29
|
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:82:47
--> $DIR/duplicate.rs:168:32
|
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:85:36
--> $DIR/duplicate.rs:172:36
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
@ -271,7 +271,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:87:36
--> $DIR/duplicate.rs:174:36
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| ---------- ^^^^^^^^^^ re-bound here
@ -279,7 +279,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:89:39
--> $DIR/duplicate.rs:176:39
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -287,7 +287,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:91:40
--> $DIR/duplicate.rs:178:40
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
@ -295,7 +295,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:93:40
--> $DIR/duplicate.rs:180:40
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here
@ -303,7 +303,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:95:43
--> $DIR/duplicate.rs:182:43
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -311,7 +311,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:98:36
--> $DIR/duplicate.rs:185:36
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| ---------- ^^^^^^^^^^ re-bound here
@ -319,7 +319,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:100:36
--> $DIR/duplicate.rs:187:36
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| ---------- ^^^^^^^^^^ re-bound here
@ -327,7 +327,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:102:39
--> $DIR/duplicate.rs:189:39
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -335,7 +335,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:104:34
--> $DIR/duplicate.rs:191:34
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
@ -343,7 +343,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:106:34
--> $DIR/duplicate.rs:193:34
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
@ -351,7 +351,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:108:37
--> $DIR/duplicate.rs:195:37
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -359,79 +359,79 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:110:45
--> $DIR/duplicate.rs:199:29
|
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:112:45
--> $DIR/duplicate.rs:205:29
|
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:114:48
--> $DIR/duplicate.rs:211:32
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | T: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
--> $DIR/duplicate.rs:217:32
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:116:46
--> $DIR/duplicate.rs:217:32
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: Copy, Item: Send>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
--> $DIR/duplicate.rs:224:32
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:119:46
--> $DIR/duplicate.rs:224:32
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: Copy, Item: Copy>,
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
--> $DIR/duplicate.rs:231:35
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:122:49
--> $DIR/duplicate.rs:231:35
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | Self: Iterator<Item: 'static, Item: 'static>,
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:132:40
--> $DIR/duplicate.rs:249:40
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
@ -439,7 +439,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:134:44
--> $DIR/duplicate.rs:251:44
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| ---------- ^^^^^^^^^^ re-bound here
@ -447,7 +447,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:136:43
--> $DIR/duplicate.rs:253:43
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
@ -455,28 +455,28 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:125:43
--> $DIR/duplicate.rs:237:34
|
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | type A: Iterator<Item: Copy, Item: Send>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:127:43
--> $DIR/duplicate.rs:241:34
|
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | type A: Iterator<Item: Copy, Item: Copy>;
| ---------- ^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
--> $DIR/duplicate.rs:129:46
--> $DIR/duplicate.rs:245:37
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
LL | type A: Iterator<Item: 'static, Item: 'static>;
| ------------- ^^^^^^^^^^^^^ re-bound here
| |
| `Item` bound here first
error: aborting due to 60 previous errors

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/trait-alias-impl-trait.rs:6:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,39 +1,59 @@
// run-pass
#![feature(associated_type_bounds)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
use std::ops::Add;
trait Tr1 { type As1; fn mk(self) -> Self::As1; }
trait Tr2<'a> { fn tr2(self) -> &'a Self; }
trait Tr1 {
type As1;
fn mk(self) -> Self::As1;
}
trait Tr2<'a> {
fn tr2(self) -> &'a Self;
}
fn assert_copy<T: Copy>(x: T) { let _x = x; let _x = x; }
fn assert_copy<T: Copy>(x: T) {
let _x = x;
let _x = x;
}
fn assert_static<T: 'static>(_: T) {}
fn assert_forall_tr2<T: for<'a> Tr2<'a>>(_: T) {}
struct S1;
#[derive(Copy, Clone)]
struct S2;
impl Tr1 for S1 { type As1 = S2; fn mk(self) -> Self::As1 { S2 } }
impl Tr1 for S1 {
type As1 = S2;
fn mk(self) -> Self::As1 {
S2
}
}
type Et1 = impl Tr1<As1: Copy>;
fn def_et1() -> Et1 { S1 }
pub fn use_et1() { assert_copy(def_et1().mk()); }
fn def_et1() -> Et1 {
S1
}
pub fn use_et1() {
assert_copy(def_et1().mk());
}
type Et2 = impl Tr1<As1: 'static>;
fn def_et2() -> Et2 { S1 }
pub fn use_et2() { assert_static(def_et2().mk()); }
fn def_et2() -> Et2 {
S1
}
pub fn use_et2() {
assert_static(def_et2().mk());
}
type Et3 = impl Tr1<As1: Clone + Iterator<Item: Add<u8, Output: Into<u8>>>>;
fn def_et3() -> Et3 {
struct A;
impl Tr1 for A {
type As1 = core::ops::Range<u8>;
fn mk(self) -> Self::As1 { 0..10 }
fn mk(self) -> Self::As1 {
0..10
}
}
A
}
@ -53,14 +73,20 @@ fn def_et4() -> Et4 {
struct A;
impl Tr1 for A {
type As1 = A;
fn mk(self) -> A { A }
fn mk(self) -> A {
A
}
}
impl<'a> Tr2<'a> for A {
fn tr2(self) -> &'a Self { &A }
fn tr2(self) -> &'a Self {
&A
}
}
A
}
pub fn use_et4() { assert_forall_tr2(def_et4().mk()); }
pub fn use_et4() {
assert_forall_tr2(def_et4().mk());
}
fn main() {
let _ = use_et1();

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-63591.rs:6:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,10 +1,7 @@
// check-pass
#![feature(associated_type_bounds)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
fn main() {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-60655-latebound-regions.rs:8:32
|
LL | #![cfg_attr(full_tait, 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

@ -3,10 +3,7 @@
// check-pass
// edition:2018
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
use std::future::Future;

View file

@ -1,5 +1,5 @@
#![feature(imported_main)]
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
//~^^^ ERROR `main` function not found in crate
pub mod foo {

View file

@ -2,7 +2,7 @@ error[E0601]: `main` function not found in crate `imported_main_const_fn_item_ty
--> $DIR/imported_main_const_fn_item_type_forbidden.rs:1:1
|
LL | / #![feature(imported_main)]
LL | | #![feature(min_type_alias_impl_trait)]
LL | | #![feature(type_alias_impl_trait)]
LL | | #![allow(incomplete_features)]
LL | |
... |

View file

@ -1,50 +0,0 @@
// ignore-compare-mode-chalk
use std::fmt::Debug;
type Foo = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
trait Bar {
type Baa: Debug;
fn define() -> Self::Baa;
}
impl Bar for () {
type Baa = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
fn define() -> Self::Baa {
0
}
}
fn define() -> Foo {
0
}
trait TraitWithDefault {
type Assoc = impl Debug;
//~^ ERROR associated type defaults are unstable
//~| ERROR `impl Trait` not allowed outside of function
//~| ERROR `impl Trait` in type aliases is unstable
}
type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
//~^ ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
fn define_multiple() -> NestedFree {
(vec![true], 0u8, 0i32..1)
}
impl Bar for u8 {
type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
//~^ ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
//~| ERROR `impl Trait` in type aliases is unstable
fn define() -> Self::Baa {
(vec![true], 0u8, 0i32..1)
}
}
fn main() {}

View file

@ -1,118 +0,0 @@
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:4:12
|
LL | type Foo = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:12:16
|
LL | type Baa = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: associated type defaults are unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:5
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
= help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:24
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:37
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:49
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:70
|
LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:21
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:34
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:46
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:67
|
LL | type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` not allowed outside of function and method return types
--> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
|
LL | type Assoc = impl Debug;
| ^^^^^^^^^^
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0562, E0658.
For more information about an error, try `rustc --explain E0562`.

View file

@ -1,5 +1,5 @@
// ignore-compare-mode-chalk
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
use std::fmt::Debug;
type Foo = impl Debug;
@ -13,7 +13,7 @@ fn define() -> Bar {
type Foo2 = impl Debug;
fn define2() {
let x = || -> Foo2 { 42 }; //~ ERROR not permitted here
let x = || -> Foo2 { 42 };
}
type Foo3 = impl Debug;

View file

@ -10,15 +10,6 @@ LL | Bar(42)
= note: expected opaque type `impl Debug`
found type `{integer}`
error[E0658]: type alias impl trait is not permitted here
--> $DIR/feature-gate-type_alias_impl_trait.rs:16:19
|
LL | let x = || -> Foo2 { 42 };
| ^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0308]: mismatched types
--> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
|
@ -77,7 +68,6 @@ error: could not find defining uses
LL | type Foo4 = impl Debug;
| ^^^^^^^^^^
error: aborting due to 8 previous errors
error: aborting due to 7 previous errors
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0308`.

View file

@ -1,18 +0,0 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:24:17
|
LL | let a = Foo;
| ^^^ not found in this scope
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/layout-error.rs:8:32
|
LL | #![cfg_attr(full_tait, 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
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0425`.

View file

@ -1,19 +0,0 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:24:17
|
LL | let a = Foo;
| ^^^ not found in this scope
error[E0658]: type alias impl trait is not permitted here
--> $DIR/layout-error.rs:30:27
|
LL | Task::spawn(&POOL, || cb());
| ^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0425, E0658.
For more information about an error, try `rustc --explain E0425`.

View file

@ -3,10 +3,7 @@
//
// edition:2018
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
use std::future::Future;
pub struct Task<F: Future>(F);
@ -27,5 +24,5 @@ fn main() {
type F = impl Future;
// Check that statics are inhabited computes they layout.
static POOL: Task<F> = Task::new();
Task::spawn(&POOL, || cb()); //[min_tait]~ ERROR type alias impl trait is not permitted here
Task::spawn(&POOL, || cb());
}

View file

@ -0,0 +1,9 @@
error[E0425]: cannot find value `Foo` in this scope
--> $DIR/layout-error.rs:21:17
|
LL | let a = Foo;
| ^^^ not found in this scope
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.

View file

@ -1,17 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/metadata-sufficient-for-layout.rs:10:32
|
LL | #![cfg_attr(full_tait, 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
error: fatal error triggered by #[rustc_error]
--> $DIR/metadata-sufficient-for-layout.rs:28:1
|
LL | fn main() {}
| ^^^^^^^^^
error: aborting due to previous error; 1 warning emitted

View file

@ -5,10 +5,7 @@
//
// aux-build:metadata-sufficient-for-layout.rs
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait, rustc_attrs)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait, rustc_attrs)]
#![feature(generator_trait)]
extern crate metadata_sufficient_for_layout;

View file

@ -1,5 +1,5 @@
error: fatal error triggered by #[rustc_error]
--> $DIR/metadata-sufficient-for-layout.rs:28:1
--> $DIR/metadata-sufficient-for-layout.rs:25:1
|
LL | fn main() {}
| ^^^^^^^^^

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type-generic-trait.rs:3:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
// build-pass (FIXME(62277): could be check-pass?)
trait Bar {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type-trivial.rs:3:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
// build-pass (FIXME(62277): could be check-pass?)
trait Bar {}

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/associated-impl-trait-type.rs:3:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
// build-pass (FIXME(62277): could be check-pass?)
trait Bar {}

View file

@ -1,21 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/auto-trait.rs:5:32
|
LL | #![cfg_attr(full_tait, 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
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/auto-trait.rs:24:1
|
LL | impl<T: Send> AnotherTrait for T {}
| -------------------------------- first implementation here
...
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<impl OpaqueTrait>`
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,9 +1,6 @@
// Tests that type alias impls traits do not leak auto-traits for
// the purposes of coherence checking
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
trait OpaqueTrait {}
impl<T> OpaqueTrait for T {}

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/auto-trait.rs:24:1
--> $DIR/auto-trait.rs:21:1
|
LL | impl<T: Send> AnotherTrait for T {}
| -------------------------------- first implementation here

View file

@ -4,7 +4,7 @@
//[sa] compile-flags: -Z save-analysis
//-^ To make this the regression test for #75962.
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
// See issue 60414

View file

@ -1,57 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872-1.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error[E0276]: impl has stricter requirements than trait
--> $DIR/issue-55872-1.rs:17:5
|
LL | fn foo<T>() -> Self::E;
| ----------------------- definition of `foo` from trait
...
LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound
|
LL | impl<S: Default + std::marker::Copy> Bar for S {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
|
= note: required because it appears within the type `(S, T)`
help: consider further restricting this bound
|
LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-1.rs:17:37
|
LL | fn foo<T: Default>() -> Self::E {
| _____________________________________^
LL | |
LL | |
LL | | (S::default(), T::default())
LL | | }
| |_____^
error: aborting due to 4 previous errors; 1 warning emitted
Some errors have detailed explanations: E0276, E0277.
For more information about an error, try `rustc --explain E0276`.

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
pub trait Bar {
type E: Copy;

View file

@ -1,5 +1,5 @@
error[E0276]: impl has stricter requirements than trait
--> $DIR/issue-55872-1.rs:17:5
--> $DIR/issue-55872-1.rs:14:5
|
LL | fn foo<T>() -> Self::E;
| ----------------------- definition of `foo` from trait
@ -8,7 +8,7 @@ LL | fn foo<T: Default>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `T: Default`
error[E0277]: the trait bound `S: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
--> $DIR/issue-55872-1.rs:10:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `S`
@ -20,7 +20,7 @@ LL | impl<S: Default + std::marker::Copy> Bar for S {
| ^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `T: Copy` is not satisfied in `(S, T)`
--> $DIR/issue-55872-1.rs:13:14
--> $DIR/issue-55872-1.rs:10:14
|
LL | type E = impl Copy;
| ^^^^^^^^^ within `(S, T)`, the trait `Copy` is not implemented for `T`
@ -32,7 +32,7 @@ LL | fn foo<T: Default + std::marker::Copy>() -> Self::E {
| ^^^^^^^^^^^^^^^^^^^
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-1.rs:17:37
--> $DIR/issue-55872-1.rs:14:37
|
LL | fn foo<T: Default>() -> Self::E {
| _____________________________________^

View file

@ -1,28 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872-2.rs:6:32
|
LL | #![cfg_attr(full_tait, 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
error[E0277]: the trait bound `impl Future: Copy` is not satisfied
--> $DIR/issue-55872-2.rs:16:14
|
LL | type E = impl std::marker::Copy;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-2.rs:18:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^
LL | |
LL | | async {}
LL | | }
| |_____^
error: aborting due to 2 previous errors; 1 warning emitted
For more information about this error, try `rustc --explain E0277`.

View file

@ -1,10 +1,7 @@
// edition:2018
// ignore-compare-mode-chalk
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
pub trait Bar {
type E: Copy;

View file

@ -1,11 +1,11 @@
error[E0277]: the trait bound `impl Future: Copy` is not satisfied
--> $DIR/issue-55872-2.rs:16:14
--> $DIR/issue-55872-2.rs:13:14
|
LL | type E = impl std::marker::Copy;
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `impl Future`
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872-2.rs:18:28
--> $DIR/issue-55872-2.rs:15:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^

View file

@ -1,21 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-55872.rs:4:32
|
LL | #![cfg_attr(full_tait, 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
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872.rs:16:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^
LL | |
LL | | || ()
LL | | }
| |_____^
error: aborting due to previous error; 1 warning emitted

View file

@ -1,8 +1,5 @@
// ignore-compare-mode-chalk
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
pub trait Bar {
type E: Copy;
@ -14,7 +11,7 @@ impl<S> Bar for S {
type E = impl Copy;
fn foo<T>() -> Self::E {
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
//~^ ERROR type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
|| ()
}
}

View file

@ -1,5 +1,5 @@
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias
--> $DIR/issue-55872.rs:16:28
--> $DIR/issue-55872.rs:13:28
|
LL | fn foo<T>() -> Self::E {
| ____________________________^

View file

@ -1,4 +1,4 @@
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
type X<'a, 'b> = impl std::fmt::Debug;

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-53457.rs:5:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,10 +1,6 @@
// check-pass
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
type X = impl Clone;
fn bar<F: Fn(&i32) + Clone>(f: F) -> F {

View file

@ -1,15 +0,0 @@
error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
--> $DIR/issue-70877.rs:10:12
|
LL | type FooRet = impl std::fmt::Debug;
| -------------------- the found opaque type
...
LL | type Foo = impl Iterator<Item = FooItem>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Option`, found opaque type
|
= note: expected struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
found struct `Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> impl Debug + 'static)>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0271`.

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
#![allow(incomplete_features)]
#![feature(type_alias_impl_trait)]
type FooArg<'a> = &'a dyn ToString;
type FooRet = impl std::fmt::Debug;

View file

@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<Bar as Iterator>::Item == Box<(dyn for<'r> Fn(&'r (dyn ToString + 'r)) -> Option<String> + 'static)>`
--> $DIR/issue-70877.rs:10:12
--> $DIR/issue-70877.rs:7:12
|
LL | type FooRet = impl std::fmt::Debug;
| -------------------- the found opaque type

View file

@ -1,32 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-78722.rs:5:32
|
LL | #![cfg_attr(full_tait, 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
error[E0308]: mismatched types
--> $DIR/issue-78722.rs:15:20
|
LL | type F = impl core::future::Future<Output = u8>;
| -------------------------------------- the expected opaque type
...
LL | let f: F = async { 1 };
| - ^^^^^^^^^^^ expected opaque type, found a different opaque type
| |
| expected due to this
|
::: $SRC_DIR/core/src/future/mod.rs:LL:COL
|
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
| ------------------------------- the found opaque type
|
= note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>)
found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
= note: distinct uses of `impl Trait` result in different opaque types
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0308`.

View file

@ -1,9 +1,6 @@
// edition:2018
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
type F = impl core::future::Future<Output = u8>;

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-78722.rs:15:20
--> $DIR/issue-78722.rs:12:20
|
LL | type F = impl core::future::Future<Output = u8>;
| -------------------------------------- the expected opaque type
@ -14,7 +14,7 @@ LL | let f: F = async { 1 };
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
| ------------------------------- the found opaque type
|
= note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>)
= note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:5:10>)
found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
= note: distinct uses of `impl Trait` result in different opaque types

View file

@ -1,5 +1,5 @@
#![feature(unboxed_closures)]
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
type FunType = impl Fn<()>;
//~^ could not find defining uses

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/error-handling-2.rs:6:32
|
LL | #![cfg_attr(full_tait, 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
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/error-handling-2.rs:16:60
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^^^^^^^^
|
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8
--> $DIR/error-handling-2.rs:16:8
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0700`.

View file

@ -1,10 +1,7 @@
// compile-flags:-Zborrowck=mir
#![feature(member_constraints)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#[derive(Clone)]
struct CopyIfEq<T, U>(T, U);

View file

@ -1,11 +1,11 @@
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
--> $DIR/error-handling-2.rs:16:60
--> $DIR/error-handling-2.rs:13:60
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^^^^^^^^
|
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 16:8
--> $DIR/error-handling-2.rs:16:8
note: hidden type `*mut &'a i32` captures the lifetime `'a` as defined on the function body at 13:8
--> $DIR/error-handling-2.rs:13:8
|
LL | fn foo<'a: 'b, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| ^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/error-handling.rs:5:32
|
LL | #![cfg_attr(full_tait, 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
error: lifetime may not live long enough
--> $DIR/error-handling.rs:25:16
|
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- -- lifetime `'b` defined here
| |
| lifetime `'a` defined here
...
LL | let _: &'b i32 = *u.0;
| ^^^^^^^ type annotation requires that `'a` must outlive `'b`
|
= help: consider adding the following bound: `'a: 'b`
error: aborting due to previous error; 1 warning emitted

View file

@ -1,9 +1,6 @@
// compile-flags:-Zborrowck=mir
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#[derive(Clone)]
struct CopyIfEq<T, U>(T, U);

View file

@ -1,5 +1,5 @@
error: lifetime may not live long enough
--> $DIR/error-handling.rs:25:16
--> $DIR/error-handling.rs:22:16
|
LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> {
| -- -- lifetime `'b` defined here

View file

@ -3,7 +3,7 @@
// revisions: migrate mir
//[mir]compile-flags: -Z borrowck=mir
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
trait Trait<'a, 'b> {}
impl<T> Trait<'_, '_> for T {}

View file

@ -1,23 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/negative-reasoning.rs:5:32
|
LL | #![cfg_attr(full_tait, 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
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/negative-reasoning.rs:22:1
|
LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
| ------------------------------------------- first implementation here
...
LL | impl AnotherTrait for D<OpaqueType> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<impl OpaqueTrait>`
|
= note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `impl OpaqueTrait` in future versions
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0119`.

View file

@ -1,9 +1,6 @@
// Tests that we cannot assume that an opaque type does *not* implement some
// other trait
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
trait OpaqueTrait {}
impl<T> OpaqueTrait for T {}

View file

@ -1,5 +1,5 @@
error[E0119]: conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`
--> $DIR/negative-reasoning.rs:22:1
--> $DIR/negative-reasoning.rs:19:1
|
LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
| ------------------------------------------- first implementation here

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-alias-generic-param.rs:8:32
|
LL | #![cfg_attr(full_tait, 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

@ -3,10 +3,7 @@
// types in 'item' position when generic parameters are involved
//
// run-pass
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
trait Meow {
type MeowType;
@ -14,7 +11,8 @@ trait Meow {
}
impl<T, I> Meow for I
where I: Iterator<Item = T>
where
I: Iterator<Item = T>,
{
type MeowType = impl Iterator<Item = T>;
fn meow(self) -> Self::MeowType {

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/type-alias-impl-trait-in-fn-body.rs:5:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,9 +1,6 @@
// build-pass (FIXME(62277): could be check-pass?)
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
use std::fmt::Debug;

View file

@ -23,7 +23,7 @@ LL | type Out = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/where-allowed.rs:154:23
@ -32,7 +32,7 @@ LL | type InTypeAlias<R> = impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0658]: `impl Trait` in type aliases is unstable
--> $DIR/where-allowed.rs:157:39
@ -41,7 +41,7 @@ LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
| ^^^^^^^^^^
|
= note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
= help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
error[E0562]: `impl Trait` not allowed outside of function and method return types
--> $DIR/where-allowed.rs:15:40

View file

@ -1,11 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-60662.rs:6:32
|
LL | #![cfg_attr(full_tait, 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

@ -1,15 +0,0 @@
// check-pass
// compile-flags: -Z unpretty=hir
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
trait Animal { }
fn main() {
pub type ServeFut = /*impl Trait*/;
}

View file

@ -1,13 +1,9 @@
// check-pass
// compile-flags: -Z unpretty=hir
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
trait Animal {
}
trait Animal {}
fn main() {
pub type ServeFut = impl Animal;

View file

@ -1,8 +1,6 @@
// check-pass
// compile-flags: -Z unpretty=hir
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![feature(type_alias_impl_trait)]
#[prelude_import]
use ::std::prelude::rust_2015::*;

View file

@ -1,5 +1,5 @@
// normalize-stderr-test "pref: Align \{\n *pow2: [1-3],\n *\}" -> "pref: $$PREF_ALIGN"
#![feature(never_type, rustc_attrs, min_type_alias_impl_trait)]
#![feature(never_type, rustc_attrs, type_alias_impl_trait)]
#![crate_type = "lib"]
#[rustc_layout(debug)]

View file

@ -1,81 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/inline-trait-and-foreign-items.rs:4:32
|
LL | #![cfg_attr(full_tait, 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: `#[inline]` is ignored on constants
--> $DIR/inline-trait-and-foreign-items.rs:10:5
|
LL | #[inline]
| ^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/inline-trait-and-foreign-items.rs:7:9
|
LL | #![warn(unused_attributes)]
| ^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: see issue #65833 <https://github.com/rust-lang/rust/issues/65833> for more information
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:14:5
|
LL | #[inline]
| ^^^^^^^^^
LL | type T;
| ------- not a function or closure
warning: `#[inline]` is ignored on constants
--> $DIR/inline-trait-and-foreign-items.rs:21:5
|
LL | #[inline]
| ^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: see issue #65833 <https://github.com/rust-lang/rust/issues/65833> for more information
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:25:5
|
LL | #[inline]
| ^^^^^^^^^
LL | type T = Self;
| -------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:28:5
|
LL | #[inline]
| ^^^^^^^^^
LL | type U = impl Trait;
| -------------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:33:5
|
LL | #[inline]
| ^^^^^^^^^
LL | static X: u32;
| -------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:36:5
|
LL | #[inline]
| ^^^^^^^^^
LL | type T;
| ------- not a function or closure
error: could not find defining uses
--> $DIR/inline-trait-and-foreign-items.rs:29:14
|
LL | type U = impl Trait;
| ^^^^^^^^^^
error: aborting due to 6 previous errors; 3 warnings emitted
For more information about this error, try `rustc --explain E0518`.

View file

@ -1,8 +1,5 @@
#![feature(extern_types)]
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![warn(unused_attributes)]

View file

@ -1,11 +1,11 @@
warning: `#[inline]` is ignored on constants
--> $DIR/inline-trait-and-foreign-items.rs:10:5
--> $DIR/inline-trait-and-foreign-items.rs:7:5
|
LL | #[inline]
| ^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/inline-trait-and-foreign-items.rs:7:9
--> $DIR/inline-trait-and-foreign-items.rs:4:9
|
LL | #![warn(unused_attributes)]
| ^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL | #![warn(unused_attributes)]
= note: see issue #65833 <https://github.com/rust-lang/rust/issues/65833> for more information
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:14:5
--> $DIR/inline-trait-and-foreign-items.rs:11:5
|
LL | #[inline]
| ^^^^^^^^^
@ -21,7 +21,7 @@ LL | type T;
| ------- not a function or closure
warning: `#[inline]` is ignored on constants
--> $DIR/inline-trait-and-foreign-items.rs:21:5
--> $DIR/inline-trait-and-foreign-items.rs:18:5
|
LL | #[inline]
| ^^^^^^^^^
@ -30,7 +30,7 @@ LL | #[inline]
= note: see issue #65833 <https://github.com/rust-lang/rust/issues/65833> for more information
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:25:5
--> $DIR/inline-trait-and-foreign-items.rs:22:5
|
LL | #[inline]
| ^^^^^^^^^
@ -38,7 +38,7 @@ LL | type T = Self;
| -------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:28:5
--> $DIR/inline-trait-and-foreign-items.rs:25:5
|
LL | #[inline]
| ^^^^^^^^^
@ -46,7 +46,7 @@ LL | type U = impl Trait;
| -------------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:33:5
--> $DIR/inline-trait-and-foreign-items.rs:30:5
|
LL | #[inline]
| ^^^^^^^^^
@ -54,7 +54,7 @@ LL | static X: u32;
| -------------- not a function or closure
error[E0518]: attribute should be applied to function or closure
--> $DIR/inline-trait-and-foreign-items.rs:36:5
--> $DIR/inline-trait-and-foreign-items.rs:33:5
|
LL | #[inline]
| ^^^^^^^^^
@ -62,7 +62,7 @@ LL | type T;
| ------- not a function or closure
error: could not find defining uses
--> $DIR/inline-trait-and-foreign-items.rs:29:14
--> $DIR/inline-trait-and-foreign-items.rs:26:14
|
LL | type U = impl Trait;
| ^^^^^^^^^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lint-ctypes-73249-2.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-2.rs:29:25
|
LL | pub fn lint_me() -> A<()>;
| ^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-2.rs:5:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= note: opaque types have no C equivalent
error: aborting due to previous error; 1 warning emitted

View file

@ -1,12 +1,9 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait Baz { }
pub trait Baz {}
impl Baz for () { }
impl Baz for () {}
type Qux = impl Baz;

View file

@ -1,11 +1,11 @@
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-2.rs:29:25
--> $DIR/lint-ctypes-73249-2.rs:26:25
|
LL | pub fn lint_me() -> A<()>;
| ^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-2.rs:5:9
--> $DIR/lint-ctypes-73249-2.rs:2:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lint-ctypes-73249-3.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-3.rs:21:25
|
LL | pub fn lint_me() -> A;
| ^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-3.rs:5:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= note: opaque types have no C equivalent
error: aborting due to previous error; 1 warning emitted

View file

@ -1,16 +1,15 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait Baz { }
pub trait Baz {}
impl Baz for u32 { }
impl Baz for u32 {}
type Qux = impl Baz;
fn assign() -> Qux { 3 }
fn assign() -> Qux {
3
}
#[repr(C)]
pub struct A {

View file

@ -1,11 +1,11 @@
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-3.rs:21:25
--> $DIR/lint-ctypes-73249-3.rs:20:25
|
LL | pub fn lint_me() -> A;
| ^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-3.rs:5:9
--> $DIR/lint-ctypes-73249-3.rs:2:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lint-ctypes-73249-5.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-5.rs:21:25
|
LL | pub fn lint_me() -> A;
| ^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-5.rs:5:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= note: opaque types have no C equivalent
error: aborting due to previous error; 1 warning emitted

View file

@ -1,16 +1,15 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait Baz { }
pub trait Baz {}
impl Baz for u32 { }
impl Baz for u32 {}
type Qux = impl Baz;
fn assign() -> Qux { 3 }
fn assign() -> Qux {
3
}
#[repr(transparent)]
pub struct A {

View file

@ -1,11 +1,11 @@
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73249-5.rs:21:25
--> $DIR/lint-ctypes-73249-5.rs:20:25
|
LL | pub fn lint_me() -> A;
| ^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73249-5.rs:5:9
--> $DIR/lint-ctypes-73249-5.rs:2:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lint-ctypes-73251-1.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73251-1.rs:24:25
|
LL | pub fn lint_me() -> <u32 as Foo>::Assoc;
| ^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73251-1.rs:5:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= note: opaque types have no C equivalent
error: aborting due to previous error; 1 warning emitted

View file

@ -1,12 +1,9 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait Baz { }
pub trait Baz {}
impl Baz for u32 { }
impl Baz for u32 {}
type Qux = impl Baz;
@ -18,7 +15,9 @@ impl Foo for u32 {
type Assoc = Qux;
}
fn assign() -> Qux { 1 }
fn assign() -> Qux {
1
}
extern "C" {
pub fn lint_me() -> <u32 as Foo>::Assoc; //~ ERROR: uses type `impl Baz`

View file

@ -1,11 +1,11 @@
error: `extern` block uses type `impl Baz`, which is not FFI-safe
--> $DIR/lint-ctypes-73251-1.rs:24:25
--> $DIR/lint-ctypes-73251-1.rs:23:25
|
LL | pub fn lint_me() -> <u32 as Foo>::Assoc;
| ^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73251-1.rs:5:9
--> $DIR/lint-ctypes-73251-1.rs:2:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^

View file

@ -1,24 +0,0 @@
warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/lint-ctypes-73251-2.rs:3:32
|
LL | #![cfg_attr(full_tait, 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
error: `extern` block uses type `impl TraitA`, which is not FFI-safe
--> $DIR/lint-ctypes-73251-2.rs:32:25
|
LL | pub fn lint_me() -> <AliasB as TraitB>::Assoc;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73251-2.rs:5:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^
= note: opaque types have no C equivalent
error: aborting due to previous error; 1 warning emitted

View file

@ -1,7 +1,4 @@
// revisions: min_tait full_tait
#![feature(min_type_alias_impl_trait)]
#![cfg_attr(full_tait, feature(type_alias_impl_trait))]
//[full_tait]~^ WARN incomplete
#![feature(type_alias_impl_trait)]
#![deny(improper_ctypes)]
pub trait TraitA {
@ -16,7 +13,10 @@ pub trait TraitB {
type Assoc;
}
impl<T> TraitB for T where T: TraitA {
impl<T> TraitB for T
where
T: TraitA,
{
type Assoc = <T as TraitA>::Assoc;
}
@ -24,9 +24,13 @@ type AliasA = impl TraitA<Assoc = u32>;
type AliasB = impl TraitB<Assoc = AliasA>;
fn use_of_a() -> AliasA { 3 }
fn use_of_a() -> AliasA {
3
}
fn use_of_b() -> AliasB { 3 }
fn use_of_b() -> AliasB {
3
}
extern "C" {
pub fn lint_me() -> <AliasB as TraitB>::Assoc; //~ ERROR: uses type `impl TraitA`

View file

@ -1,11 +1,11 @@
error: `extern` block uses type `impl TraitA`, which is not FFI-safe
--> $DIR/lint-ctypes-73251-2.rs:32:25
--> $DIR/lint-ctypes-73251-2.rs:36:25
|
LL | pub fn lint_me() -> <AliasB as TraitB>::Assoc;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
|
note: the lint level is defined here
--> $DIR/lint-ctypes-73251-2.rs:5:9
--> $DIR/lint-ctypes-73251-2.rs:2:9
|
LL | #![deny(improper_ctypes)]
| ^^^^^^^^^^^^^^^

Some files were not shown because too many files have changed in this diff Show more