summaryrefslogtreecommitdiffstats
path: root/vendor/color-print-proc-macro/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/color-print-proc-macro/src
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/color-print-proc-macro/src')
-rw-r--r--vendor/color-print-proc-macro/src/lib.rs13
-rw-r--r--vendor/color-print-proc-macro/src/untagged.rs2
2 files changed, 13 insertions, 2 deletions
diff --git a/vendor/color-print-proc-macro/src/lib.rs b/vendor/color-print-proc-macro/src/lib.rs
index 51d8c5f30..6f60056ab 100644
--- a/vendor/color-print-proc-macro/src/lib.rs
+++ b/vendor/color-print-proc-macro/src/lib.rs
@@ -87,7 +87,8 @@ pub fn cprintln(input: TokenStream) -> TokenStream {
/// Colorizes a string literal, without formatting the `format!`-like placeholders.
///
-/// Accepts only one argument.
+/// * Accepts only one argument;
+/// * Will panic if feature `terminfo` is activated.
///
/// #### Example
///
@@ -122,6 +123,16 @@ pub fn untagged(input: TokenStream) -> TokenStream {
.into()
}
+/// Colorizes a string literal, without formatting the `format!`-like placeholders.
+///
+/// * Accepts only one argument;
+/// * Will panic if feature `terminfo` is activated.
+#[cfg(feature = "terminfo")]
+#[proc_macro]
+pub fn cstr(_: TokenStream) -> TokenStream {
+ panic!("Macro cstr!() cannot be used with terminfo feature")
+}
+
/// Renders a whole processed macro.
fn get_macro(macro_name: &str, input: TokenStream) -> TokenStream {
#[cfg(not(feature = "terminfo"))]
diff --git a/vendor/color-print-proc-macro/src/untagged.rs b/vendor/color-print-proc-macro/src/untagged.rs
index feaa7edda..4e7ec4255 100644
--- a/vendor/color-print-proc-macro/src/untagged.rs
+++ b/vendor/color-print-proc-macro/src/untagged.rs
@@ -1,4 +1,4 @@
-//! Implements the [`untagged!()`] proc macro.
+//! Implements the [`crate::untagged!()`] proc macro.
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;