Rollup merge of #121720 - tmandry:split-refining, r=compiler-errors
Split refining_impl_trait lint into _reachable, _internal variants As discussed in https://github.com/rust-lang/rust/issues/119535#issuecomment-1909352040: > We discussed this today in triage and developed a consensus to: > > * Add a separate lint against impls that refine a return type defined with RPITIT even when the trait is not crate public. > * Place that in a lint group along with the analogous crate public lint. > * Create an issue to solicit feedback on these lints (or perhaps two separate ones). > * Have the warnings displayed with each lint reference this issue in a similar manner to how we do that today with the required `Self: '0'` bound on GATs. > * Make a note to review this feedback on 2-3 release cycles. This points users to https://github.com/rust-lang/rust/issues/121718 to leave feedback.
This commit is contained in:
commit
0995508562
13 changed files with 239 additions and 33 deletions
|
@ -1072,6 +1072,7 @@ pub struct UnusedAssociatedTypeBounds {
|
|||
#[derive(LintDiagnostic)]
|
||||
#[diag(hir_analysis_rpitit_refined)]
|
||||
#[note]
|
||||
#[note(hir_analysis_feedback_note)]
|
||||
pub(crate) struct ReturnPositionImplTraitInTraitRefined<'tcx> {
|
||||
#[suggestion(applicability = "maybe-incorrect", code = "{pre}{return_ty}{post}")]
|
||||
pub impl_return_span: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue