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#91255 - b-naber:normalization-ice, r=jackh276
Implement version of normalize_erasing_regions that allows for normalization failure Fixes rust-lang#59324 Fixes rust-lang#67684 Fixes rust-lang#69398 Fixes rust-lang#71113 Fixes rust-lang#82079 Fixes rust-lang#85103 Fixes rust-lang#88856 Fixes rust-lang#91231 Fixes rust-lang#91234 Previously we called `normalize_erasing_regions` inside `layout_of`. `normalize_erasing_regions` assumes that the normalization succeeds. Since some `layout_of` calls happen before typecheck has finished, we introduce a new variant that allows for returning an error.
- Loading branch information
Showing
18 changed files
with
600 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
trait NotFoo {} | ||
|
||
pub trait Foo: NotFoo { | ||
type OnlyFoo; | ||
} | ||
|
||
pub trait Service { | ||
type AssocType; | ||
} | ||
|
||
pub trait ThriftService<Bug: NotFoo>: | ||
//~^ ERROR the trait bound `Bug: Foo` is not satisfied | ||
//~| ERROR the trait bound `Bug: Foo` is not satisfied | ||
Service<AssocType = <Bug as Foo>::OnlyFoo> | ||
{ | ||
fn get_service( | ||
//~^ ERROR the trait bound `Bug: Foo` is not satisfied | ||
//~| ERROR the trait bound `Bug: Foo` is not satisfied | ||
&self, | ||
) -> Self::AssocType; | ||
} | ||
|
||
fn with_factory<H>(factory: dyn ThriftService<()>) {} | ||
//~^ ERROR the trait bound `(): Foo` is not satisfied | ||
|
||
fn main() {} |
Oops, something went wrong.