Closed
Description
The following compiles:
#![feature(trait_upcasting)]
trait Super {}
trait Trait: Super {}
fn foo(x: &dyn Trait) -> &dyn Super { x }
while this does not:
#![feature(trait_upcasting)]
trait Super {}
trait Trait: Send {}
fn foo(x: &dyn Trait) -> &dyn Send { x }
cc @compiler-errors I thought we actually had a PR for that at some point 🤔 I think that's actually not the case though. It wasn't part of #119338