Remove impl trait bindings handling on const AST lowering
This commit is contained in:
parent
bc106ebb5a
commit
4d2d90307d
8 changed files with 104 additions and 238 deletions
|
@ -484,17 +484,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
||||||
span: Span,
|
span: Span,
|
||||||
body: Option<&Expr>,
|
body: Option<&Expr>,
|
||||||
) -> (&'hir hir::Ty<'hir>, hir::BodyId) {
|
) -> (&'hir hir::Ty<'hir>, hir::BodyId) {
|
||||||
let mut capturable_lifetimes;
|
let ty = self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Binding));
|
||||||
let itctx = if self.sess.features_untracked().impl_trait_in_bindings {
|
|
||||||
capturable_lifetimes = FxHashSet::default();
|
|
||||||
ImplTraitContext::TypeAliasesOpaqueTy {
|
|
||||||
capturable_lifetimes: &mut capturable_lifetimes,
|
|
||||||
origin: hir::OpaqueTyOrigin::Misc,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ImplTraitContext::Disallowed(ImplTraitPosition::Binding)
|
|
||||||
};
|
|
||||||
let ty = self.lower_ty(ty, itctx);
|
|
||||||
(ty, self.lower_const_body(span, body))
|
(ty, self.lower_const_body(span, body))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,55 +232,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:73:39
|
--> $DIR/duplicate.rs:73:35
|
||||||
|
|
|
||||||
LL | const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:75:39
|
|
||||||
|
|
|
||||||
LL | const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:77:42
|
|
||||||
|
|
|
||||||
LL | const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
| ------------- ^^^^^^^^^^^^^ 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:79:40
|
|
||||||
|
|
|
||||||
LL | static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:81:40
|
|
||||||
|
|
|
||||||
LL | static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:83:43
|
|
||||||
|
|
|
||||||
LL | static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
| ------------- ^^^^^^^^^^^^^ 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:86:35
|
|
||||||
|
|
|
|
||||||
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -288,7 +240,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:88:35
|
--> $DIR/duplicate.rs:75:35
|
||||||
|
|
|
|
||||||
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -296,7 +248,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:90:38
|
--> $DIR/duplicate.rs:77:38
|
||||||
|
|
|
|
||||||
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -304,7 +256,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:92:44
|
--> $DIR/duplicate.rs:79:44
|
||||||
|
|
|
|
||||||
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -312,7 +264,7 @@ LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:94:44
|
--> $DIR/duplicate.rs:81:44
|
||||||
|
|
|
|
||||||
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -320,7 +272,7 @@ LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:96:47
|
--> $DIR/duplicate.rs:83:47
|
||||||
|
|
|
|
||||||
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -328,7 +280,7 @@ LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:99:36
|
--> $DIR/duplicate.rs:86:36
|
||||||
|
|
|
|
||||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -336,7 +288,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:101:36
|
--> $DIR/duplicate.rs:88:36
|
||||||
|
|
|
|
||||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -344,7 +296,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:103:39
|
--> $DIR/duplicate.rs:90:39
|
||||||
|
|
|
|
||||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -352,7 +304,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:105:40
|
--> $DIR/duplicate.rs:92:40
|
||||||
|
|
|
|
||||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -360,7 +312,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:107:40
|
--> $DIR/duplicate.rs:94:40
|
||||||
|
|
|
|
||||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -368,7 +320,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:109:43
|
--> $DIR/duplicate.rs:96:43
|
||||||
|
|
|
|
||||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -376,7 +328,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:112:36
|
--> $DIR/duplicate.rs:99:36
|
||||||
|
|
|
|
||||||
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -384,7 +336,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:114:36
|
--> $DIR/duplicate.rs:101:36
|
||||||
|
|
|
|
||||||
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -392,7 +344,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:116:39
|
--> $DIR/duplicate.rs:103:39
|
||||||
|
|
|
|
||||||
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -400,7 +352,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:118:34
|
--> $DIR/duplicate.rs:105:34
|
||||||
|
|
|
|
||||||
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -408,7 +360,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:120:34
|
--> $DIR/duplicate.rs:107:34
|
||||||
|
|
|
|
||||||
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -416,7 +368,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:122:37
|
--> $DIR/duplicate.rs:109:37
|
||||||
|
|
|
|
||||||
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -424,7 +376,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:124:45
|
--> $DIR/duplicate.rs:111:45
|
||||||
|
|
|
|
||||||
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -432,7 +384,7 @@ LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:126:45
|
--> $DIR/duplicate.rs:113:45
|
||||||
|
|
|
|
||||||
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -440,7 +392,7 @@ LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:128:48
|
--> $DIR/duplicate.rs:115:48
|
||||||
|
|
|
|
||||||
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -448,7 +400,7 @@ LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:130:46
|
--> $DIR/duplicate.rs:117:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -456,7 +408,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:130:46
|
--> $DIR/duplicate.rs:117:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -464,7 +416,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:133:46
|
--> $DIR/duplicate.rs:120:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -472,7 +424,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:133:46
|
--> $DIR/duplicate.rs:120:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -480,7 +432,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:136:49
|
--> $DIR/duplicate.rs:123:49
|
||||||
|
|
|
|
||||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -488,7 +440,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:136:49
|
--> $DIR/duplicate.rs:123:49
|
||||||
|
|
|
|
||||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -496,7 +448,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:146:40
|
--> $DIR/duplicate.rs:133:40
|
||||||
|
|
|
|
||||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -504,7 +456,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:148:44
|
--> $DIR/duplicate.rs:135:44
|
||||||
|
|
|
|
||||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -512,7 +464,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:150:43
|
--> $DIR/duplicate.rs:137:43
|
||||||
|
|
|
|
||||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -520,7 +472,7 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:139:43
|
--> $DIR/duplicate.rs:126:43
|
||||||
|
|
|
|
||||||
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -528,7 +480,7 @@ LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:141:43
|
--> $DIR/duplicate.rs:128:43
|
||||||
|
|
|
|
||||||
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -536,13 +488,13 @@ LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:143:46
|
--> $DIR/duplicate.rs:130:46
|
||||||
|
|
|
|
||||||
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
| |
|
| |
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error: aborting due to 66 previous errors; 2 warnings emitted
|
error: aborting due to 60 previous errors; 2 warnings emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0719`.
|
For more information about this error, try `rustc --explain E0719`.
|
||||||
|
|
|
@ -224,55 +224,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:73:39
|
--> $DIR/duplicate.rs:73:35
|
||||||
|
|
|
||||||
LL | const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:75:39
|
|
||||||
|
|
|
||||||
LL | const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:77:42
|
|
||||||
|
|
|
||||||
LL | const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
| ------------- ^^^^^^^^^^^^^ 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:79:40
|
|
||||||
|
|
|
||||||
LL | static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:81:40
|
|
||||||
|
|
|
||||||
LL | static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
| ---------- ^^^^^^^^^^ 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:83:43
|
|
||||||
|
|
|
||||||
LL | static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
| ------------- ^^^^^^^^^^^^^ 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:86:35
|
|
||||||
|
|
|
|
||||||
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -280,7 +232,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:88:35
|
--> $DIR/duplicate.rs:75:35
|
||||||
|
|
|
|
||||||
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -288,7 +240,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:90:38
|
--> $DIR/duplicate.rs:77:38
|
||||||
|
|
|
|
||||||
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -296,7 +248,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:92:44
|
--> $DIR/duplicate.rs:79:44
|
||||||
|
|
|
|
||||||
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -304,7 +256,7 @@ LL | type TAW1<T> where T: Iterator<Item: Copy, Item: Send> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:94:44
|
--> $DIR/duplicate.rs:81:44
|
||||||
|
|
|
|
||||||
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -312,7 +264,7 @@ LL | type TAW2<T> where T: Iterator<Item: Copy, Item: Copy> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:96:47
|
--> $DIR/duplicate.rs:83:47
|
||||||
|
|
|
|
||||||
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -320,7 +272,7 @@ LL | type TAW3<T> where T: Iterator<Item: 'static, Item: 'static> = T;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:99:36
|
--> $DIR/duplicate.rs:86:36
|
||||||
|
|
|
|
||||||
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -328,7 +280,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:101:36
|
--> $DIR/duplicate.rs:88:36
|
||||||
|
|
|
|
||||||
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -336,7 +288,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:103:39
|
--> $DIR/duplicate.rs:90:39
|
||||||
|
|
|
|
||||||
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -344,7 +296,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:105:40
|
--> $DIR/duplicate.rs:92:40
|
||||||
|
|
|
|
||||||
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -352,7 +304,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:107:40
|
--> $DIR/duplicate.rs:94:40
|
||||||
|
|
|
|
||||||
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -360,7 +312,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:109:43
|
--> $DIR/duplicate.rs:96:43
|
||||||
|
|
|
|
||||||
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -368,7 +320,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:112:36
|
--> $DIR/duplicate.rs:99:36
|
||||||
|
|
|
|
||||||
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -376,7 +328,7 @@ LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:114:36
|
--> $DIR/duplicate.rs:101:36
|
||||||
|
|
|
|
||||||
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -384,7 +336,7 @@ LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:116:39
|
--> $DIR/duplicate.rs:103:39
|
||||||
|
|
|
|
||||||
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -392,7 +344,7 @@ LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:118:34
|
--> $DIR/duplicate.rs:105:34
|
||||||
|
|
|
|
||||||
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -400,7 +352,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:120:34
|
--> $DIR/duplicate.rs:107:34
|
||||||
|
|
|
|
||||||
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -408,7 +360,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:122:37
|
--> $DIR/duplicate.rs:109:37
|
||||||
|
|
|
|
||||||
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -416,7 +368,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:124:45
|
--> $DIR/duplicate.rs:111:45
|
||||||
|
|
|
|
||||||
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -424,7 +376,7 @@ LL | trait TRW1<T> where T: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:126:45
|
--> $DIR/duplicate.rs:113:45
|
||||||
|
|
|
|
||||||
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -432,7 +384,7 @@ LL | trait TRW2<T> where T: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:128:48
|
--> $DIR/duplicate.rs:115:48
|
||||||
|
|
|
|
||||||
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -440,7 +392,7 @@ LL | trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:130:46
|
--> $DIR/duplicate.rs:117:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -448,7 +400,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:130:46
|
--> $DIR/duplicate.rs:117:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -456,7 +408,7 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:133:46
|
--> $DIR/duplicate.rs:120:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -464,7 +416,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:133:46
|
--> $DIR/duplicate.rs:120:46
|
||||||
|
|
|
|
||||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -472,7 +424,7 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:136:49
|
--> $DIR/duplicate.rs:123:49
|
||||||
|
|
|
|
||||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -480,7 +432,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:136:49
|
--> $DIR/duplicate.rs:123:49
|
||||||
|
|
|
|
||||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -488,7 +440,7 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:146:40
|
--> $DIR/duplicate.rs:133:40
|
||||||
|
|
|
|
||||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -496,7 +448,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:148:44
|
--> $DIR/duplicate.rs:135:44
|
||||||
|
|
|
|
||||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -504,7 +456,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:150:43
|
--> $DIR/duplicate.rs:137:43
|
||||||
|
|
|
|
||||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
|
@ -512,7 +464,7 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:139:43
|
--> $DIR/duplicate.rs:126:43
|
||||||
|
|
|
|
||||||
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -520,7 +472,7 @@ LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:141:43
|
--> $DIR/duplicate.rs:128:43
|
||||||
|
|
|
|
||||||
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||||
| ---------- ^^^^^^^^^^ re-bound here
|
| ---------- ^^^^^^^^^^ re-bound here
|
||||||
|
@ -528,13 +480,13 @@ LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
|
||||||
--> $DIR/duplicate.rs:143:46
|
--> $DIR/duplicate.rs:130:46
|
||||||
|
|
|
|
||||||
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||||
| |
|
| |
|
||||||
| `Item` bound here first
|
| `Item` bound here first
|
||||||
|
|
||||||
error: aborting due to 66 previous errors; 1 warning emitted
|
error: aborting due to 60 previous errors; 1 warning emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0719`.
|
For more information about this error, try `rustc --explain E0719`.
|
||||||
|
|
|
@ -70,19 +70,6 @@ fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
|
||||||
fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
|
fn FAPIT3(_: impl 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]
|
||||||
|
|
||||||
const CIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
const CIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
const CIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
static SIT1: impl Iterator<Item: Copy, Item: Send> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
static SIT2: impl Iterator<Item: Copy, Item: Copy> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
static SIT3: impl Iterator<Item: 'static, Item: 'static> = iter::empty();
|
|
||||||
//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
|
|
||||||
|
|
||||||
type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
|
||||||
//~^ 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]
|
||||||
type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
#![feature(impl_trait_in_bindings)]
|
|
||||||
//~^ WARN the feature `impl_trait_in_bindings` is incomplete
|
|
||||||
|
|
||||||
fn a<T: Clone>(x: T) {
|
|
||||||
const foo: impl Clone = x;
|
|
||||||
//~^ ERROR attempt to use a non-constant value in a constant
|
|
||||||
}
|
|
||||||
|
|
||||||
fn b<T: Clone>(x: T) {
|
|
||||||
let _ = move || {
|
|
||||||
const foo: impl Clone = x;
|
|
||||||
//~^ ERROR attempt to use a non-constant value in a constant
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
trait Foo<T: Clone> {
|
|
||||||
fn a(x: T) {
|
|
||||||
const foo: impl Clone = x;
|
|
||||||
//~^ ERROR attempt to use a non-constant value in a constant
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T: Clone> Foo<T> for i32 {
|
|
||||||
fn a(x: T) {
|
|
||||||
const foo: impl Clone = x;
|
|
||||||
//~^ ERROR attempt to use a non-constant value in a constant
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() { }
|
|
|
@ -30,6 +30,38 @@ LL | const foo: impl Clone = x;
|
||||||
| |
|
| |
|
||||||
| help: consider using `let` instead of `const`: `let foo`
|
| help: consider using `let` instead of `const`: `let foo`
|
||||||
|
|
||||||
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
|
--> $DIR/bindings.rs:5:16
|
||||||
|
|
|
||||||
|
LL | const foo: impl Clone = x;
|
||||||
|
| ^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
|
--> $DIR/bindings.rs:11:20
|
||||||
|
|
|
||||||
|
LL | const foo: impl Clone = x;
|
||||||
|
| ^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
|
--> $DIR/bindings.rs:18:20
|
||||||
|
|
|
||||||
|
LL | const foo: impl Clone = x;
|
||||||
|
| ^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
||||||
|
--> $DIR/bindings.rs:25:20
|
||||||
|
|
|
||||||
|
LL | const foo: impl Clone = x;
|
||||||
|
| ^^^^^^^^^^
|
||||||
|
|
|
||||||
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
||||||
|
|
||||||
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
|
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||||
--> $DIR/bindings.rs:1:12
|
--> $DIR/bindings.rs:1:12
|
||||||
|
|
|
|
||||||
|
@ -39,6 +71,7 @@ LL | #![feature(impl_trait_in_bindings)]
|
||||||
= note: `#[warn(incomplete_features)]` on by default
|
= note: `#[warn(incomplete_features)]` on by default
|
||||||
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
|
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
|
||||||
|
|
||||||
error: aborting due to 4 previous errors; 1 warning emitted
|
error: aborting due to 8 previous errors; 1 warning emitted
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0435`.
|
Some errors have detailed explanations: E0435, E0562.
|
||||||
|
For more information about an error, try `rustc --explain E0435`.
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#![feature(impl_trait_in_bindings)]
|
|
||||||
#![allow(incomplete_features)]
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
const C: impl Copy = 0;
|
|
||||||
match C {
|
|
||||||
C | //~ ERROR: `impl Copy` cannot be used in patterns
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
error: `impl Copy` cannot be used in patterns
|
|
||||||
--> $DIR/issue-71042-opaquely-typed-constant-used-in-pattern.rs:7:9
|
|
||||||
|
|
|
||||||
LL | C |
|
|
||||||
| ^
|
|
||||||
|
|
||||||
error: aborting due to previous error
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue