-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
I would expect this code to compile, but it does not:
use std::ops::{Mul};
pub trait M: Sized where f64: Mul<Self, Output=Self> {
}
pub trait M2: M {
fn f(self, a: f64) -> Self {
a * self
}
}
Having to repeat constraints leads to more verbose code and is only repeating information that the compiler already knows.
See previous discussion: rust-lang/rust#26564
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.