Uh oh!
There was an error while loading. Please reload this page.
Add #[rustc_safe_intrinsic] - #100719
Conversation
rust-highfive
commented
Aug 18, 2022
(rust-highfive has picked a reviewer for you, use r? to override) |
rustbot
commented
Aug 18, 2022
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
compiler-errors
commented
Aug 18, 2022
Hm, Does this need a compiler MCP? |
compiler-errors
commented
Aug 18, 2022
r? @wesleywiser since you said you would review the patches :) |
bors
commented
Aug 28, 2022
☔ The latest upstream changes (presumably #96946) made this pull request unmergeable. Please resolve the merge conflicts. |
3f0b2b8 to
a255c4bCompare
This comment has been minimized.
This comment has been minimized.
a255c4b to
4a8bdfdCompareCohenArthur
commented
Sep 9, 2022
Following the discussion around the MCP, I've added the logic for checking the presence of the attribute on top of the existing "safe intrinsic list". This allows consumers of the |
4a8bdfd to
422fad6Compare
This comment has been minimized.
This comment has been minimized.
422fad6 to
79545e3Comparebjorn3
commented
Sep 10, 2022
The first commit is a spurious duplicate of a commit that has already landed on master. |
bors
commented
Sep 10, 2022
☔ The latest upstream changes (presumably #101483) made this pull request unmergeable. Please resolve the merge conflicts. |
d880fd4 to
bb2d43dCompareCohenArthur
commented
Sep 14, 2022
This was fixed in 9192089 and bb2d43d by the way |
Uh oh!
There was an error while loading. Please reload this page.
bb2d43d to
062b103Compare
wesleywiser
left a comment
There was a problem hiding this comment.
Would you mind also adding a UI test for the compiler error? It would be good to test both #[rustc_safe_intrinsic] on an intrinsic that isn't safe and not having the attribute on an intrinsic that is safe. Since we call err and not fatal, I think you should be able to put both cases in the test.
Other than that, this looks good to me! 🙂
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Sep 26, 2022
☔ The latest upstream changes (presumably #102051) made this pull request unmergeable. Please resolve the merge conflicts. |
062b103 to
8a38ca1CompareCohenArthur
commented
Sep 27, 2022
I've fixed the formatting, added the test and fixed the merge conflicts. The error does not have any location info at the moment, so I don't mind spending a little more time on that if you think it'd be worth it @wesleywiser |
bors
commented
Sep 27, 2022
☔ The latest upstream changes (presumably #102306) made this pull request unmergeable. Please resolve the merge conflicts. |
8a38ca1 to
cedc019Compare
wesleywiser
left a comment
There was a problem hiding this comment.
It should be easy enough to get a nice span associated with the error (I believe the suggestion I left is sufficient for that to happen) so let's go ahead and do that. The rest of this looks good to me!
Uh oh!
There was an error while loading. Please reload this page.
cedc019 to
b1b8649Comparewesleywiser
commented
Sep 28, 2022
Thanks @CohenArthur! @bors r+ |
bors
commented
Sep 28, 2022
bors
commented
Sep 28, 2022
bors
commented
Sep 28, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Sep 28, 2022
Finished benchmarking commit (ce7f0f1): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
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. Footnotes |
…ibute, r=wesleywiser Add `#[rustc_safe_intrinsic]` This PR adds the `#[rustc_safe_intrinsic]` attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to `#[rustc_const_stable]` and `#[rustc_const_unstable]`, which among other things, are used to mark the constness of intrinsic functions.
This PR adds the
#[rustc_safe_intrinsic]attribute as mentionned on Zulip. The goal of this attribute is to avoid keeping a list of symbols as the source for stable intrinsics, and instead rely on an attribute. This is similar to#[rustc_const_stable]and#[rustc_const_unstable], which among other things, are used to mark the constness of intrinsic functions.