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

Fix <BoundConstness as Display> #119447

Merged
merged 1 commit into from
Dec 31, 2023
Merged

Conversation

Noratrieb
Copy link
Member

There was infinite recursion, which is not very good. I'm not sure what the best way to implement this is, I just did something that felt right.

r? @fmease

There was infinite recursion, which is not very good. I'm not sure what
the best way to implement this is, I just did something that felt right.
@Noratrieb Noratrieb marked this pull request as ready for review December 30, 2023 16:24
@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 Dec 30, 2023
@@ -333,7 +333,8 @@ impl fmt::Display for BoundConstness {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::NotConst => f.write_str("normal"),
Copy link
Member

Choose a reason for hiding this comment

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

why are we calling this "normal"

Copy link
Member

Choose a reason for hiding this comment

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

where is this Display impl even used? if it's not used, pls remove instead

Copy link
Member Author

Choose a reason for hiding this comment

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

It is used, in the error reporting for TypeError::ConstnessMismatch.

Copy link
Member

Choose a reason for hiding this comment

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

oh ok

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 30, 2023

📌 Commit e36a24e has been approved by compiler-errors

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 Dec 30, 2023
@@ -333,7 +333,8 @@ impl fmt::Display for BoundConstness {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::NotConst => f.write_str("normal"),
_ => write!(f, "`{self}`"),
Copy link
Member

@fmease fmease Dec 30, 2023

Choose a reason for hiding this comment

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

Oh, that was supposed to be write!(f, "`{}`", self.as_str())

@bors
Copy link
Contributor

bors commented Dec 31, 2023

⌛ Testing commit e36a24e with merge 64d5515...

@bors
Copy link
Contributor

bors commented Dec 31, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 64d5515 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 31, 2023
@bors bors merged commit 64d5515 into rust-lang:master Dec 31, 2023
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Dec 31, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (64d5515): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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

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.056s -> 668.357s (-0.10%)
Artifact size: 311.78 MiB -> 311.73 MiB (-0.01%)

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.

6 participants