forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try normalizing types without RevealAll in ParamEnv in mir validation
Before, the MIR validator used RevealAll in its ParamEnv for type checking. This could cause false negatives in some cases due to RevealAll ParamEnvs not always use all predicates as expected here. Since some MIR passes like inlining use RevealAll as well, keep using it in the MIR validator too, but when it fails usign RevealAll, also try the check without it, to stop false negatives.
- Loading branch information
Showing
2 changed files
with
45 additions
and
8 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,25 @@ | ||
// check-pass | ||
pub trait Backend { | ||
type DescriptorSetLayout; | ||
} | ||
|
||
pub struct Back; | ||
|
||
impl Backend for Back { | ||
type DescriptorSetLayout = u32; | ||
} | ||
|
||
pub struct HalSetLayouts { | ||
vertex_layout: <Back as Backend>::DescriptorSetLayout, | ||
} | ||
|
||
impl HalSetLayouts { | ||
pub fn iter<DSL>(self) -> DSL | ||
where | ||
Back: Backend<DescriptorSetLayout = DSL>, | ||
{ | ||
self.vertex_layout | ||
} | ||
} | ||
|
||
fn main() {} |