Skip to content
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

Some minor dyn-related tweaks #133393

Merged
merged 3 commits into from
Nov 27, 2024
Merged

Conversation

compiler-errors
Copy link
Member

Each commit should be self-explanatory, but I'm happy to explain what's going on if not. These are tweaks I pulled out of #133388, but they can be reviewed sooner than that.

r? types

@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 23, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 23, 2024

HIR ty lowering was modified

cc @fmease

changes to the core type system

cc @compiler-errors, @lcnr

Some(predicate.with_self_ty(tcx, tcx.types.trait_object_dummy_self))
} else {
None
Copy link
Contributor

Choose a reason for hiding this comment

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

this relies on auto-traits not having any region bounds 🤔 I don't like the fact that we implicitly rely on that here, given that we may change it in the future, even if I can't think of any auto trait which does so.

Why don't we just pass in all ExistentialPredicates here without any filtering? perf? the elaborator should filter duplicate predicates

@lcnr
Copy link
Contributor

lcnr commented Nov 25, 2024

nit, r=me on the other 2 commits

@compiler-errors
Copy link
Member Author

Ok, I removed the filtering and squashed the two methods together. I also don't expect the filtering to affect perf.

@lcnr
Copy link
Contributor

lcnr commented Nov 25, 2024

i guess unless this is blocking something

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 25, 2024
@bors
Copy link
Contributor

bors commented Nov 25, 2024

⌛ Trying commit bcfc8ab with merge dee4e86...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2024
Some minor dyn-related tweaks

Each commit should be self-explanatory, but I'm happy to explain what's going on if not. These are tweaks I pulled out of rust-lang#133388, but they can be reviewed sooner than that.

r? types
@bors
Copy link
Contributor

bors commented Nov 25, 2024

☀️ Try build successful - checks-actions
Build commit: dee4e86 (dee4e868592163c01100f442f9877bfea2ce01cf)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (dee4e86): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 4.6%)

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)
4.6% [4.6%, 4.6%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.6% [4.6%, 4.6%] 1

Cycles

Results (primary -2.3%)

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.3%, -2.3%] 1

Binary size

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

Bootstrap: 796.592s -> 798.676s (0.26%)
Artifact size: 336.27 MiB -> 336.26 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 25, 2024
@compiler-errors
Copy link
Member Author

@bors r=lcnr,spastorino

@bors
Copy link
Contributor

bors commented Nov 25, 2024

📌 Commit bcfc8ab has been approved by lcnr,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 Nov 25, 2024
@bors
Copy link
Contributor

bors commented Nov 27, 2024

⌛ Testing commit bcfc8ab with merge c322cd5...

@bors
Copy link
Contributor

bors commented Nov 27, 2024

☀️ Test successful - checks-actions
Approved by: lcnr,spastorino
Pushing c322cd5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 27, 2024
@bors bors merged commit c322cd5 into rust-lang:master Nov 27, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Nov 27, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c322cd5): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (primary 1.4%)

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)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.4%, 1.4%] 1

Binary size

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

Bootstrap: 793.948s -> 795.759s (0.23%)
Artifact size: 336.16 MiB -> 336.16 MiB (-0.00%)

@@ -727,7 +727,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
let tcx = self.tcx();
// FIXME: Marked `mut` so that we can replace the spans further below with a more
// appropriate one, but this should be handled earlier in the span assignment.
let mut associated_types: FxIndexMap<Span, Vec<_>> = associated_types
let associated_types: FxIndexMap<Span, Vec<_>> = associated_types
Copy link

@cher-nov cher-nov Dec 3, 2024

Choose a reason for hiding this comment

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

Hasn't a FIXME comment above became outdated after this?

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.

7 participants