Rollup merge of #73485 - estebank:dedup-preds, r=nikomatsakis
Perform obligation deduplication to avoid buggy `ExistentialMismatch` Address #59326.
This commit is contained in:
commit
f13d09abe1
2 changed files with 39 additions and 3 deletions
26
src/test/ui/issues/issue-59326.rs
Normal file
26
src/test/ui/issues/issue-59326.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// check-pass
|
||||
trait Service {
|
||||
type S;
|
||||
}
|
||||
|
||||
trait Framing {
|
||||
type F;
|
||||
}
|
||||
|
||||
impl Framing for () {
|
||||
type F = ();
|
||||
}
|
||||
|
||||
trait HttpService<F: Framing>: Service<S = F::F> {}
|
||||
|
||||
type BoxService = Box<dyn HttpService<(), S = ()>>;
|
||||
|
||||
fn build_server<F: FnOnce() -> BoxService>(_: F) {}
|
||||
|
||||
fn make_server<F: Framing>() -> Box<dyn HttpService<F, S = F::F>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
build_server(|| make_server())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue