-
Notifications
You must be signed in to change notification settings - Fork 13k
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 #95731 - oli-obk:lazy_tait_regression, r=compiler-errors
Check that all hidden types are the same and then deduplicate them. fixes #95538 This used to trigger a sanity check. Now we accept that there may be multiple places where a hidden type is constrained and we merge all of these at the end. Ideally we'd merge eagerly, but that is a larger refactoring that I don't want to put into a backport
- Loading branch information
Showing
2 changed files
with
110 additions
and
62 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,30 @@ | ||
// check-pass | ||
|
||
use std::marker::PhantomData; | ||
|
||
pub struct ConcreteError {} | ||
pub trait IoBase {} | ||
struct X {} | ||
impl IoBase for X {} | ||
|
||
pub struct ClusterIterator<B, E, S = B> { | ||
pub fat: B, | ||
phantom_s: PhantomData<S>, | ||
phantom_e: PhantomData<E>, | ||
} | ||
|
||
pub struct FileSystem<IO: IoBase> { | ||
pub disk: IO, | ||
} | ||
|
||
impl<IO: IoBase> FileSystem<IO> { | ||
pub fn cluster_iter(&self) -> ClusterIterator<impl IoBase + '_, ConcreteError> { | ||
ClusterIterator { | ||
fat: X {}, | ||
phantom_s: PhantomData::default(), | ||
phantom_e: PhantomData::default(), | ||
} | ||
} | ||
} | ||
|
||
fn main() {} |