Skip to content

'inline function' assist does not take generic type parameters into account when inlining an into call #16090

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

Open
antonilol opened this issue Dec 11, 2023 · 0 comments
Labels
A-assists A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@antonilol
Copy link

rust-analyzer version: 0.4.1765-standalone

rustc version: rustc 1.74.0 (79e9716c9 2023-11-13)

relevant settings: None

before:

let a: u16 = 123;
let b: i32 = a.into();

after (actual):

let a: u16 = 123;
let b: i32 = U::from(a);

after (expected):

let a: u16 = 123;
let b: i32 = i32::from(a);

The U does not get correctly replaced with the target type, in this case i32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants