-
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
Add format_args_capture
feature
#73670
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
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 |
eb14865
to
6b95f31
Compare
Looks like was a formatting failure, have force-pushed with tidied formatting. |
You can use https://rustc-dev-guide.rust-lang.org/implementing_new_features.html and the two pages following it to read more about fully implementing a feature. EDIT: I see you already did it, sorry for the useless comment ! |
Thanks for the feedback; I've adjusted messaging based on it 👍 |
I've added a commit which (I think) will add a page documenting this feature to the unstable book. Please let me know any other locations where it would be good to document this feature. (Maybe in |
d042761
to
a1217cb
Compare
Sorry, will try to get to this soon (it's been a busy week)! |
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.
This looks good to me. I just have one comment.
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 |
a2dc293
to
1a03432
Compare
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 |
I'll fix this evening the test failure caused by our change to the diagnostic wording |
Apply suggestion from varkor Co-authored-by: varkor <github@varkor.com>
860db00
to
10ebb2c
Compare
This looks good to me; thanks for the pull request! @bors r+ |
📌 Commit 10ebb2c has been approved by |
…varkor Add `format_args_capture` feature This is the initial implementation PR for [RFC 2795](rust-lang/rfcs#2795). Note that, as dicussed in the tracking issue (rust-lang#67984), the feature gate has been called `format_args_capture`. Next up I guess I need to add documentation for this feature. I've not written any docs before for rustc / std so I would appreciate suggestions on where I should add docs.
Looks like the tests for Is it fine to just add |
You can add a comment to the relevant tests like this: rust/src/test/codegen/global_asm_include.rs Lines 37 to 39 in f8b796b
|
Thanks, I've pushed a tweak which adds Really a more elegant solution would be to add a I couldn't find such a |
Thanks. @bors r+
I'm not sure what use cases this would have other than for tests. Maybe you could open up an issue if you can think of others, though? |
📌 Commit 93d662f has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 93d662f has been approved by |
So far I've only seen it useful for tests as you say. I've seen this same issue of tests aborting on panic crop up in pyO3. I'll leave it for now. |
…arth Rollup of 12 pull requests Successful merges: - rust-lang#73140 (Fallback to xml.etree.ElementTree) - rust-lang#73670 (Add `format_args_capture` feature) - rust-lang#73693 (Use exhaustive match in const_prop.rs) - rust-lang#73845 (Use &raw in A|Rc::as_ptr) - rust-lang#73861 (Create E0768) - rust-lang#73881 (Standardize bibliographic citations in rustc API docs) - rust-lang#73925 (Improve comments from rust-lang#72617, as suggested by RalfJung) - rust-lang#73949 ([mir-opt] Fix mis-optimization and other issues with the SimplifyArmIdentity pass) - rust-lang#73984 (Edit docs for rustc_data_structures::graph::scc) - rust-lang#73985 (Fix "getting started" link) - rust-lang#73997 (fix typo) - rust-lang#73999 (Bump mingw-check CI image from Ubuntu 16.04 to 18.04.) Failed merges: - rust-lang#74000 (add `lazy_normalization_consts` feature gate) r? @ghost
…orse Add `#[cfg(panic = '...')]` This PR adds conditional compilation according to the panic strategy. I've come across a need for a flag like this a couple of times while writing tests: rust-lang#74301 , rust-lang#73670 (comment) I'm not sure if I need to add a feature gate for this flag?
This is the initial implementation PR for RFC 2795.
Note that, as dicussed in the tracking issue (#67984), the feature gate has been called
format_args_capture
.Next up I guess I need to add documentation for this feature. I've not written any docs before for rustc / std so I would appreciate suggestions on where I should add docs.