-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
Description
trait Trait { }
impl Trait for () { }
impl Trait for ((),) { }
pub fn function<K:Trait>() {
}
pub struct Struct<K:Trait>;
fn main() { }
Errors:
a.rs:5:19: 5:24 error: private trait in exported type parameter bound
a.rs:5 pub fn function<K:Trait>() {
^~~~~
a.rs:8:21: 8:26 error: private trait in exported type parameter bound
a.rs:8 pub struct Struct<K:Trait>;
^~~~~
This stops me from providing a trait that is an implementation detail and as such should not be exported (it could change anytime, no backwards-compatiblity at all).