-
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
Warn on unused offset_of!()
result
#111684
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment has been minimized.
This comment has been minimized.
6c63bf1
to
21cff46
Compare
This comment has been minimized.
This comment has been minimized.
21cff46
to
dfa71f1
Compare
dfa71f1
to
56d5898
Compare
This comment has been minimized.
This comment has been minimized.
@ChayimFriedman2 you should probably rebase on master and then run |
56d5898
to
b6af898
Compare
This comment has been minimized.
This comment has been minimized.
b6af898
to
460c3a8
Compare
@@ -2,49 +2,39 @@ error[E0308]: mismatched types | |||
--> $DIR/offset-of-output-type.rs:12:17 | |||
| | |||
LL | let _: u8 = offset_of!(S, v); | |||
| -- ^^^^^^^^^^^^^^^^ expected `u8`, found `usize` | |||
| | | |||
| expected due to this |
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.
Kind of a shame we are missing those, but I'm not sure what to do with that...
@bors r+ |
📌 Commit 460c3a8f3019370ecf20876b24bc0ff4cb7372d6 has been approved by It is now in the queue for this repository. |
⌛ Testing commit 460c3a8f3019370ecf20876b24bc0ff4cb7372d6 with merge 4c238050a5a58daca1fee25804464e9138506abf... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
This comment was marked as resolved.
This comment was marked as resolved.
📌 Commit d3caa2ab349d9eb234b1f61f57db27cf98ccf117 has been approved by It is now in the queue for this repository. |
@ChayimFriedman2 that's interesting. I have tried running the command I suggested above and ran into some issues due to cross compilation toolchains not being available. So I couldn't reproduce your issue, but not because it's working for me but because it's even more broken :). |
⌛ Testing commit d3caa2ab349d9eb234b1f61f57db27cf98ccf117 with merge 2e99d62427028bc9995f9bd056acdb1ccab80ab0... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I don't understand. This is exactly the opposite of the previous failure. Something strange is happening here. |
If I do what bors wants (which BTW is what |
A few things:
|
x86_64-pc-windows-msvc
It is configured to
No, it fails for the 64 bit target (and doesn't check 32 bit therefore). |
wait I'm confused. If you |
|
That is, |
🤦 your test needs a |
d3caa2a
to
592844c
Compare
@bors r=WaffleLapkin |
☀️ Test successful - checks-actions |
Finished benchmarking commit (006a26c): 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 660.125s -> 659.628s (-0.08%) |
The usage of
core::hint::must_use()
means that we don't get a specialized message. I figured out that since there are plenty of other methods that just have#[must_use]
with no message it'll be fine, but it is a bit unfortunate that the error mentionsmust_use
and notoffset_of!
.Fixes #111669.