Rollup merge of #84682 - jackh726:transitive_bounds_rebind, r=nikomatsakis
Don't rebind in `transitive_bounds_that_define_assoc_type` Fixes #83737 Fixes #84604 Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445) r? `````@nikomatsakis`````
This commit is contained in:
commit
26a4f461d7
4 changed files with 28 additions and 3 deletions
14
src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs
Normal file
14
src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// build-pass
|
||||
// compile-flags: --edition 2018
|
||||
// compile-flags: --crate-type rlib
|
||||
|
||||
use std::future::Future;
|
||||
|
||||
async fn handle<F>(slf: &F)
|
||||
where
|
||||
F: Fn(&()) -> Box<dyn for<'a> Future<Output = ()> + Unpin>,
|
||||
{
|
||||
(slf)(&()).await;
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
9
src/test/ui/lifetimes/issue-84604.rs
Normal file
9
src/test/ui/lifetimes/issue-84604.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// run-pass
|
||||
// compile-flags: -Zsymbol-mangling-version=v0
|
||||
|
||||
pub fn f<T: ?Sized>() {}
|
||||
pub trait Frob<T: ?Sized> {}
|
||||
fn main() {
|
||||
f::<dyn Frob<str>>();
|
||||
f::<dyn for<'a> Frob<str>>();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue