Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts: rust: mention file name in error messages

Improve two error messages in the script by mentioning the doctest file
path from which the doctest was generated from.

This will allow, in case the conversion fails, to get directly the file
name triggering the issue, making the bug fixing process faster.

Signed-off-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Link: https://lore.kernel.org/r/20250228170530.950268-2-guillaume1.gomez@gmail.com
[ Reworded and removed an unneeded added parameter comma. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Guillaume Gomez and committed by
Miguel Ojeda
fbefae55 562cc3cd

+4 -4
+4 -4
scripts/rustdoc_test_gen.rs
··· 87 87 88 88 assert!( 89 89 valid_paths.len() > 0, 90 - "No path candidates found. This is likely a bug in the build system, or some files went \ 91 - away while compiling." 90 + "No path candidates found for `{file}`. This is likely a bug in the build system, or some \ 91 + files went away while compiling." 92 92 ); 93 93 94 94 if valid_paths.len() > 1 { ··· 97 97 eprintln!(" {path:?}"); 98 98 } 99 99 panic!( 100 - "Several path candidates found, please resolve the ambiguity by renaming a file or \ 101 - folder." 100 + "Several path candidates found for `{file}`, please resolve the ambiguity by renaming \ 101 + a file or folder." 102 102 ); 103 103 } 104 104