Style preference super-trait bound `Into ` vs `where Foo: From `
The Rust Programming Language Forum
Style preference super-trait bound `Into ` vs `where Foo: From `
Given where clauses are only elaborated for supertraits, and not other things · Issue #20671 · rust-lang/rust, what do you generally prefer? pub trait OsError: Error + Send + Sync + 'static // C-GOOD-ERR + From<io::Error> + Into<DeviceError> // <--- Into bound - ugly { ... } pub trait OsError: Error + Send + Sync + 'static // C-GOOD-ERR + From<io::Error> where DeviceError: From<Self> // <--- not implied, adds noise at usage sites { ... } I really dislike anything that nudg...
Given where clauses are only elaborated for supertraits, and not other things · Issue #20671 · rust-lang/rust, what do you generally prefer? pub trait OsError: Error + Send +…
0 comments
No comments yet.