Skip to content

use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution#103902

Merged
bors merged 1 commit into
rust-lang:masterfrom
vincenzopalazzo:macros/obligation_rulesv2
Jan 25, 2023
Merged

use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution#103902
bors merged 1 commit into
rust-lang:masterfrom
vincenzopalazzo:macros/obligation_rulesv2

Conversation

@vincenzopalazzo

@vincenzopalazzo vincenzopalazzo commented Nov 2, 2022

Copy link
Copy Markdown
Member

This commit introduces a refactoring suggested by @lcnr to simplify the obligation clause resolution.

This is just the first PR that introduces a type of refactoring, but others PRs will follow this to introduce name changing to change from the variable name from body_id to something else.

Fixes #104827

Signed-off-by: Vincenzo Palazzo vincenzopalazzodev@gmail.com

@rustbot r? @lcnr

@rustbot

rustbot commented Nov 2, 2022

Copy link
Copy Markdown
Collaborator

r? @nagisa

(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 Nov 2, 2022
@rustbot rustbot assigned lcnr and unassigned nagisa Nov 2, 2022
@rust-log-analyzer

This comment has been minimized.

@vincenzopalazzo vincenzopalazzo force-pushed the macros/obligation_rulesv2 branch from a8d2b49 to c7f97b2 Compare November 2, 2022 20:49
@rust-log-analyzer

This comment has been minimized.

@lcnr lcnr left a comment

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.

didn't yet look through everything, will do the rest of this PR later

Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs Outdated
@vincenzopalazzo vincenzopalazzo force-pushed the macros/obligation_rulesv2 branch from c7f97b2 to 16dc523 Compare November 3, 2022 08:38
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_hir_analysis/src/check/intrinsic.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/hir_wf_check.rs Outdated
Comment thread compiler/rustc_hir_typeck/src/check.rs Outdated
Comment thread compiler/rustc_middle/src/hir/map/mod.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/outlives_bounds.rs Outdated
Comment thread compiler/rustc_traits/src/implied_outlives_bounds.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@vincenzopalazzo vincenzopalazzo force-pushed the macros/obligation_rulesv2 branch from 41028d8 to 73e2d77 Compare November 4, 2022 21:46
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_hir_analysis/src/check/compare_method.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/wf.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/wf.rs Outdated
Comment thread compiler/rustc_traits/src/type_op.rs Outdated
Comment thread compiler/rustc_traits/src/type_op.rs Outdated
Comment thread compiler/rustc_ty_utils/src/ty.rs Outdated
@bors

bors commented Nov 4, 2022

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #103978) made this pull request unmergeable. Please resolve the merge conflicts.

Comment thread compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs Outdated
Comment thread compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs Outdated
@oli-obk

oli-obk commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2022
@vincenzopalazzo vincenzopalazzo force-pushed the macros/obligation_rulesv2 branch from 73e2d77 to e263973 Compare November 8, 2022 19:24
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Nov 8, 2022
@vincenzopalazzo vincenzopalazzo force-pushed the macros/obligation_rulesv2 branch from e263973 to bafe349 Compare November 8, 2022 20:45
@vincenzopalazzo

Copy link
Copy Markdown
Member Author

@rustbot r? @cjgillot

@rustbot label -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot assigned cjgillot and unassigned lcnr Nov 8, 2022
@bors

bors commented Jan 23, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7d2c110 with merge 7953c4b0d4f5a2d237eca649840ff1f8c048b78d...

@bors

bors commented Jan 23, 2023

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 23, 2023
@cjgillot

Copy link
Copy Markdown
Contributor

@bors retry

@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 Jan 23, 2023
@bors

bors commented Jan 24, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7d2c110 with merge 8e4fe1c424fb53f568412de91412d244d96f868d...

@bors

bors commented Jan 24, 2023

Copy link
Copy Markdown
Collaborator

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 24, 2023
@oli-obk

oli-obk commented Jan 24, 2023

Copy link
Copy Markdown
Contributor

@bors retry timeout

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 24, 2023
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors

bors commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7d2c110 with merge b98e2203189b297d9f2800668e7b84e62d79b7b0...

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors

bors commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-actions

@oli-obk

oli-obk commented Jan 25, 2023

Copy link
Copy Markdown
Contributor

@bors retry unable to access 'https://github.com/rust-lang/stdarch.git/': Failed to connect to github.com port 443: Connection timed out

@bors

bors commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 7d2c110 with merge 027c850...

@bors

bors commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 027c850 to master...

1 similar comment
@bors

bors commented Jan 25, 2023

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 027c850 to master...

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (027c850): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 4
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.3%] 3
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 4

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
2.4% [2.2%, 2.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.0% [-3.0%, -1.0%] 2
All ❌✅ (primary) 3.5% [3.5%, 3.5%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. 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.

internal compiler error: local_def_id: no entry for HirId