Skip to content

Gate the type length limit check behind a nightly flag #127670

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 13, 2024

Effectively disables the type length limit by introducing a -Zenforce-type-length-limit which defaults to false, since making the length limit actually be enforced ended up having a worse fallout than expected. We still keep the code around, but the type length limit attr is now a noop (except for its usage in some diagnostics code?).

r? @lcnr -- up to you to decide what team consensus we need here since this reverses an FCP decision.

Reopens #125460 (if we decide to reopen it or keep it closed)
Effectively reverses the decision FCP'd in #125507
Closes #127346

@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 13, 2024
@compiler-errors compiler-errors added I-types-nominated Nominated for discussion during a types team meeting. T-types Relevant to the types team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 13, 2024
@jackh726
Copy link
Member

imo this is the right choice - there is more fallout than I think we anticipated with re-adding the type length limit.

r=me, but maybe we want to wait a day or so for anyone in the team to dissent

@compiler-errors
Copy link
Member Author

@bors r=jackh726

we can easily turn this back on

@bors
Copy link
Collaborator

bors commented Jul 14, 2024

📌 Commit 938ed36 has been approved by jackh726

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 Jul 14, 2024
@compiler-errors
Copy link
Member Author

@bors rollup=never

@bors
Copy link
Collaborator

bors commented Jul 14, 2024

⌛ Testing commit 938ed36 with merge 88fa119...

@rust-highfive
Copy link
Contributor

📣 Toolstate changed by #127670!

Tested on commit 88fa119.
Direct link to PR: #127670

💔 reference on windows: test-pass → test-fail (cc @Havvy @matthewjasper @ehuss).
💔 reference on linux: test-pass → test-fail (cc @Havvy @matthewjasper @ehuss).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jul 14, 2024
Tested on commit rust-lang/rust@88fa119.
Direct link to PR: <rust-lang/rust#127670>

💔 reference on windows: test-pass → test-fail (cc @Havvy @matthewjasper @ehuss).
💔 reference on linux: test-pass → test-fail (cc @Havvy @matthewjasper @ehuss).
@bors
Copy link
Collaborator

bors commented Jul 14, 2024

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing 88fa119 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 14, 2024
@bors bors merged commit 88fa119 into rust-lang:master Jul 14, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 14, 2024
@ehuss
Copy link
Contributor

ehuss commented Jul 14, 2024

@compiler-errors Can you please update the reference at https://github.com/rust-lang/reference/blob/master/src/attributes/limits.md#the-type_length_limit-attribute? This PR has broken the test there, and I'm not sure how the documentation should be updated. Is this attribute deprecated now?

@compiler-errors
Copy link
Member Author

@ehuss:

Sure. The attribute is not deprecated per se, but it doesn't do anything right now. Previously it didn't do anything in real code, but it was easier to make a pathological example like rust-lang/reference#1026 did after it previously broke in #72412. See #125460.

I'll just remove the test. Not sure what we should do with the documentation. I'll probably just mention the attr doesn't do anything (which isn't totally true -- it actually is used in diagnostics, but I don't want to encourage people to use the attr).

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (88fa119): 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.6% [-1.4%, -0.2%] 28
Improvements ✅
(secondary)
-1.1% [-1.5%, -0.4%] 8
All ❌✅ (primary) -0.6% [-1.4%, -0.2%] 28

Max RSS (memory usage)

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

Cycles

Results (primary -1.0%)

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)
-1.0% [-1.1%, -0.8%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.1%, -0.8%] 2

Binary size

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

Bootstrap: 702.998s -> 699.561s (-0.49%)
Artifact size: 328.72 MiB -> 328.65 MiB (-0.02%)

# for free to join this conversation on GitHub. Already have an account? # 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-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New reached the type-length limit while instantiating error appearing on 1.81.0-nightly (aa1d4f682 2024-07-03)
9 participants