Uh oh!
There was an error while loading. Please reload this page.
Implement builtin # syntax and use it for offset_of!(...) - #110694
Conversation
rustbot
commented
Apr 22, 2023
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
clubby789
commented
Apr 22, 2023
Once |
est31
commented
Apr 22, 2023
@clubby789 personally I'd like that, yes. It is imo better to have such a primitive than |
This comment has been minimized.
This comment has been minimized.
beepster4096
commented
Apr 23, 2023
It might be better to have a |
Oh I was unaware of rust-lang/compiler-team#460 and #89030 . It seems to be a special case just to support Unwinding seems to be implemented weirdly, order depending on whether there is a panic call or not: structLoudDrop(u8);implDropforLoudDrop{fndrop(&mutself){println!("dropping {}",self.0);}}fnmain(){{let _v = vec!(LoudDrop(0),LoudDrop(1));}println!("Hi");{let _v = vec!(LoudDrop(2),LoudDrop(3),LoudDrop(4), panic!());}}prints anyways we should better discuss this in a separate thread, I want to keep this one dedicated to my PR. Edit: filed #110715 |
rustbot
commented
Apr 23, 2023
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
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.
petrochenkov
commented
May 4, 2023
est31
commented
May 4, 2023
@rustbot ready |
petrochenkov
commented
May 5, 2023
@bors r+ |
bors
commented
May 5, 2023
📌 Commit d5669bf7f881d194c9c5ff1536c67fa635d4030c has been approved by It is now in the queue for this repository. |
Rollup of 6 pull requests Successful merges: - rust-lang#103056 (Fix `checked_{add,sub}_duration` incorrectly returning `None` when `other` has more than `i64::MAX` seconds) - rust-lang#108801 (Implement RFC 3348, `c"foo"` literals) - rust-lang#110773 (Reduce MIR dump file count for MIR-opt tests) - rust-lang#110876 (Added default target cpu to `--print target-cpus` output and updated docs) - rust-lang#111068 (Improve check-cfg implementation) - rust-lang#111238 (btree_map: `Cursor{,Mut}::peek_prev` must agree) Failed merges: - rust-lang#110694 (Implement builtin # syntax and use it for offset_of!(...)) r? `@ghost` `@rustbot` modify labels: rollup
This comment was marked as resolved.
This comment was marked as resolved.
petrochenkov
commented
May 5, 2023
@bors r+ |
bors
commented
May 5, 2023
Rollup of 7 pull requests Successful merges: - rust-lang#110304 (Add GNU Property Note) - rust-lang#110504 (Tweak borrow suggestion span) - rust-lang#110583 (tweak "make mut" spans when assigning to locals) - rust-lang#110694 (Implement builtin # syntax and use it for offset_of!(...)) - rust-lang#111120 (Suggest let for possible binding with ty) - rust-lang#111252 (Min specialization improvements) - rust-lang#111361 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add
builtin #syntax to the parser, as well as a generic infrastructure to support both item and expression position builtin syntaxes. The PR also uses this infrastructure for the implementation of theoffset_of!macro, added by #106934.cc @petrochenkov@drmeepster
cc #110680
builtin #tracking issuecc #106655
offset_of!tracking issue