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.
Auto merge of rust-lang#84559 - jackh726:issue-84398, r=nikomatsakis
Deduplicate ParamCandidates with the same value except for bound vars Fixes rust-lang#84398 This is kind of a hack. I wonder if we can get other types of candidates that are the same except for bound vars. This won't be a problem with Chalk, since we don't really need to know that there are two different "candidates" if they both give the same final substitution. r? `@nikomatsakis`
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
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 @@ | ||
// check-pass | ||
|
||
pub trait Deserialize<'de>: Sized {} | ||
pub trait DeserializeOwned: for<'de> Deserialize<'de> {} | ||
|
||
pub trait Extensible { | ||
type Config; | ||
} | ||
|
||
// The `C` here generates a `C: Sized` candidate | ||
pub trait Installer<C> { | ||
fn init<B: Extensible<Config = C>>(&mut self) -> () | ||
where | ||
// This clause generates a `for<'de> C: Sized` candidate | ||
B::Config: DeserializeOwned, | ||
{ | ||
} | ||
} | ||
|
||
fn main() {} |