-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Recover most impl Trait
and dyn Trait
lifetime bound suggestions under NLL
#96385
Recover most impl Trait
and dyn Trait
lifetime bound suggestions under NLL
#96385
Conversation
// i32, which is the type of y but with the anonymous region replaced | ||
// with 'a, the corresponding bound region and is_first which is true if | ||
// the hir::Param is the first parameter in the function declaration. | ||
pub fn find_param_with_region<'tcx>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has just been split out from NiceRegionError::find_param_with_region
as a free standing function.
Good job on this :) Did you bless with compare-mode=nll? (CI will catch it, but figured I would bring it up if you didn't and there's potentially anything that changes) @bors r+ |
📌 Commit e1b074a has been approved by |
Yep, I did it properly this time 👍 |
…bound-suggestions, r=jackh726 Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL This is done by replacing the duplicated (and very partial) implementation from borrowck with one inspsired from `NiceRegionError::try_report_static_impl_trait` and by re-using `suggest_new_region_bound`. Fixes rust-lang#96277 r? `@jackh726`
…bound-suggestions, r=jackh726 Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL This is done by replacing the duplicated (and very partial) implementation from borrowck with one inspsired from `NiceRegionError::try_report_static_impl_trait` and by re-using `suggest_new_region_bound`. Fixes rust-lang#96277 r? ``@jackh726``
Rollup of 6 pull requests Successful merges: - rust-lang#92569 (Improve Error Messaging for Unconstructed Structs and Enum Variants in Generic Contexts) - rust-lang#96370 (Cleanup `report_method_error` a bit) - rust-lang#96383 (Fix erased region escaping into wfcheck due to rust-lang#95395) - rust-lang#96385 (Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLL) - rust-lang#96410 (rustdoc: do not write `{{root}}` in `pub use ::foo` docs) - rust-lang#96430 (Fix handling of `!` in rustdoc search) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…-lifetime-suggestion, r=jackh726 Recover suggestions to introduce named lifetime under NLL Fixes rust-lang#96157 r? `@jackh726` Built on top of rust-lang#96385 so only the second commit is relevant
…-lifetime-suggestion, r=jackh726 Recover suggestions to introduce named lifetime under NLL Fixes rust-lang#96157 r? ``@jackh726`` Built on top of rust-lang#96385 so only the second commit is relevant
…-lifetime-suggestion, r=jackh726 Recover suggestions to introduce named lifetime under NLL Fixes rust-lang#96157 r? ```@jackh726``` Built on top of rust-lang#96385 so only the second commit is relevant
This is done by replacing the duplicated (and very partial) implementation from borrowck with one inspsired from
NiceRegionError::try_report_static_impl_trait
and by re-usingsuggest_new_region_bound
.Fixes #96277
r? @jackh726