-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
#![feature(conservative_impl_trait, universal_impl_trait)]
use std::ops::Sub;
trait Trait: Sub + Copy {}
impl Trait for i32{}
fn test0(foo: impl Trait) -> <impl Trait as std::ops::Sub>::Output {
foo - foo
}
fn test1<T: Sub + Copy>(foo: T) -> T::Output {
foo - foo
}
fn main() {
let foo = test0(1);
let bar = test1(1);
println!("{:?}", bar);
}
Only the bar
can be debug.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-impl-traitArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.