Skip to content

Conversation

compiler-errors
Copy link
Member

We have this random return_type_impl_trait function to detect if a function returns an RPIT which is used in outlives suggestions, but removing it doesn't actually change any diagnostics. Let's just remove it.

Also, suppress a spurious outlives error from a ReError.

Fixes #114274

@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 31, 2023
@@ -553,7 +553,7 @@ fn gather_gat_bounds<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
// Ignore `'static` lifetimes for the purpose of this lint: it's
// because we know it outlives everything and so doesn't give meaningful
// clues
if let ty::ReStatic = **region_a {
if let ty::ReStatic | ty::ReError(_) = **region_a {
Copy link
Member

@spastorino spastorino Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to fix the comments above, to reflect that we also ignore ReError.

@spastorino
Copy link
Member

r=me when you consider this done :).

@compiler-errors compiler-errors force-pushed the dont-error-on-missing-region-outlives branch from 945b812 to 1c35634 Compare August 1, 2023 17:20
@compiler-errors
Copy link
Member Author

@bors r=spastorino rollup

@bors
Copy link
Collaborator

bors commented Aug 1, 2023

📌 Commit 1c35634 has been approved by spastorino

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 1, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 2, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#114178 (Account for macros when suggesting a new let binding)
 - rust-lang#114199 (Don't unsize coerce infer vars in select in new solver)
 - rust-lang#114301 (Don't check unnecessarily that impl trait is RPIT)
 - rust-lang#114314 (Tweaks to `adt_sized_constraint`)
 - rust-lang#114322 (Fix invalid slice coercion suggestion reported in turbofish)
 - rust-lang#114340 ([rustc_attr][nit] Replace `filter` + `is_some` with `map_or`.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f338a1f into rust-lang:master Aug 2, 2023
@rustbot rustbot added this to the 1.73.0 milestone Aug 2, 2023
@compiler-errors compiler-errors deleted the dont-error-on-missing-region-outlives branch August 11, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: couldn't find DefId(..) in the HIR map
5 participants