-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 #90314 - matthiaskrgr:rollup-ag1js8n, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #90296 (Remove fNN::lerp) - #90302 (Remove unneeded into_iter) - #90303 (Add regression test for issue 90164) - #90305 (Add regression test for #87258) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
12 changed files
with
104 additions
and
192 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#![feature(type_alias_impl_trait)] | ||
#![feature(generic_associated_types)] | ||
|
||
// See https://github.com/rust-lang/rust/issues/87258#issuecomment-883293367 | ||
|
||
trait Trait1 {} | ||
|
||
struct Struct<'b>(&'b ()); | ||
|
||
impl<'d> Trait1 for Struct<'d> {} | ||
|
||
pub trait Trait2 { | ||
type FooFuture<'a>: Trait1; | ||
fn foo<'a>() -> Self::FooFuture<'a>; | ||
} | ||
|
||
impl<'c, S: Trait2> Trait2 for &'c mut S { | ||
type FooFuture<'a> = impl Trait1; | ||
fn foo<'a>() -> Self::FooFuture<'a> { //~ ERROR | ||
Struct(unimplemented!()) | ||
} | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds | ||
--> $DIR/issue-87258_a.rs:19:21 | ||
| | ||
LL | fn foo<'a>() -> Self::FooFuture<'a> { | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: hidden type `Struct<'_>` captures lifetime '_#7r | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0700`. |
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 @@ | ||
#![feature(type_alias_impl_trait)] | ||
#![feature(generic_associated_types)] | ||
|
||
// See https://github.com/rust-lang/rust/issues/87258#issuecomment-883293367 | ||
|
||
trait Trait1 {} | ||
|
||
struct Struct<'b>(&'b ()); | ||
|
||
impl<'d> Trait1 for Struct<'d> {} | ||
|
||
pub trait Trait2 { | ||
type FooFuture<'a>: Trait1; | ||
fn foo<'a>() -> Self::FooFuture<'a>; | ||
} | ||
|
||
type Helper<'xenon, 'yttrium, KABOOM: Trait2> = impl Trait1; | ||
|
||
impl<'c, S: Trait2> Trait2 for &'c mut S { | ||
type FooFuture<'a> = Helper<'c, 'a, S>; | ||
fn foo<'a>() -> Self::FooFuture<'a> { //~ ERROR | ||
Struct(unimplemented!()) | ||
} | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds | ||
--> $DIR/issue-87258_b.rs:21:21 | ||
| | ||
LL | fn foo<'a>() -> Self::FooFuture<'a> { | ||
| ^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: hidden type `Struct<'_>` captures lifetime '_#7r | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0700`. |
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,9 @@ | ||
fn copy<R: Unpin, W>(_: R, _: W) {} | ||
|
||
fn f<T>(r: T) { | ||
let w = (); | ||
copy(r, w); | ||
//~^ ERROR [E0277] | ||
} | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
error[E0277]: `T` cannot be unpinned | ||
--> $DIR/issue-90164.rs:5:10 | ||
| | ||
LL | copy(r, w); | ||
| ---- ^ the trait `Unpin` is not implemented for `T` | ||
| | | ||
| required by a bound introduced by this call | ||
| | ||
= note: consider using `Box::pin` | ||
note: required by a bound in `copy` | ||
--> $DIR/issue-90164.rs:1:12 | ||
| | ||
LL | fn copy<R: Unpin, W>(_: R, _: W) {} | ||
| ^^^^^ required by this bound in `copy` | ||
help: consider restricting type parameter `T` | ||
| | ||
LL | fn f<T: std::marker::Unpin>(r: T) { | ||
| ++++++++++++++++++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |