-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.