Skip to content

Quick fix removing lifetime param not remove comma #17727

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

Closed
A4-Tacks opened this issue Jul 28, 2024 · 3 comments
Closed

Quick fix removing lifetime param not remove comma #17727

A4-Tacks opened this issue Jul 28, 2024 · 3 comments
Labels
C-bug Category: bug

Comments

@A4-Tacks
Copy link
Contributor

rust-analyzer version: rustc 1.80.0 (051478957 2024-07-21)

rustc version: rust-analyzer 1.80.0 (05147895 2024-07-21)

editor or extension: Vim 9.1 coc-rust-analyzer

code snippet to reproduce:

type Result<T> = std::result::Result<T, ()>;

fn foo() -> Result<'static, ()> { Ok(()) }

fn main() { }

use quick fix:

type Result<T> = std::result::Result<T, ()>;

fn foo() -> Result<, ()> { Ok(()) }

fn main() { }

expect:

type Result<T> = std::result::Result<T, ()>;

fn foo() -> Result<()> { Ok(()) }

fn main() { }
@A4-Tacks A4-Tacks added the C-bug Category: bug label Jul 28, 2024
@Veykril
Copy link
Member

Veykril commented Jul 28, 2024

That quickfix comes from rustc, so its a compiler bug that its proposed change does not include the , in the removal

@Veykril Veykril closed this as completed Jul 28, 2024
@A4-Tacks
Copy link
Contributor Author

Should I forward this issue to rustc?

@Veykril
Copy link
Member

Veykril commented Jul 28, 2024

Yes that would be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants