From: Guillaume Gomez <guillaume1.gomez@gmail.com>
To: ojeda@kernel.org, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Guillaume Gomez <guillaume1.gomez@gmail.com>
Subject: [PATCH 1/1] Improve error message in case the original file name from which the doctest was generated from to mention the doctest file path.
Date: Fri, 28 Feb 2025 18:05:31 +0100 [thread overview]
Message-ID: <20250228170530.950268-2-guillaume1.gomez@gmail.com> (raw)
In case the conversion fail, it will allow to get directly the file name
triggering this bug, making the bug fixing process faster.
Signed-off-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
---
scripts/rustdoc_test_gen.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/rustdoc_test_gen.rs b/scripts/rustdoc_test_gen.rs
index 5ebd42ae4..12115979e 100644
--- a/scripts/rustdoc_test_gen.rs
+++ b/scripts/rustdoc_test_gen.rs
@@ -87,8 +87,8 @@ fn find_candidates(
assert!(
valid_paths.len() > 0,
- "No path candidates found. This is likely a bug in the build system, or some files went \
- away while compiling."
+ "No path candidates found for `{file}`. This is likely a bug in the build system, or some \
+ files went away while compiling.",
);
if valid_paths.len() > 1 {
@@ -97,8 +97,8 @@ fn find_candidates(
eprintln!(" {path:?}");
}
panic!(
- "Several path candidates found, please resolve the ambiguity by renaming a file or \
- folder."
+ "Several path candidates found for `{file}`, please resolve the ambiguity by renaming \
+ a file or folder."
);
}
--
2.48.1
next reply other threads:[~2025-02-28 17:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 17:05 Guillaume Gomez [this message]
2025-03-09 19:47 ` [PATCH 1/1] Improve error message in case the original file name from which the doctest was generated from to mention the doctest file path 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=20250228170530.950268-2-guillaume1.gomez@gmail.com \
--to=guillaume1.gomez@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.