-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for late-bound vars from parent arg-position impl trait
- Loading branch information
1 parent
6f8c27a
commit 26cd548
Showing
5 changed files
with
97 additions
and
0 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
11 changes: 11 additions & 0 deletions
11
tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.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,11 @@ | ||
#![feature(non_lifetime_binders)] | ||
//~^ WARN the feature `non_lifetime_binders` is incomplete | ||
|
||
trait Trait<Input> { | ||
type Assoc; | ||
} | ||
|
||
fn uwu(_: impl for<T> Trait<(), Assoc = impl Trait<T>>) {} | ||
//~^ ERROR `impl Trait` can only mention type parameters from an fn or impl | ||
|
||
fn main() {} |
17 changes: 17 additions & 0 deletions
17
tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.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,17 @@ | ||
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/nested-apit-mentioning-outer-bound-var.rs:1:12 | ||
| | ||
LL | #![feature(non_lifetime_binders)] | ||
| ^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information | ||
= note: `#[warn(incomplete_features)]` on by default | ||
|
||
error: `impl Trait` can only mention type parameters from an fn or impl | ||
--> $DIR/nested-apit-mentioning-outer-bound-var.rs:8:52 | ||
| | ||
LL | fn uwu(_: impl for<T> Trait<(), Assoc = impl Trait<T>>) {} | ||
| - type parameter declared here ^ | ||
|
||
error: aborting due to previous error; 1 warning emitted | ||
|