Skip to content
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

Substitute type parameters with actual types in Parameter Info #4308

Closed
lancelote opened this issue Aug 26, 2019 · 2 comments · Fixed by #6664
Closed

Substitute type parameters with actual types in Parameter Info #4308

lancelote opened this issue Aug 26, 2019 · 2 comments · Fixed by #6664
Labels
E-medium Issue required decent knowledge about platform and project codebase feature help wanted subsystem::code insight General label for issues related to code understanding: highlighting, completion, annotation, etc. subsystem::hints Issues related to editor hints (inlay, parameter, etc.) subsystem::type inference & name resolution Issues related to name resolution and/or type inference

Comments

@lancelote
Copy link
Member

lancelote commented Aug 26, 2019

Environment

  • IntelliJ Rust plugin version: Build from source release-104 b3e124a
  • Rust toolchain version: rustc 1.36.0 (a53f9df32 2019-07-03)
  • IDE name and version: 2019.2 CLion 192.5728.100
  • Operating system: macOS 10.14.6

Problem description

With #4207 in place the Plugin now substitute generic types in completion variants

completion

Should not the same be done for Parameter Info (cmd + P) as well? The same example

parameter_hit

The implementation is located in org.rust.ide.hints.parameter.RsParameterInfoHandler

Steps to reproduce

struct S<T1>();

impl <T2> S<T2> {
    fn foo(&self, x: T2) -> T2 { x }
}

fn main() {
    let s = S::<i32>();
    s.foo()
}
@mchernyavsky mchernyavsky added feature subsystem::type inference & name resolution Issues related to name resolution and/or type inference labels Aug 26, 2019
@mchernyavsky mchernyavsky self-assigned this Aug 26, 2019
@mchernyavsky mchernyavsky removed their assignment Sep 26, 2019
@artemmukhin artemmukhin changed the title Substitute types in parameter hints Substitute type parameters with actual types in Parameter Info Jan 13, 2021
@artemmukhin artemmukhin added E-easy Issue required minimal knowledge about platform and project codebase subsystem::code insight General label for issues related to code understanding: highlighting, completion, annotation, etc. labels Jan 13, 2021
@Kobzol
Copy link
Member

Kobzol commented Jan 13, 2021

I started to work on this some time ago and I'm not sure about E-easy :D In any case, I'll revive my branch and try to finish it.

@artemmukhin artemmukhin added E-medium Issue required decent knowledge about platform and project codebase and removed E-easy Issue required minimal knowledge about platform and project codebase labels Jan 13, 2021
@artemmukhin
Copy link
Member

@Kobzol OK, I was not pretty sure if this is "easy" or "medium" actually, so I've changed the label 😄

I'll revive my branch and try to finish it

Great, thank you!

@artemmukhin artemmukhin added the subsystem::hints Issues related to editor hints (inlay, parameter, etc.) label Jul 9, 2021
bors bot added a commit that referenced this issue Jul 12, 2021
6664: HINT: Substitute generic parameters in Parameter info r=ortem a=Kobzol

I'm not sure about using types vs type references for function/method calls.

Fixes: #4308

changelog: Substitute generic parameters in `Parameter Info`.


Co-authored-by: Jakub Beránek <berykubik@gmail.com>
@bors bors bot closed this as completed in 37d09da Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-medium Issue required decent knowledge about platform and project codebase feature help wanted subsystem::code insight General label for issues related to code understanding: highlighting, completion, annotation, etc. subsystem::hints Issues related to editor hints (inlay, parameter, etc.) subsystem::type inference & name resolution Issues related to name resolution and/or type inference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants