Uh oh!
There was an error while loading. Please reload this page.
WIP Add a shim for functions annotated with #[track_caller] (RFC 2091 #2/N) - #65082
WIP Add a shim for functions annotated with #[track_caller] (RFC 2091 #2/N)#65082anp wants to merge 14 commits into
#[track_caller] (RFC 2091 #2/N)#65082Conversation
rust-highfive
commented
Oct 4, 2019
Some changes occurred in diagnostic error codes |
rust-highfive
commented
Oct 4, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
GuillaumeGomez
left a comment
There was a problem hiding this comment.
Just for precision: I ask for failing examples not only for consistency but also to be sure that the error code will still be used by the compiler.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
anp
commented
Oct 4, 2019
Do you mean this as a test? There are some UI tests that do this. Also minor nit: the diffs you reviewed are from #65037. |
GuillaumeGomez
commented
Oct 4, 2019
@anp Consider this as a backup. It'll at least force the one removing the error code to update the long error explanation. |
d22bbc0 to
94e1c55Comparerust-highfive
commented
Oct 4, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
- The attribute is behind a feature gate. - Error if both #[naked] and #[track_caller] are applied to the same function. - Error if #[track_caller] is applied to a non-function item. - Error if ABI is not "rust" - Error if #[track_caller] is applied to a trait function. Error codes and descriptions are pending.
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Prevents number collision with another approved PR.
94e1c55 to
c352edaComparerust-highfive
commented
Oct 5, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
rust-highfive
commented
Oct 6, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Oct 7, 2019
☔ The latest upstream changes (presumably #64906) made this pull request unmergeable. Please resolve the merge conflicts. |
anp
commented
Oct 7, 2019
I had some fun with git history and opened a new PR: #65182 |
Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N) Supercedes: #65082 Depends on: #65037 Tracking issue: #47809 [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) steps taken: * [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183) * [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers * [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
Depends on: #65037
Tracking issue: #47809
RFC text
TODO:
ReifyShimthat is similar toVirtualShimin behavior (see Implement by-value object safety #54183)ty::Instance::resolve_for_fn_ptr(leavety::Instance::resolve_vtablealone), migrate appropriate callersresolve_for_fn_ptrreturns the shim if calling a#[track_caller]function