trait Trait: Send
: upcasting from dyn Trait
to dyn Send
does not work · Issue #126313 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
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
Labels
Development
No branches or pull requests