diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-11-14 19:26:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-14 19:26:16 +0100 |
| commit | a86bdb4c507f9f9651f7372075eb17009c7da4a6 (patch) | |
| tree | f93cdfdf9d7c99308c71992682066e83b1828878 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 8c77da87d7451f275259c43c89ac3c9c24c1c8c8 (diff) | |
| parent | c2b906ba9a29591536042be4bbf8d0156225bb73 (diff) | |
| download | rust-a86bdb4c507f9f9651f7372075eb17009c7da4a6.tar.gz rust-a86bdb4c507f9f9651f7372075eb17009c7da4a6.zip | |
Rollup merge of #104223 - fmease:recover-fn-ptr-with-generics, r=estebank
Recover from function pointer types with generic parameter list Give a more helpful error when encountering function pointer types with a generic parameter list like `fn<'a>(&'a str) -> bool` or `fn<T>(T) -> T` and suggest moving lifetime parameters to a `for<>` parameter list. I've added a bunch of extra code to properly handle (unlikely?) corner cases like `for<'a> fn<'b>()` (where there already exists a `for<>` parameter list) correctly suggesting `for<'a, 'b> fn()` (merging the lists). If you deem this useless, I can simplify the code by suggesting nothing at all in this case. I am quite open to suggestions regarding the wording of the diagnostic messages. Fixes #103487. ``@rustbot`` label A-diagnostics r? diagnostics
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
