forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#115722 - Mark-Simulacrum:beta-backport, r=Mar…
…k-Simulacrum [beta] backport This PR backports: - rust-lang#115559: implied bounds: do not ICE on unconstrained region vars - rust-lang#115446: fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized and (later) moved to beta - rust-lang#115276: rustdoc: correctly deal with self ty params when eliding default object lifetimes r? `@Mark-Simulacrum`
- Loading branch information
Showing
8 changed files
with
111 additions
and
18 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,28 @@ | ||
// check-pass | ||
|
||
// Regression test for #112832. | ||
pub trait QueryDb { | ||
type Db; | ||
} | ||
|
||
pub struct QueryTable<Q, DB> { | ||
db: DB, | ||
storage: Q, | ||
} | ||
|
||
// We normalize `<Q as QueryDb>::Db` to `<Q as AsyncQueryFunction<'d>>::SendDb` | ||
// using the where-bound. 'd is an unconstrained region variable which previously | ||
// triggered an assert. | ||
impl<Q> QueryTable<Q, <Q as QueryDb>::Db> where Q: for<'d> AsyncQueryFunction<'d> {} | ||
|
||
pub trait AsyncQueryFunction<'d>: QueryDb<Db = <Self as AsyncQueryFunction<'d>>::SendDb> { | ||
type SendDb: 'd; | ||
} | ||
|
||
pub trait QueryStorageOpsAsync<Q> | ||
where | ||
Q: for<'d> AsyncQueryFunction<'d>, | ||
{ | ||
} | ||
|
||
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,20 @@ | ||
// check-pass | ||
|
||
// Another minimized regression test for #112832. | ||
trait Trait { | ||
type Assoc; | ||
} | ||
|
||
trait Sub<'a>: Trait<Assoc = <Self as Sub<'a>>::SubAssoc> { | ||
type SubAssoc; | ||
} | ||
|
||
// By using the where-clause we normalize `<T as Trait>::Assoc` to | ||
// `<T as Sub<'a>>::SubAssoc` where `'a` is an unconstrained region | ||
// variable. | ||
fn foo<T>(x: <T as Trait>::Assoc) | ||
where | ||
for<'a> T: Sub<'a>, | ||
{} | ||
|
||
fn main() {} |