- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Description
Summary
running clippy --fix is deleting comments while fixing useless_vec lint. I think this might be similar to #8528 ( not sure about the fix implementation though )
ps: i would love to work on the fix if I can get little pointers! thanks :)
Reproducer
I tried this code:
let _some_variable = vec![
    1, 2, // i'm here to stay
    3, 4, // but this one going away ;-;
]; // that is life anywaysI expected to see this happen:
let _some_variable = [1, 2, // i'm here to stay
      3, 4]; // but this one going away ;-;
// that is life anywaysInstead, this happened:
let _some_variable = [1, 2, // i'm here to stay
      3, 4]; // that is life anywaysVersion
rustc 1.82.0 (f6e511eec 2024-10-15)
binary: rustc
commit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14
commit-date: 2024-10-15
host: aarch64-apple-darwin
release: 1.82.0
LLVM version: 19.1.1
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing