Add *_value methods to proc_macro lib#139367
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
This comment has been minimized.
This comment has been minimized.
|
Blocked on rust-lang/literal-escaper#4. |
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
8dde143 to
017e99b
Compare
|
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
|
Applied suggestions. :) |
| #[unstable(feature = "proc_macro_diagnostic", issue = "54140")] | ||
| pub use diagnostic::{Diagnostic, Level, MultiSpan}; | ||
| #[unstable(feature = "proc_macro_value", issue = "136652")] | ||
| pub use rustc_literal_escaper::EscapeError; |
There was a problem hiding this comment.
We might want to define our own error enum instead of using the rustc_literal_escaper one since any changes to it will directly impact the proc-macro crate.
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#138562 (Optimize slice {Chunks,Windows}::nth) - rust-lang#138876 (Trusty: Implement `write_vectored` for stdio ) - rust-lang#139072 (Add `slice::align_to_uninit_mut`) - rust-lang#139367 (Add `*_value` methods to proc_macro lib) - rust-lang#139391 (Check if merged attributes list is empty in expr) - rust-lang#139414 (Fix typo in `RawList`'s documentation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139367 - GuillaumeGomez:proc-macro-values, r=Urgau Add `*_value` methods to proc_macro lib This is the (re-)implementation of rust-lang/libs-team#459. It allows to get the actual value (unescaped) of the different string literals. It was originally done in rust-lang#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation. Part of rust-lang#136652. Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/ r? `@Urgau`
…r=Urgau Add `*_value` methods to proc_macro lib This is the (re-)implementation of rust-lang/libs-team#459. It allows to get the actual value (unescaped) of the different string literals. It was originally done in rust-lang#136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation. Part of rust-lang#136652. Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/ r? `@Urgau`
|
Why were the tests not added, that were part of the original PR? |
|
Tests are in the |
This is the (re-)implementation of rust-lang/libs-team#459.
It allows to get the actual value (unescaped) of the different string literals.
It was originally done in #136355 but it broke the artifacts build so we decided to move the crate to crates.io to go around this limitation.
Part of #136652.
Considering this is a copy-paste of the originally approved PR, no need to go through the whole process again. \o/
r? @Urgau