Uh oh!
There was an error while loading. Please reload this page.
Account for HR lifetimes when suggesting introduction of named lifetime - #68583
Conversation
rust-highfive
commented
Jan 27, 2020
(rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eddyb
commented
Jan 27, 2020
cc @rust-lang/compiler I know we removed some lifetime-related automatic suggestions, are these related? Also, do people have opinions on what we should be showing? |
Uh oh!
There was an error while loading. Please reload this page.
estebank
commented
Jan 27, 2020
cc @rust-lang/wg-diagnostics as well. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
btw, can this note be moved to after the help:? The blog post analogy to this would be having the "read more" link before the introduction.
There was a problem hiding this comment.
This is part of a separate bug where all suggestions come always at the end. I would rather tackle that in a separate PR, ideally after fully migrating to annotate_snippets.
petrochenkov
commented
Jan 29, 2020
r? @rust-lang/wg-diagnostics |
estebank
commented
Jan 31, 2020
Would you mind to r? @oli-obk |
oli-obk
commented
Feb 4, 2020
@bors r+ |
bors
commented
Feb 4, 2020
📌 Commit 4310b74 has been approved by |
rust-highfive
commented
Feb 5, 2020
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
estebank
commented
Feb 5, 2020
@bors retry |
bors
commented
Feb 5, 2020
⌛ Testing commit 4310b74 with merge b4097ad7cc9693bf7845908726213028ead63854... |
Centril
commented
Feb 5, 2020
Failed in #68852 (comment), @bors r- retry |
estebank
commented
Feb 5, 2020
Rebased and fixed test. @bors r=oli-obk |
bors
commented
Feb 5, 2020
📌 Commit 609a374 has been approved by |
bors
commented
Feb 6, 2020
Account for HR lifetimes when suggesting introduction of named lifetime ``` error[E0106]: missing lifetime specifier --> src/test/ui/suggestions/fn-missing-lifetime-in-item.rs:2:32 | 2 | struct S2<F: Fn(&i32, &i32) -> &i32>(F); | ---- ---- ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html help: consider making the bound lifetime-generic with a new `'a` lifetime | 2 | struct S2<F: for<'a> Fn(&'a i32, &'a i32) -> &'a i32>(F); | ^^^^^^^ ^^^^^^^ ^^^^^^^ ^^^ help: consider introducing a named lifetime parameter | 2 | struct S2<'a, F: Fn(&'a i32, &'a i32) -> &'a i32>(F);= | ^^^ ^^^^^^^ ^^^^^^^ ^^^ ``` Follow up to #68267. Addresses the diagnostics part of #49287.
bors
commented
Feb 6, 2020
☀️ Test successful - checks-azure |
Follow up to #68267. Addresses the diagnostics part of #49287.