-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix <BoundConstness as Display>
#119447
Conversation
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.
@@ -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"), |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok
@bors r+ rollup |
@@ -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}`"), |
There was a problem hiding this comment.
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())
☀️ Test successful - checks-actions |
Finished benchmarking commit (64d5515): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 669.056s -> 668.357s (-0.10%) |
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