rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Timur Tabi <ttabi@nvidia.com>
Cc: "ojeda@kernel.org" <ojeda@kernel.org>,
	"aliceryhl@google.com" <aliceryhl@google.com>,
	 "lossin@kernel.org" <lossin@kernel.org>,
	"dakr@kernel.org" <dakr@kernel.org>,
	 "rust-for-linux@vger.kernel.org"
	<rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v3] rust: introduce sfile macro for succinct code tracing
Date: Mon, 16 Jun 2025 20:18:55 +0200	[thread overview]
Message-ID: <CANiq72ki5AJFJeKXhBa1wy84AdBN5Eeg1cP168807_q6PvmvPA@mail.gmail.com> (raw)
In-Reply-To: <62d73bf7771852188d915fbdf5dc23f7d9260121.camel@nvidia.com>

On Mon, Jun 16, 2025 at 5:37 PM Timur Tabi <ttabi@nvidia.com> wrote:
>
> After a little more trial an error, the compiler told me that the correct namespace is:
>
>             assert!(core::primitive::str::is_ascii(FILE));

Yeah, that looks fine since it comes from here:

    https://doc.rust-lang.org/core/primitive.char.html#method.is_ascii

(Please use `::core` within macros.)

> That works.  Do you want me to use this or just str::is_ascii?

`str` could in principle also be broken, e.g.:

    https://godbolt.org/z/Ysxnb1WPP

> Also, how do I add "-Z macro-backtrace" to the build?

You can use e.g.:

    make ... KRUSTFLAGS=-Zmacro-backtrace

I hope that helps!

Cheers,
Miguel

  reply	other threads:[~2025-06-16 18:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 22:36 [PATCH v3] rust: introduce sfile macro for succinct code tracing Timur Tabi
2025-06-10  2:33 ` John Hubbard
2025-06-10  3:40   ` Timur Tabi
2025-06-10  8:31     ` Benno Lossin
2025-06-10  8:45 ` Benno Lossin
2025-06-13 17:03   ` Timur Tabi
2025-06-13 17:57     ` Miguel Ojeda
2025-06-13 19:14       ` Timur Tabi
2025-06-13 20:08         ` Timur Tabi
2025-06-13 19:32   ` Timur Tabi
2025-06-13 20:06     ` Timur Tabi
2025-06-14 17:08       ` Benno Lossin
2025-06-16 15:37         ` Timur Tabi
2025-06-16 18:18           ` Miguel Ojeda [this message]
2025-06-13 22:46   ` Timur Tabi
2025-06-14 18:01     ` Benno Lossin
2025-06-10  8:47 ` Miguel Ojeda
2025-06-10 19:18   ` Timur Tabi
2025-06-10 19:29     ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANiq72ki5AJFJeKXhBa1wy84AdBN5Eeg1cP168807_q6PvmvPA@mail.gmail.com \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=ttabi@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).