rust icon indicating copy to clipboard operation
rust copied to clipboard

Consolidate WF for aliases

Open compiler-errors opened this issue 1 year ago • 7 comments

Make RPITs/TAITs/weak (type) aliases/projections all enforce:

  1. their nominal predicates
  2. their args are WF

This possibly does extra work, but is also nice for consistency sake.

r? lcnr

compiler-errors avatar Mar 11 '24 17:03 compiler-errors

@bors try

compiler-errors avatar Mar 11 '24 17:03 compiler-errors

:hourglass: Trying commit b16ff297ce2f6d484a8360a164c8b19d11117917 with merge eb761a90cb473450ad47653f743c60864a1daebd...

bors avatar Mar 11 '24 17:03 bors

@rust-timer queue

compiler-errors avatar Mar 11 '24 18:03 compiler-errors

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rust-timer avatar Mar 11 '24 18:03 rust-timer

:sunny: Try build successful - checks-actions Build commit: eb761a90cb473450ad47653f743c60864a1daebd (eb761a90cb473450ad47653f743c60864a1daebd)

bors avatar Mar 11 '24 19:03 bors

Queued eb761a90cb473450ad47653f743c60864a1daebd with parent 65cd843ae06ad00123c131a431ed5304e4cd577a, future comparison URL. There are currently 3 preceding artifacts in the queue. It will probably take at least ~3.6 hours until the benchmark run finishes.

rust-timer avatar Mar 11 '24 19:03 rust-timer

Finished benchmarking commit (eb761a90cb473450ad47653f743c60864a1daebd): 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 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)
1.8% [0.6%, 4.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 652.28s -> 651.369s (-0.14%) Artifact size: 309.94 MiB -> 310.01 MiB (0.02%)

rust-timer avatar Mar 11 '24 22:03 rust-timer

compute_projection_args is just alias_ty.visit_with(with), but less performant as it emmits nested goals. Might be worth it to try and change it in this PR as well.

It also filters args w/ escaping bound vars.

compiler-errors avatar Mar 14 '24 16:03 compiler-errors

@bors r=lcnr rollup

compiler-errors avatar Mar 14 '24 16:03 compiler-errors

:pushpin: Commit 04524c8f6aef8a8a1b3b80edb93815e86caeddfa has been approved by lcnr

It is now in the queue for this repository.

bors avatar Mar 14 '24 16:03 bors

actually why did i roll that up

@bors rollup=never

(useful for bisection i guess)

compiler-errors avatar Mar 14 '24 16:03 compiler-errors

It also filters args w/ escaping bound vars.

yeah, so by eagerly recursing we filter slightly fewer types, e.g. we start emitting an error for for<'a> Alias<([str], &'a u32)>. However, this is desirable :>

lcnr avatar Mar 14 '24 16:03 lcnr

I'd rather crater that in a separate PR, and perhaps also throw in other cases (e.g. trait refs) where this is being done in WF

compiler-errors avatar Mar 14 '24 16:03 compiler-errors

#122501

compiler-errors avatar Mar 14 '24 16:03 compiler-errors

:hourglass: Testing commit 04524c8f6aef8a8a1b3b80edb93815e86caeddfa with merge 1ca424ca436d4d4449def39723c9ec442837c370...

bors avatar Mar 15 '24 19:03 bors

:sunny: Test successful - checks-actions Approved by: lcnr Pushing 1ca424ca436d4d4449def39723c9ec442837c370 to master...

bors avatar Mar 15 '24 21:03 bors

Finished benchmarking commit (1ca424ca436d4d4449def39723c9ec442837c370): comparison URL.

Overall result: ❌ regressions - 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)
1.0% [0.6%, 1.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
2.3% [1.1%, 3.6%] 15
Regressions ❌
(secondary)
2.4% [0.5%, 3.7%] 56
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.3% [1.1%, 3.6%] 15

Cycles

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

Binary size

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

Bootstrap: 669.355s -> 669.777s (0.06%) Artifact size: 311.47 MiB -> 311.40 MiB (-0.02%)

rust-timer avatar Mar 15 '24 22:03 rust-timer