-
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.
Auto merge of #91255 - b-naber:normalization-ice, r=jackh276
Implement version of normalize_erasing_regions that allows for normalization failure Fixes #59324 Fixes #67684 Fixes #69398 Fixes #71113 Fixes #82079 Fixes #85103 Fixes #88856 Fixes #91231 Fixes #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.