Permalink
Please
sign in to comment.
Browse files
(FIX): add quick fix for unimplemented methods
fixes #536
- Loading branch information...
Showing
with
102 additions
and 2 deletions.
- +36 −2 src/main/kotlin/org/rust/ide/annotator/RustItemsAnnotator.kt
- +26 −0 src/main/kotlin/org/rust/lang/core/psi/RustElementFactory.kt
- +1 −0 src/test/kotlin/org/rust/ide/annotator/RustItemAnnotatorTest.kt
- +12 −0 src/test/resources/org/rust/ide/annotator/fixtures/items/invalid_trait_impl_fix.rs
- +27 −0 src/test/resources/org/rust/ide/annotator/fixtures/items/invalid_trait_impl_fix_after.rs
| @@ -0,0 +1,12 @@ | |||
| trait T { | |||
| fn foo(); | |||
| fn eggs(); | |||
| fn bar() {} | |||
| fn baz<T>(x: i32, y: String) -> Vec<T> where T: Clone; | |||
| fn quux(&self) -> Self; | |||
| fn annon_arg(Arg); | |||
| } | |||
|
|
|||
| impl T for<caret> () { | |||
| fn foo() {} | |||
| } | |||
| @@ -0,0 +1,27 @@ | |||
| trait T { | |||
| fn foo(); | |||
| fn eggs(); | |||
| fn bar() {} | |||
| fn baz<T>(x: i32, y: String) -> Vec<T> where T: Clone; | |||
| fn quux(&self) -> Self; | |||
| fn annon_arg(Arg); | |||
| } | |||
|
|
|||
| impl T for () { | |||
| fn foo() {} | |||
| fn eggs() { | |||
| unimplemented!() | |||
| } | |||
|
|
|||
| fn baz<T>(x: i32, y: String) -> Vec<T> where T: Clone { | |||
| unimplemented!() | |||
| } | |||
|
|
|||
| fn quux(&self) -> Self { | |||
| unimplemented!() | |||
| } | |||
|
|
|||
| fn annon_arg(_: Arg) { | |||
| unimplemented!() | |||
| } | |||
| } | |||
0 comments on commit
1bb65c4