-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion based on trait bounds #939
Comments
Hi! Is struct member method completions working? I can't seem to get completions with the latest master. I am using the same example above struct S<T> {
mem: T
}
fn f<T: Clone>(a: S<T>) {
let b = a.mem.clo~
}
Weirdly enough, the testcases in |
Thanks.
Tests contain only 'bounded by impl' cases, like impl<T: Clone> S<T> {
fn f(self) {
let b = a.mem.clo~
}
} , so it's not weird. |
Right. I was obviously overlooking that. Sorry. I would like to take a go
at this.
…On Wed, Oct 17, 2018 at 7:29 AM Yuji Kanagawa ***@***.***> wrote:
Thanks.
Weirdly enough, the testcases in tests/trait_bounds.rs pass.
Tests contain only 'bounded by impl' cases, like
impl<T: Clone> S<T> {
fn f(self) {
let b = a.mem.clo~
}
}
, so it's not weird.
I don't remember it's simply not implemented or broken, but anyway fix it
later.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#939 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZcHBLvVtSfCCmh02uQ5gALD8sQAYbcvks5ulo8bgaJpZM4WTPiI>
.
|
@letmutx |
@kngwyu Okay. I have some progress here: https://github.com/letmutx/racer/tree/add-struct-member-trait-completions |
Related: #706, #829
General roadmap
FnArg
already implemented in Completion by trait bounds for fnarg #828, Support trait bound in where clause #937
implemented in Completion based on impl<T: Bound> #948 , Type inference for struct field via function bound #975
implemented in Completes associated function & type for type parameter #991
Precise roadmaps
refactor generics support
MatchType::Impl
andMatchType::TraitImpl
with ImplHeaderMatch::generics_args
andMatch::generic_types
MatchType::Enum
and etc to have genericsMatchType::Method
which has ImplHeader- [ ] RemoveTOO HARDPathSearch
TraitBounds
again- [ ] UseNow I think there's no useGenericsArgs
to resolve type params, instead of takingMatch
enhance
scope_start
's inefficiencyMethod search
TypeName resolution
resolve_path
is calledRelated issues
I think this will be easily fixed after refactoring all codes.
The text was updated successfully, but these errors were encountered: