Skip to content

Unify region variables when projecting associated types - #73452

Merged
bors merged 3 commits into
rust-lang:masterfrom
matthewjasper:auto-rec
Jun 20, 2020
Merged

Unify region variables when projecting associated types#73452
bors merged 3 commits into
rust-lang:masterfrom
matthewjasper:auto-rec

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor

This is required to avoid cycles when evaluating auto trait predicates.
Notably, this is required to be able add Chalk types to CtxtInterners for cfg(parallel_compiler).

r? @nikomatsakis

This is required to avoid cycles when evaluating auto trait
predicates.
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 17, 2020
@matthewjasper

Copy link
Copy Markdown
ContributorAuthor

@bors try @rust-timer queue

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion

@bors

bors commented Jun 17, 2020

Copy link
Copy Markdown
Collaborator

⌛ Trying commit ba2ef58 with merge 1f5caa606e035dcb2a87c8910a53d6f63b2e9eee...

@bors

bors commented Jun 17, 2020

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-azure
Build commit: 1f5caa606e035dcb2a87c8910a53d6f63b2e9eee (1f5caa606e035dcb2a87c8910a53d6f63b2e9eee)

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued 1f5caa606e035dcb2a87c8910a53d6f63b2e9eee with parent 2935d29, future comparison URL.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking try commit (1f5caa606e035dcb2a87c8910a53d6f63b2e9eee): comparison url.

let r = if vid == resolved_vid {
r
} else {
self.tcx.mk_region(ty::ReVar(resolved_vid))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: can we refactor with a helper like

self.tcx.reuse_or_mk_region(r, ty::ReVar(resolved_vid))

I guess it wouldn't be quite as fast. I'd like to see that pattern used in more places, though.

@nikomatsakis

Copy link
Copy Markdown
Contributor

r=me with or without nit

@jackh726jackh726 mentioned this pull request Jun 18, 2020
@matthewjasper

Copy link
Copy Markdown
ContributorAuthor

@bors r=nikomatsakis

@bors

bors commented Jun 18, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit aa11704 has been approved by nikomatsakis

@borsbors 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 Jun 18, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 20, 2020
…arth
Rollup of 16 pull requests
Successful merges:
- rust-lang#71420 (Specialization is unsound)
- rust-lang#71899 (Refactor `try_find` a little)
- rust-lang#72689 (add str to common types)
- rust-lang#72791 (update coerce docs and unify relevant tests)
- rust-lang#72934 (forbid mutable references in all constant contexts except for const-fns)
- rust-lang#73027 (Make `need_type_info_err` more conservative)
- rust-lang#73347 (Diagnose use of incompatible sanitizers)
- rust-lang#73359 (shim.rs: avoid creating `Call` terminators calling `Self`)
- rust-lang#73399 (Clean up E0668 explanation)
- rust-lang#73436 (Clean up E0670 explanation)
- rust-lang#73440 (Add src/librustdoc as an alias for src/tools/rustdoc)
- rust-lang#73442 (pretty/mir: const value enums with no variants)
- rust-lang#73452 (Unify region variables when projecting associated types)
- rust-lang#73458 (Use alloc::Layout in DroplessArena API)
- rust-lang#73484 (Update the doc for std::prelude to the correct behavior)
- rust-lang#73506 (Bump Rustfmt and RLS)
Failed merges:
r? @ghost
@bors
bors merged commit 61f8c3e into rust-lang:masterJun 20, 2020
@matthewjasper
matthewjasper deleted the auto-rec branch June 20, 2020 11:16
@rustbotrustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 20, 2020
@spastorinospastorino removed the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 20, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 20, 2020
…ion-error, r=nikomatsakis
Don't immediately error for cycles during normalization
rust-lang#73452 meant some normalization cycles could be detected earlier, breaking some code.
This PR makes defers errors for normalization cycles to fulfillment, fixing said code.
Fixesrust-lang#74868
r? @nikomatsakis
@cuvipercuviper added this to the 1.46 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@matthewjasper@rust-timer@bors@nikomatsakis@cuviper@spastorino@rust-highfive@rustbot@Aaron1011