-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the generic_associated_types_extended feature
- Loading branch information
Showing
14 changed files
with
261 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#![feature(generic_associated_types)] | ||
|
||
// This feature doesn't *currently* fire on any specific code; it's just a | ||
// behavior change. Future changes might. | ||
#[rustc_error] //~ the | ||
fn main() {} |
11 changes: 11 additions & 0 deletions
11
src/test/ui/feature-gates/feature-gate-generic_associated_types_extended.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0658]: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable | ||
--> $DIR/feature-gate-generic_associated_types_extended.rs:5:1 | ||
| | ||
LL | #[rustc_error] | ||
| ^^^^^^^^^^^^^^ | ||
| | ||
= help: add `#![feature(rustc_attrs)]` to the crate attributes to enable | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0658`. |
12 changes: 12 additions & 0 deletions
12
src/test/ui/generic-associated-types/extended/lending_iterator.base.nll.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0276]: impl has stricter requirements than trait | ||
--> $DIR/lending_iterator.rs:14:45 | ||
| | ||
LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self; | ||
| ------------------------------------------------------------------------ definition of `from_iter` from trait | ||
... | ||
LL | fn from_iter<I: for<'x> LendingIterator<Item<'x> = A>>(mut iter: I) -> Self { | ||
| ^^^^^^^^^^^^ impl has extra requirement `I: 'x` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0276`. |
26 changes: 26 additions & 0 deletions
26
src/test/ui/generic-associated-types/extended/lending_iterator.base.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
error[E0276]: impl has stricter requirements than trait | ||
--> $DIR/lending_iterator.rs:14:45 | ||
| | ||
LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self; | ||
| ------------------------------------------------------------------------ definition of `from_iter` from trait | ||
... | ||
LL | fn from_iter<I: for<'x> LendingIterator<Item<'x> = A>>(mut iter: I) -> Self { | ||
| ^^^^^^^^^^^^ impl has extra requirement `I: 'x` | ||
|
||
error[E0311]: the parameter type `Self` may not live long enough | ||
--> $DIR/lending_iterator.rs:35:9 | ||
| | ||
LL | <B as FromLendingIterator<A>>::from_iter(self) | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: consider adding an explicit lifetime bound `Self: 'a`... | ||
= note: ...so that the type `Self` will meet its required lifetime bounds... | ||
note: ...that is required by this bound | ||
--> $DIR/lending_iterator.rs:10:45 | ||
| | ||
LL | fn from_iter<T: for<'x> LendingIterator<Item<'x> = A>>(iter: T) -> Self; | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0276`. |
Oops, something went wrong.