-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regions
Milestone
Description
See this code:
pub trait Map<K, V> {
pure fn f(&self) -> Option<&self/V>;
}
pub trait MutableMap<K, V>: Map<K, V> {
}
fn main() { }
It fails with:
foo.rs:7:28: 7:37 error: to use region types here, the containing type must be declared with a region bound
foo.rs:7 pub trait MutableMap<K, V>: Map<K, V> {
^~~~~~~~~
error: aborting due to previous error
I'm not quite sure what to do in this case. Is this an error? If not, how do I pass a region bound to a parent trait?
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regions