diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-11-02 03:08:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-02 03:08:51 +0800 |
| commit | e31a5ca1a3cca5053ffe5d6effb0dd9257372491 (patch) | |
| tree | f6659668498bf3f4e0ad29029410516bec29bff1 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 348d28052b1717f152b04725492c256c3409a361 (diff) | |
| parent | b4248aeec366d31efe595eb5f671f589c849d6a3 (diff) | |
| download | rust-e31a5ca1a3cca5053ffe5d6effb0dd9257372491.tar.gz rust-e31a5ca1a3cca5053ffe5d6effb0dd9257372491.zip | |
Rollup merge of #132383 - compiler-errors:never-type-fallback-sugg, r=WaffleLapkin
Implement suggestion for never type fallback lints r? ```@WaffleLapkin``` Just opening this up for vibes; it's not done yet. I'd still like to make this suggestable in a few more cases before merge: - [x] Try to annotate `_` -> `()` - [x] Try to annotate local variables if they're un-annotated: `let x = ...` -> `let x: () = ...` - [x] Try to annotate the self type of a `Trait::method()` -> `<() as Trait>::method()`. The only other case we may want to suggest is a missing turbofish, like `f()` -> `f::<()>()`. That may be possible, but seems overly annoying. This partly addresses https://github.com/rust-lang/rust/issues/132358; the other half of fixing that would be to make the error message a bit better, perhaps just special casing the `?` operator 🤔 I don't think I'll do that part.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
