forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#113188 - matthiaskrgr:rollup-j3abaks, r=matth…
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#107624 (Stabilize `const_cstr_methods`) - rust-lang#111403 (suggest `slice::swap` for `mem::swap(&mut x[0], &mut x[1])` borrowck error) - rust-lang#113071 (Account for late-bound vars from parent arg-position impl trait) - rust-lang#113165 (Encode item bounds for `DefKind::ImplTraitPlaceholder`) - rust-lang#113171 (Properly implement variances_of for RPITIT GAT) - rust-lang#113177 (Use structured suggestion when telling user about `for<'a>`) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
32 changed files
with
327 additions
and
99 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// check-pass | ||
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty | ||
// revisions: current next | ||
|
||
#![feature(return_position_impl_trait_in_trait)] | ||
|
||
trait Foo {} | ||
|
||
impl Foo for () {} | ||
|
||
trait ThreeCellFragment { | ||
fn ext_cells<'a>(&'a self) -> impl Foo + 'a { | ||
self.ext_adjacent_cells() | ||
} | ||
|
||
fn ext_adjacent_cells<'a>(&'a self) -> impl Foo + 'a; | ||
} | ||
|
||
fn main() {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
error: `impl Trait` can only mention lifetimes bound at the fn or impl level | ||
error: `impl Trait` can only mention lifetimes from an fn or impl | ||
--> $DIR/universal_wrong_hrtb.rs:5:73 | ||
| | ||
LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {} | ||
| ^^ | ||
| | ||
note: lifetime declared here | ||
--> $DIR/universal_wrong_hrtb.rs:5:39 | ||
| | ||
LL | fn test_argument_position(x: impl for<'a> Trait<'a, Assoc = impl Copy + 'a>) {} | ||
| ^^ | ||
| -- lifetime declared here ^^ | ||
|
||
error: aborting due to previous error | ||
|
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() {} |
Oops, something went wrong.