summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/e0119/so-37347311.rs
blob: d5f624bc4d972f31060e44417af84fb46b372c1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Ref: https://stackoverflow.com/q/37347311

trait Storage {
    type Error;
}

enum MyError<S: Storage> {
    StorageProblem(S::Error),
}

impl<S: Storage> From<S::Error> for MyError<S> { //~ ERROR conflicting implementations
    fn from(error: S::Error) -> MyError<S> {
        MyError::StorageProblem(error)
    }
}

fn main() {}