-
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.
Rollup merge of #91430 - jyn514:normalize-fallible, r=jackh726
Add tests for `normalize-docs` overflow errors `@b-naber` do you understand why using `try_normalize_erasing_regions` doesn't silence these cycle errors? Rustdoc isn't emitting them, rustc is aborting before returning an error, even though the function has `try_` in the name. cc #82692, #91255
- Loading branch information
Showing
4 changed files
with
51 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pub struct B0; | ||
pub struct B1; | ||
use std::ops::Shl; | ||
use std::ops::Sub; | ||
pub type Shleft<A, B> = <A as Shl<B>>::Output; | ||
pub type Sub1<A> = <A as Sub<B1>>::Output; | ||
pub struct UInt<U, B> { | ||
pub(crate) msb: U, | ||
pub(crate) lsb: B, | ||
} | ||
impl<U, B, Ur, Br> Shl<UInt<Ur, Br>> for UInt<U, B> | ||
where | ||
UInt<Ur, Br>: Sub<B1>, | ||
UInt<UInt<U, B>, B0>: Shl<Sub1<UInt<Ur, Br>>>, | ||
{ | ||
type Output = Shleft<UInt<UInt<U, B>, B0>, Sub1<UInt<Ur, Br>>>; | ||
fn shl(self, rhs: UInt<Ur, Br>) -> Self::Output { | ||
unimplemented!() | ||
} | ||
} |
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,25 @@ | ||
// check-pass | ||
// Regresion test for <https://github.com/rust-lang/rust/issues/79459>. | ||
pub trait Query {} | ||
|
||
pub trait AsQuery { | ||
type Query; | ||
} | ||
|
||
impl<T: Query> AsQuery for T { | ||
type Query = T; | ||
} | ||
|
||
pub trait SelectDsl<Selection> { | ||
type Output; | ||
} | ||
|
||
impl<T, Selection> SelectDsl<Selection> for T | ||
where | ||
T: AsQuery, | ||
T::Query: SelectDsl<Selection>, | ||
{ | ||
type Output = <T::Query as SelectDsl<Selection>>::Output; | ||
} | ||
|
||
pub type Select<Source, Selection> = <Source as SelectDsl<Selection>>::Output; |
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,3 @@ | ||
// aux-crate:overflow=overflow.rs | ||
// check-pass | ||
// Regression test for <https://github.com/rust-lang/rust/issues/79506>. |