mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 01:52:51 +00:00
Make GATs no longer incomplete
This commit is contained in:
parent
27e4205881
commit
f1ab6f93e6
@ -405,7 +405,7 @@ declare_features! (
|
||||
(active, in_band_lifetimes, "1.23.0", Some(44524), None),
|
||||
|
||||
/// Allows associated types to be generic, e.g., `type Foo<T>;` (RFC 1598).
|
||||
(incomplete, generic_associated_types, "1.23.0", Some(44265), None),
|
||||
(active, generic_associated_types, "1.23.0", Some(44265), None),
|
||||
|
||||
/// Allows defining `trait X = A + B;` alias items.
|
||||
(active, trait_alias, "1.24.0", Some(41517), None),
|
||||
|
@ -2315,7 +2315,7 @@ declare_lint! {
|
||||
/// ### Example
|
||||
///
|
||||
/// ```rust
|
||||
/// #![feature(generic_associated_types)]
|
||||
/// #![feature(const_generics)]
|
||||
/// ```
|
||||
///
|
||||
/// {{produces}}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/collections-project-default.rs:60:5
|
||||
--> $DIR/collections-project-default.rs:59:5
|
||||
|
|
||||
LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
|
||||
| ------------------------------------ expected `<C as Collection<i32>>::Sibling<f32>` because of return type
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
// This test unsures that with_opt_const_param returns the
|
||||
// def_id of the N param in the Foo::Assoc GAT.
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
// This test unsures that with_opt_const_param returns the
|
||||
// def_id of the N param in the Foo::Assoc GAT.
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
// This test unsures that with_opt_const_param returns the
|
||||
// def_id of the N param in the Bar::Assoc GAT.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Test that correct syntax is used in suggestion to constrain associated type
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<T>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/constraint-assoc-type-suggestion.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/constraint-assoc-type-suggestion.rs:13:23
|
||||
--> $DIR/constraint-assoc-type-suggestion.rs:12:23
|
||||
|
|
||||
LL | let b: Vec<i32> = a;
|
||||
| -------- ^ expected struct `Vec`, found associated type
|
||||
@ -22,6 +13,6 @@ help: consider constraining the associated type `<T as X>::Y<i32>` to `Vec<i32>`
|
||||
LL | fn f<T: X<Y<i32> = Vec<i32>>>(a: T::Y<i32>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
// check-pass
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Foo {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: expected one of `#`, `>`, `const`, identifier, or lifetime, found `,`
|
||||
--> $DIR/empty_generics.rs:5:14
|
||||
--> $DIR/empty_generics.rs:4:14
|
||||
|
|
||||
LL | trait Foo {
|
||||
| - while parsing this item list starting here
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<'x>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'x`
|
||||
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:9:35
|
||||
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:8:35
|
||||
|
|
||||
LL | fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
|
||||
| - ^^ undeclared lifetime
|
||||
@ -18,12 +9,12 @@ LL | fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
|
||||
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
|
||||
|
||||
error[E0582]: binding for associated type `Y` references lifetime `'a`, which does not appear in the trait input types
|
||||
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:9:33
|
||||
--> $DIR/gat-in-trait-path-undeclared-lifetime.rs:8:33
|
||||
|
|
||||
LL | fn _f(arg : Box<dyn for<'a> X<Y<'x> = &'a [u32]>>) {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors; 1 warning emitted
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0261, E0582.
|
||||
For more information about an error, try `rustc --explain E0261`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
trait Foo {
|
||||
|
@ -1,27 +1,18 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-in-trait-path.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0038]: the trait `Foo` cannot be made into an object
|
||||
--> $DIR/gat-in-trait-path.rs:22:13
|
||||
--> $DIR/gat-in-trait-path.rs:21:13
|
||||
|
|
||||
LL | fn f(_arg : Box<dyn for<'a> Foo<A<'a> = &'a ()>>) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `A` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/gat-in-trait-path.rs:6:10
|
||||
--> $DIR/gat-in-trait-path.rs:5:10
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- this trait cannot be made into an object...
|
||||
LL | type A<'a> where Self: 'a;
|
||||
| ^ ...because it contains the generic associated type `A`
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,11 +0,0 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-incomplete-warning.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait Foo {
|
||||
type F<'a>;
|
||||
|
@ -1,22 +1,13 @@
|
||||
error[E0403]: the name `T1` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/gat-trait-path-generic-type-arg.rs:11:12
|
||||
--> $DIR/gat-trait-path-generic-type-arg.rs:10:12
|
||||
|
|
||||
LL | impl <T, T1> Foo for T {
|
||||
| -- first use of `T1`
|
||||
LL | type F<T1> = &[u8];
|
||||
| ^^ already used
|
||||
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-trait-path-generic-type-arg.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/gat-trait-path-generic-type-arg.rs:11:18
|
||||
--> $DIR/gat-trait-path-generic-type-arg.rs:10:18
|
||||
|
|
||||
LL | type F<T1> = &[u8];
|
||||
| ^ expected named lifetime parameter
|
||||
@ -26,7 +17,7 @@ help: consider introducing a named lifetime parameter
|
||||
LL | type F<'a, T1> = &'a [u8];
|
||||
| ^^^ ^^^
|
||||
|
||||
error: aborting due to 2 previous errors; 1 warning emitted
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0106, E0403.
|
||||
For more information about an error, try `rustc --explain E0106`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<'a>;
|
||||
|
@ -1,20 +1,11 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0107]: missing generics for associated type `X::Y`
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:11:20
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:10:20
|
||||
|
|
||||
LL | fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:5:8
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:4:8
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^ --
|
||||
@ -24,13 +15,13 @@ LL | fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
|
||||
| ^^^^^
|
||||
|
||||
error[E0107]: missing generics for associated type `X::Y`
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:11:20
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:10:20
|
||||
|
|
||||
LL | fn foo<'a, T1: X<Y = T1>>(t : T1) -> T1::Y<'a> {
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:5:8
|
||||
--> $DIR/gat-trait-path-missing-lifetime.rs:4:8
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^ --
|
||||
@ -39,6 +30,6 @@ help: add missing lifetime argument
|
||||
LL | fn foo<'a, T1: X<Y<'a> = T1>>(t : T1) -> T1::Y<'a> {
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors; 1 warning emitted
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<'a>;
|
||||
|
@ -1,26 +1,17 @@
|
||||
error: lifetime in trait object type must be followed by `+`
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:8:29
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:29
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^^
|
||||
|
||||
error: parenthesized generic arguments cannot be used in associated type constraints
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:8:27
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^^^^^
|
||||
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
warning: trait objects without an explicit `dyn` are deprecated
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:8:29
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:29
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^^ help: use `dyn`: `dyn 'a`
|
||||
@ -30,13 +21,13 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
|
||||
|
||||
error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:8:27
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:8
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:4:8
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^ --
|
||||
@ -46,7 +37,7 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a, 'a) = &'a ()>>) {}
|
||||
| ^^^
|
||||
|
||||
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:8:27
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:7:27
|
||||
|
|
||||
LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| ^---- help: remove these generics
|
||||
@ -54,11 +45,11 @@ LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
|
||||
| expected 0 generic arguments
|
||||
|
|
||||
note: associated type defined here, with 0 generic parameters
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:5:8
|
||||
--> $DIR/gat-trait-path-parenthesised-args.rs:4:8
|
||||
|
|
||||
LL | type Y<'a>;
|
||||
| ^
|
||||
|
||||
error: aborting due to 4 previous errors; 2 warnings emitted
|
||||
error: aborting due to 4 previous errors; 1 warning emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
// run-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
pub trait X {
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
// Checking the interaction with this other feature
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0277]: `T` doesn't implement `std::fmt::Display`
|
||||
--> $DIR/generic-associated-types-where.rs:21:5
|
||||
--> $DIR/generic-associated-types-where.rs:20:5
|
||||
|
|
||||
LL | type Assoc2<T> = Vec<T>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ `T` cannot be formatted with the default formatter
|
||||
@ -11,7 +11,7 @@ LL | type Assoc2<T: std::fmt::Display> = Vec<T>;
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0276]: impl has stricter requirements than trait
|
||||
--> $DIR/generic-associated-types-where.rs:23:5
|
||||
--> $DIR/generic-associated-types-where.rs:22:5
|
||||
|
|
||||
LL | type Assoc3<T>;
|
||||
| --------------- definition of `Assoc3` from trait
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0261]: use of undeclared lifetime name `'b`
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:9:37
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:8:37
|
||||
|
|
||||
LL | + Deref<Target = Self::Item<'b>>;
|
||||
| ^^ undeclared lifetime
|
||||
@ -15,7 +15,7 @@ LL | type Iter<'b, 'a>: Iterator<Item = Self::Item<'a>>
|
||||
| ^^^
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'undeclared`
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:12:41
|
||||
--> $DIR/generic_associated_type_undeclared_lifetimes.rs:11:41
|
||||
|
|
||||
LL | fn iter<'a>(&'a self) -> Self::Iter<'undeclared>;
|
||||
| ^^^^^^^^^^^ undeclared lifetime
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0310]: the parameter type `T` may not live long enough
|
||||
--> $DIR/impl_bounds.rs:16:5
|
||||
--> $DIR/impl_bounds.rs:15:5
|
||||
|
|
||||
LL | type A<'a> where Self: 'static = (&'a ());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@ -8,48 +8,48 @@ LL | type A<'a> where Self: 'static = (&'a ());
|
||||
= note: ...so that the type `Fooy<T>` will meet its required lifetime bounds
|
||||
|
||||
error[E0478]: lifetime bound not satisfied
|
||||
--> $DIR/impl_bounds.rs:18:5
|
||||
--> $DIR/impl_bounds.rs:17:5
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: lifetime parameter instantiated with the lifetime `'b` as defined on the associated item at 18:16
|
||||
--> $DIR/impl_bounds.rs:18:16
|
||||
note: lifetime parameter instantiated with the lifetime `'b` as defined on the associated item at 17:16
|
||||
--> $DIR/impl_bounds.rs:17:16
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^
|
||||
note: but lifetime parameter must outlive the lifetime `'a` as defined on the associated item at 18:12
|
||||
--> $DIR/impl_bounds.rs:18:12
|
||||
note: but lifetime parameter must outlive the lifetime `'a` as defined on the associated item at 17:12
|
||||
--> $DIR/impl_bounds.rs:17:12
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^
|
||||
|
||||
error[E0478]: lifetime bound not satisfied
|
||||
--> $DIR/impl_bounds.rs:18:5
|
||||
--> $DIR/impl_bounds.rs:17:5
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: lifetime parameter instantiated with the lifetime `'a` as defined on the associated item at 18:12
|
||||
--> $DIR/impl_bounds.rs:18:12
|
||||
note: lifetime parameter instantiated with the lifetime `'a` as defined on the associated item at 17:12
|
||||
--> $DIR/impl_bounds.rs:17:12
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^
|
||||
note: but lifetime parameter must outlive the lifetime `'b` as defined on the associated item at 18:16
|
||||
--> $DIR/impl_bounds.rs:18:16
|
||||
note: but lifetime parameter must outlive the lifetime `'b` as defined on the associated item at 17:16
|
||||
--> $DIR/impl_bounds.rs:17:16
|
||||
|
|
||||
LL | type B<'a, 'b> where 'b: 'a = (&'a(), &'b ());
|
||||
| ^^
|
||||
|
||||
error[E0277]: the trait bound `T: Copy` is not satisfied
|
||||
--> $DIR/impl_bounds.rs:21:5
|
||||
--> $DIR/impl_bounds.rs:20:5
|
||||
|
|
||||
LL | type C where Self: Copy = String;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
|
||||
note: the requirement `Fooy<T>: Copy` appears on the associated impl type `C` but not on the corresponding associated trait type
|
||||
--> $DIR/impl_bounds.rs:8:5
|
||||
--> $DIR/impl_bounds.rs:7:5
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- in this trait
|
||||
@ -62,14 +62,14 @@ LL | impl<T: std::marker::Copy> Foo for Fooy<T> {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `T: Copy` is not satisfied
|
||||
--> $DIR/impl_bounds.rs:23:5
|
||||
--> $DIR/impl_bounds.rs:22:5
|
||||
|
|
||||
LL | fn d() where Self: Copy {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
|
||||
|
|
||||
= note: required because of the requirements on the impl of `Copy` for `Fooy<T>`
|
||||
note: the requirement `Fooy<T>: Copy` appears on the impl method `d` but not on the corresponding trait method
|
||||
--> $DIR/impl_bounds.rs:9:8
|
||||
--> $DIR/impl_bounds.rs:8:8
|
||||
|
|
||||
LL | trait Foo {
|
||||
| --- in this trait
|
||||
|
@ -1,6 +1,5 @@
|
||||
// check-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![feature(associated_type_defaults)]
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
// Check that this program doesn't cause the compiler to error without output.
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Foo {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0276]: impl has stricter requirements than trait
|
||||
--> $DIR/issue-47206-where-clause.rs:13:5
|
||||
--> $DIR/issue-47206-where-clause.rs:12:5
|
||||
|
|
||||
LL | type Assoc3<T>;
|
||||
| --------------- definition of `Assoc3` from trait
|
||||
|
@ -1,6 +1,5 @@
|
||||
// check-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Cert {
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
// check-pass
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<'a>;
|
||||
|
@ -1,27 +1,18 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-67510-pass.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0038]: the trait `X` cannot be made into an object
|
||||
--> $DIR/issue-67510-pass.rs:8:19
|
||||
--> $DIR/issue-67510-pass.rs:7:19
|
||||
|
|
||||
LL | fn _func1<'a>(_x: Box<dyn X<Y<'a>=&'a ()>>) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ `X` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `Y` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-67510-pass.rs:5:10
|
||||
--> $DIR/issue-67510-pass.rs:4:10
|
||||
|
|
||||
LL | trait X {
|
||||
| - this trait cannot be made into an object...
|
||||
LL | type Y<'a>;
|
||||
| ^ ...because it contains the generic associated type `Y`
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0038`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait X {
|
||||
type Y<'a>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-67510.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/issue-67510.rs:8:21
|
||||
--> $DIR/issue-67510.rs:7:21
|
||||
|
|
||||
LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {}
|
||||
| - ^^ undeclared lifetime
|
||||
@ -18,7 +9,7 @@ LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {}
|
||||
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/issue-67510.rs:8:26
|
||||
--> $DIR/issue-67510.rs:7:26
|
||||
|
|
||||
LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {}
|
||||
| - ^^ undeclared lifetime
|
||||
@ -27,6 +18,6 @@ LL | fn f(x: Box<dyn X<Y<'a>=&'a ()>>) {}
|
||||
|
|
||||
= help: if you want to experiment with in-band lifetime bindings, add `#![feature(in_band_lifetimes)]` to the crate attributes
|
||||
|
||||
error: aborting due to 2 previous errors; 1 warning emitted
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0261`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68641
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait UnsafeCopy {
|
||||
type Item<'a>: Copy;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68641-check-gat-bounds.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0277]: the trait bound `T: Copy` is not satisfied
|
||||
--> $DIR/issue-68641-check-gat-bounds.rs:15:5
|
||||
--> $DIR/issue-68641-check-gat-bounds.rs:14:5
|
||||
|
|
||||
LL | type Item<'a>: Copy;
|
||||
| ---- required by this bound in `UnsafeCopy::Item`
|
||||
@ -21,6 +12,6 @@ help: consider restricting type parameter `T`
|
||||
LL | impl<T: std::marker::Copy> UnsafeCopy for T {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68642
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: Fn() -> u32;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68642-broken-llvm-ir.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0277]: expected a `Fn<()>` closure, found `T`
|
||||
--> $DIR/issue-68642-broken-llvm-ir.rs:15:5
|
||||
--> $DIR/issue-68642-broken-llvm-ir.rs:14:5
|
||||
|
|
||||
LL | type F<'a>: Fn() -> u32;
|
||||
| ----------- required by this bound in `Fun::F`
|
||||
@ -22,6 +13,6 @@ help: consider restricting type parameter `T`
|
||||
LL | impl<T: std::ops::Fn<()>> Fun for T {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68643
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: Fn() -> u32;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68643-broken-mir.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0277]: expected a `Fn<()>` closure, found `T`
|
||||
--> $DIR/issue-68643-broken-mir.rs:15:5
|
||||
--> $DIR/issue-68643-broken-mir.rs:14:5
|
||||
|
|
||||
LL | type F<'a>: Fn() -> u32;
|
||||
| ----------- required by this bound in `Fun::F`
|
||||
@ -22,6 +13,6 @@ help: consider restricting type parameter `T`
|
||||
LL | impl<T: std::ops::Fn<()>> Fun for T {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68644
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: Fn() -> u32;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68644-codegen-selection.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0277]: expected a `Fn<()>` closure, found `T`
|
||||
--> $DIR/issue-68644-codegen-selection.rs:15:5
|
||||
--> $DIR/issue-68644-codegen-selection.rs:14:5
|
||||
|
|
||||
LL | type F<'a>: Fn() -> u32;
|
||||
| ----------- required by this bound in `Fun::F`
|
||||
@ -22,6 +13,6 @@ help: consider restricting type parameter `T`
|
||||
LL | impl<T: std::ops::Fn<()>> Fun for T {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68645
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: Fn() -> u32;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68645-codegen-fulfillment.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0277]: expected a `Fn<()>` closure, found `T`
|
||||
--> $DIR/issue-68645-codegen-fulfillment.rs:15:5
|
||||
--> $DIR/issue-68645-codegen-fulfillment.rs:14:5
|
||||
|
|
||||
LL | type F<'a>: Fn() -> u32;
|
||||
| ----------- required by this bound in `Fun::F`
|
||||
@ -22,6 +13,6 @@ help: consider restricting type parameter `T`
|
||||
LL | impl<T: std::ops::Fn<()>> Fun for T {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// check-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
|
||||
trait Fun {
|
||||
|
@ -1,11 +0,0 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68648-1.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait Fun {
|
||||
type F<'a>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68648-2.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-68648-2.rs:15:17
|
||||
--> $DIR/issue-68648-2.rs:14:17
|
||||
|
|
||||
LL | fn bug<'a, T: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
|
||||
| - this type parameter
|
||||
@ -18,6 +9,6 @@ LL | T::identity(())
|
||||
= note: expected type parameter `T`
|
||||
found unit type `()`
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// check-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait Fun {
|
||||
type F<'a>;
|
||||
|
@ -1,11 +0,0 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68649-pass.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
// check-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Fun {
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #68656
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete and may not
|
||||
|
||||
trait UnsafeCopy<T: Copy> {
|
||||
type Item<'a>: std::ops::Deref<Target = T>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-68656-unsized-values.rs:3:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
|
||||
--> $DIR/issue-68656-unsized-values.rs:16:5
|
||||
--> $DIR/issue-68656-unsized-values.rs:15:5
|
||||
|
|
||||
LL | type Item<'a>: std::ops::Deref<Target = T>;
|
||||
| ---------- required by this bound in `UnsafeCopy::Item`
|
||||
@ -25,6 +16,6 @@ help: consider further restricting this bound
|
||||
LL | impl<T: Copy + std::ops::Deref + Deref<Target = T>> UnsafeCopy<T> for T {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0271`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
// check-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Document {
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Document {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/issue-70304.rs:55:41
|
||||
--> $DIR/issue-70304.rs:54:41
|
||||
|
|
||||
LL | fn create_doc() -> impl Document<Cursor<'_> = DocCursorImpl<'_>> {
|
||||
| ^^ expected named lifetime parameter
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Provider {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `Provider::A`
|
||||
--> $DIR/issue-71176.rs:13:27
|
||||
--> $DIR/issue-71176.rs:12:27
|
||||
|
|
||||
LL | inner: Box<dyn Provider<A = B>>,
|
||||
| ^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/issue-71176.rs:5:10
|
||||
--> $DIR/issue-71176.rs:4:10
|
||||
|
|
||||
LL | type A<'a>;
|
||||
| ^ --
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: ?Sized;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-74684-1.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0597]: `a` does not live long enough
|
||||
--> $DIR/issue-74684-1.rs:16:26
|
||||
--> $DIR/issue-74684-1.rs:15:26
|
||||
|
|
||||
LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(_ : Box<T>) -> &'static T::F<'a> {
|
||||
| -- lifetime `'a` defined here
|
||||
@ -22,6 +13,6 @@ LL | let _x = T::identity(&a);
|
||||
LL | }
|
||||
| - `a` dropped here while still borrowed
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0597`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING: the feature `generic_associated_types` is incomplete
|
||||
|
||||
trait Fun {
|
||||
type F<'a>: ?Sized;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-74684-2.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0271]: type mismatch resolving `<{integer} as Fun>::F<'_> == [u8]`
|
||||
--> $DIR/issue-74684-2.rs:24:5
|
||||
--> $DIR/issue-74684-2.rs:23:5
|
||||
|
|
||||
LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(t: Box<T>) -> &'static T::F<'a> {
|
||||
| ------------ required by this bound in `bug`
|
||||
@ -16,6 +7,6 @@ LL | fn bug<'a, T: ?Sized + Fun<F<'a> = [u8]>>(t: Box<T>) -> &'static T::F<'a> {
|
||||
LL | bug(Box::new(x));
|
||||
| ^^^ expected slice `[u8]`, found `i32`
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0271`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![feature(associated_type_defaults)]
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait1 {
|
||||
fn foo();
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0277]: the trait bound `Self: Trait1` is not satisfied
|
||||
--> $DIR/issue-74816.rs:10:5
|
||||
--> $DIR/issue-74816.rs:9:5
|
||||
|
|
||||
LL | type Associated: Trait1 = Self;
|
||||
| ^^^^^^^^^^^^^^^^^------^^^^^^^^
|
||||
@ -13,7 +13,7 @@ LL | trait Trait2: Trait1 {
|
||||
| ^^^^^^^^
|
||||
|
||||
error[E0277]: the size for values of type `Self` cannot be known at compilation time
|
||||
--> $DIR/issue-74816.rs:10:5
|
||||
--> $DIR/issue-74816.rs:9:5
|
||||
|
|
||||
LL | type Associated: Trait1 = Self;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![feature(generic_associated_types)]
|
||||
#![feature(associated_type_defaults)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0277]: the trait bound `Box<T>: Copy` is not satisfied
|
||||
--> $DIR/issue-74824.rs:8:5
|
||||
--> $DIR/issue-74824.rs:7:5
|
||||
|
|
||||
LL | type Copy<T>: Copy = Box<T>;
|
||||
| ^^^^^^^^^^^^^^----^^^^^^^^^^
|
||||
@ -8,7 +8,7 @@ LL | type Copy<T>: Copy = Box<T>;
|
||||
| the trait `Copy` is not implemented for `Box<T>`
|
||||
|
||||
error[E0277]: the trait bound `T: Clone` is not satisfied
|
||||
--> $DIR/issue-74824.rs:8:5
|
||||
--> $DIR/issue-74824.rs:7:5
|
||||
|
|
||||
LL | type Copy<T>: Copy = Box<T>;
|
||||
| ^^^^^^^^^^^^^^----^^^^^^^^^^
|
||||
|
@ -1,7 +1,6 @@
|
||||
// check-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Marker {}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature
|
||||
|
||||
pub trait SubTrait {}
|
||||
|
||||
|
@ -1,20 +1,11 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/issue-76535.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0107]: missing generics for associated type `SuperTrait::SubType`
|
||||
--> $DIR/issue-76535.rs:37:33
|
||||
--> $DIR/issue-76535.rs:36:33
|
||||
|
|
||||
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
|
||||
| ^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/issue-76535.rs:7:10
|
||||
--> $DIR/issue-76535.rs:6:10
|
||||
|
|
||||
LL | type SubType<'a>: SubTrait;
|
||||
| ^^^^^^^ --
|
||||
@ -24,14 +15,14 @@ LL | let sub: Box<dyn SuperTrait<SubType<'a> = SubStruct>> = Box::new(SuperS
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0038]: the trait `SuperTrait` cannot be made into an object
|
||||
--> $DIR/issue-76535.rs:37:14
|
||||
--> $DIR/issue-76535.rs:36:14
|
||||
|
|
||||
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `SubType` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-76535.rs:7:10
|
||||
--> $DIR/issue-76535.rs:6:10
|
||||
|
|
||||
LL | pub trait SuperTrait {
|
||||
| ---------- this trait cannot be made into an object...
|
||||
@ -39,14 +30,14 @@ LL | type SubType<'a>: SubTrait;
|
||||
| ^^^^^^^ ...because it contains the generic associated type `SubType`
|
||||
|
||||
error[E0038]: the trait `SuperTrait` cannot be made into an object
|
||||
--> $DIR/issue-76535.rs:37:57
|
||||
--> $DIR/issue-76535.rs:36:57
|
||||
|
|
||||
LL | let sub: Box<dyn SuperTrait<SubType = SubStruct>> = Box::new(SuperStruct::new(0));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `SuperTrait` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `SubType` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-76535.rs:7:10
|
||||
--> $DIR/issue-76535.rs:6:10
|
||||
|
|
||||
LL | pub trait SuperTrait {
|
||||
| ---------- this trait cannot be made into an object...
|
||||
@ -55,7 +46,7 @@ LL | type SubType<'a>: SubTrait;
|
||||
= note: required because of the requirements on the impl of `CoerceUnsized<Box<dyn SuperTrait<SubType = SubStruct<'_>>>>` for `Box<SuperStruct>`
|
||||
= note: required by cast to type `Box<dyn SuperTrait<SubType = SubStruct<'_>>>`
|
||||
|
||||
error: aborting due to 3 previous errors; 1 warning emitted
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0038, E0107.
|
||||
For more information about an error, try `rustc --explain E0038`.
|
||||
|
@ -1,7 +1,6 @@
|
||||
// run-pass
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub trait Iter {
|
||||
type Item<'a> where Self: 'a;
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait CollectionFamily {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `CollectionFamily::Member`
|
||||
--> $DIR/issue-78671.rs:8:47
|
||||
--> $DIR/issue-78671.rs:7:47
|
||||
|
|
||||
LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
|
||||
| ^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated type defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/issue-78671.rs:5:10
|
||||
--> $DIR/issue-78671.rs:4:10
|
||||
|
|
||||
LL | type Member<T>;
|
||||
| ^^^^^^ -
|
||||
@ -15,14 +15,14 @@ LL | Box::new(Family) as &dyn CollectionFamily<Member<T>=usize>
|
||||
| ^^^^^^^^^
|
||||
|
||||
error[E0038]: the trait `CollectionFamily` cannot be made into an object
|
||||
--> $DIR/issue-78671.rs:8:25
|
||||
--> $DIR/issue-78671.rs:7:25
|
||||
|
|
||||
LL | Box::new(Family) as &dyn CollectionFamily<Member=usize>
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `CollectionFamily` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `Member` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-78671.rs:5:10
|
||||
--> $DIR/issue-78671.rs:4:10
|
||||
|
|
||||
LL | trait CollectionFamily {
|
||||
| ---------------- this trait cannot be made into an object...
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait RefCont<'a, T> {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `MapLike::VRefCont`
|
||||
--> $DIR/issue-79422.rs:43:36
|
||||
--> $DIR/issue-79422.rs:42:36
|
||||
|
|
||||
LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
|
||||
| ^^^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/issue-79422.rs:21:10
|
||||
--> $DIR/issue-79422.rs:20:10
|
||||
|
|
||||
LL | type VRefCont<'a>: RefCont<'a, V>;
|
||||
| ^^^^^^^^ --
|
||||
@ -15,14 +15,14 @@ LL | as Box<dyn MapLike<u8, u8, VRefCont<'a> = dyn RefCont<'_, u8>>>;
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
error[E0038]: the trait `MapLike` cannot be made into an object
|
||||
--> $DIR/issue-79422.rs:43:12
|
||||
--> $DIR/issue-79422.rs:42:12
|
||||
|
|
||||
LL | as Box<dyn MapLike<u8, u8, VRefCont = dyn RefCont<'_, u8>>>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `VRefCont` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-79422.rs:21:10
|
||||
--> $DIR/issue-79422.rs:20:10
|
||||
|
|
||||
LL | trait MapLike<K, V> {
|
||||
| ------- this trait cannot be made into an object...
|
||||
@ -30,14 +30,14 @@ LL | type VRefCont<'a>: RefCont<'a, V>;
|
||||
| ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
|
||||
|
||||
error[E0038]: the trait `MapLike` cannot be made into an object
|
||||
--> $DIR/issue-79422.rs:42:13
|
||||
--> $DIR/issue-79422.rs:41:13
|
||||
|
|
||||
LL | let m = Box::new(std::collections::BTreeMap::<u8, u8>::new())
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `MapLike` cannot be made into an object
|
||||
|
|
||||
= help: consider moving `VRefCont` to another trait
|
||||
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
|
||||
--> $DIR/issue-79422.rs:21:10
|
||||
--> $DIR/issue-79422.rs:20:10
|
||||
|
|
||||
LL | trait MapLike<K, V> {
|
||||
| ------- this trait cannot be made into an object...
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait Monad {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `Monad::Wrapped`
|
||||
--> $DIR/issue-79636-1.rs:16:34
|
||||
--> $DIR/issue-79636-1.rs:15:34
|
||||
|
|
||||
LL | MInner: Monad<Unwrapped = A, Wrapped = MOuter::Wrapped<A>>,
|
||||
| ^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated type defined here, with 1 generic parameter: `B`
|
||||
--> $DIR/issue-79636-1.rs:6:10
|
||||
--> $DIR/issue-79636-1.rs:5:10
|
||||
|
|
||||
LL | type Wrapped<B>;
|
||||
| ^^^^^^^ -
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait SomeTrait {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `SomeTrait::Wrapped`
|
||||
--> $DIR/issue-79636-2.rs:12:18
|
||||
--> $DIR/issue-79636-2.rs:11:18
|
||||
|
|
||||
LL | W: SomeTrait<Wrapped = W>,
|
||||
| ^^^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated type defined here, with 1 generic parameter: `A`
|
||||
--> $DIR/issue-79636-2.rs:5:10
|
||||
--> $DIR/issue-79636-2.rs:4:10
|
||||
|
|
||||
LL | type Wrapped<A>: SomeTrait;
|
||||
| ^^^^^^^ -
|
||||
|
@ -1,6 +1,5 @@
|
||||
// check-pass
|
||||
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
struct E {}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
#[derive(Default)]
|
||||
struct E<T> {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `TestMut::Output`
|
||||
--> $DIR/issue-80433.rs:24:47
|
||||
--> $DIR/issue-80433.rs:23:47
|
||||
|
|
||||
LL | fn test_simpler<'a>(dst: &'a mut impl TestMut<Output = &'a mut f32>)
|
||||
| ^^^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/issue-80433.rs:10:10
|
||||
--> $DIR/issue-80433.rs:9:10
|
||||
|
|
||||
LL | type Output<'a>;
|
||||
| ^^^^^^ --
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test for #81712.
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait A {
|
||||
type BType: B<AType = Self>;
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `C::DType`
|
||||
--> $DIR/issue-81712-cyclic-traits.rs:17:19
|
||||
--> $DIR/issue-81712-cyclic-traits.rs:16:19
|
||||
|
|
||||
LL | type CType: C<DType = Self>;
|
||||
| ^^^^^ expected 1 generic argument
|
||||
|
|
||||
note: associated type defined here, with 1 generic parameter: `T`
|
||||
--> $DIR/issue-81712-cyclic-traits.rs:14:10
|
||||
--> $DIR/issue-81712-cyclic-traits.rs:13:10
|
||||
|
|
||||
LL | type DType<T>: D<T, CType = Self>;
|
||||
| ^^^^^ -
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
trait StreamingIterator {
|
||||
|
@ -1,11 +1,11 @@
|
||||
error[E0107]: missing generics for associated type `StreamingIterator::Item`
|
||||
--> $DIR/issue-81862.rs:6:40
|
||||
--> $DIR/issue-81862.rs:5:40
|
||||
|
|
||||
LL | fn next(&mut self) -> Option<Self::Item>;
|
||||
| ^^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: associated type defined here, with 1 lifetime parameter: `'a`
|
||||
--> $DIR/issue-81862.rs:5:10
|
||||
--> $DIR/issue-81862.rs:4:10
|
||||
|
|
||||
LL | type Item<'a>;
|
||||
| ^^^^ --
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Regression test of #86483.
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
pub trait IceIce<T> //~ ERROR: the parameter type `T` may not live long enough
|
||||
where
|
||||
|
@ -1,5 +1,5 @@
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/issue-86483.rs:6:1
|
||||
--> $DIR/issue-86483.rs:5:1
|
||||
|
|
||||
LL | pub trait IceIce<T>
|
||||
| ^ - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
@ -14,7 +14,7 @@ LL | | }
|
||||
| |_^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
||||
error[E0311]: the parameter type `T` may not live long enough
|
||||
--> $DIR/issue-86483.rs:10:5
|
||||
--> $DIR/issue-86483.rs:9:5
|
||||
|
|
||||
LL | pub trait IceIce<T>
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'a`
|
||||
@ -23,7 +23,7 @@ LL | type Ice<'v>: IntoIterator<Item = &'v T>;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
|
||||
|
||||
error[E0309]: the parameter type `T` may not live long enough
|
||||
--> $DIR/issue-86483.rs:10:32
|
||||
--> $DIR/issue-86483.rs:9:32
|
||||
|
|
||||
LL | pub trait IceIce<T>
|
||||
| - help: consider adding an explicit lifetime bound...: `T: 'v`
|
||||
|
@ -1,4 +1,3 @@
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(generic_associated_types)]
|
||||
|
||||
// run-pass
|
||||
|
@ -2,9 +2,6 @@
|
||||
// generics for a generic associated type.
|
||||
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types` is incomplete
|
||||
//~| NOTE `#[warn(incomplete_features)]` on by default
|
||||
//~| NOTE see issue #44265
|
||||
|
||||
trait X {
|
||||
type Y<T>;
|
||||
|
@ -1,14 +1,5 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/method-unsatified-assoc-type-predicate.rs:4:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0599]: the method `f` exists for struct `S`, but its trait bounds were not satisfied
|
||||
--> $DIR/method-unsatified-assoc-type-predicate.rs:29:7
|
||||
--> $DIR/method-unsatified-assoc-type-predicate.rs:26:7
|
||||
|
|
||||
LL | struct S;
|
||||
| ---------
|
||||
@ -24,6 +15,6 @@ LL | a.f();
|
||||
`<S as X>::Y<i32> = i32`
|
||||
which is required by `S: M`
|
||||
|
||||
error: aborting due to previous error; 1 warning emitted
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0599`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature `generic_associated_types`
|
||||
|
||||
trait X {
|
||||
type Y<'a, 'b>;
|
||||
|
@ -1,20 +1,11 @@
|
||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||
--> $DIR/missing_lifetime_args.rs:1:12
|
||||
|
|
||||
LL | #![feature(generic_associated_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(incomplete_features)]` on by default
|
||||
= note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
|
||||
|
||||
error[E0107]: missing generics for associated type `X::Y`
|
||||
--> $DIR/missing_lifetime_args.rs:14:32
|
||||
--> $DIR/missing_lifetime_args.rs:13:32
|
||||
|
|
||||
LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y = (&'c u32, &'d u32)>>) {}
|
||||
| ^ expected 2 lifetime arguments
|
||||
|
|
||||
note: associated type defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/missing_lifetime_args.rs:5:10
|
||||
--> $DIR/missing_lifetime_args.rs:4:10
|
||||
|
|
||||
LL | type Y<'a, 'b>;
|
||||
| ^ -- --
|
||||
@ -24,7 +15,7 @@ LL | fn foo<'c, 'd>(_arg: Box<dyn X<Y<'c, 'd> = (&'c u32, &'d u32)>>) {}
|
||||
| ^^^^^^^^^
|
||||
|
||||
error[E0107]: this struct takes 3 lifetime arguments but 2 lifetime arguments were supplied
|
||||
--> $DIR/missing_lifetime_args.rs:17:26
|
||||
--> $DIR/missing_lifetime_args.rs:16:26
|
||||
|
|
||||
LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
||||
| ^^^ -- -- supplied 2 lifetime arguments
|
||||
@ -32,7 +23,7 @@ LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b>) {}
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c`
|
||||
--> $DIR/missing_lifetime_args.rs:8:8
|
||||
--> $DIR/missing_lifetime_args.rs:7:8
|
||||
|
|
||||
LL | struct Foo<'a, 'b, 'c> {
|
||||
| ^^^ -- -- --
|
||||
@ -42,7 +33,7 @@ LL | fn bar<'a, 'b, 'c>(_arg: Foo<'a, 'b, 'a>) {}
|
||||
| ^^^^
|
||||
|
||||
error[E0107]: this struct takes 3 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/missing_lifetime_args.rs:20:16
|
||||
--> $DIR/missing_lifetime_args.rs:19:16
|
||||
|
|
||||
LL | fn f<'a>(_arg: Foo<'a>) {}
|
||||
| ^^^ -- supplied 1 lifetime argument
|
||||
@ -50,7 +41,7 @@ LL | fn f<'a>(_arg: Foo<'a>) {}
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: struct defined here, with 3 lifetime parameters: `'a`, `'b`, `'c`
|
||||
--> $DIR/missing_lifetime_args.rs:8:8
|
||||
--> $DIR/missing_lifetime_args.rs:7:8
|
||||
|
|
||||
LL | struct Foo<'a, 'b, 'c> {
|
||||
| ^^^ -- -- --
|
||||
@ -59,6 +50,6 @@ help: add missing lifetime arguments
|
||||
LL | fn f<'a>(_arg: Foo<'a, 'b, 'c>) {}
|
||||
| ^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors; 1 warning emitted
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
||||
|
@ -1,5 +1,4 @@
|
||||
#![feature(generic_associated_types)]
|
||||
//~^ WARNING the feature
|
||||
|
||||
trait Foo {
|
||||
type Assoc<'a, const N: usize>;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user