-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Introduce ReError
#107652
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
Introduce ReError
#107652
Conversation
error[E0597]: `buf` does not live long enough | ||
--> $DIR/issue-69314.rs:14:19 | ||
| | ||
LL | let m2 = &buf[..]; | ||
| ^^^ borrowed value does not live long enough | ||
LL | let m = Self::g(m2).await; | ||
| ----------- argument requires that `buf` is borrowed for `'static` | ||
LL | Self::f2(m).await; | ||
LL | } | ||
| - `buf` dropped here while still borrowed |
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.
We want to hide this error
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.
I've looked at this and it seems that Self::f2
doesn't seem to get around to influencing the lifetime requirements from Self::g
, let's follow up on this in a subsequent PR.
cc @rust-lang/types who might have opinions about this approach. I think making |
ef4d70f
to
349156e
Compare
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.
we may want to make FlagComputation::add_region
also set the error flag for error regions, but that may cause additional diagnostics changes, so maybe do it in a follow up PR
VarValue::ErrorValue => tcx.lifetimes.re_static, | ||
VarValue::ErrorValue => tcx.re_error(), |
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.
we may want to carry an ErrorGuaranteed
through ErrorValue
in the future, doesn't have to be this PR tho
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.
I started doing this and realized that where we construct the ErrorValue
we don't have easy access to ErrorGuaranteed
, so I'll leave this as follow up work, as suggested.
r? @oli-obk |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d1ac43a): 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.
CyclesResultsThis 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.
|
CC #69314
r? @nagisa