-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add help for crate arg when crate name is invalid #114058
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @oli-obk (rustbot has picked a reviewer for you, use r? to override) |
0ae166d
to
8bf4576
Compare
dc7fd43
to
e2402f7
Compare
@@ -0,0 +1 @@ | |||
pub fn main() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if this could also be a ui test. I'm certain I've accidentally written filenames like that before in ui tests and had to edit them, maybe it just all works out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to use it as a ui test, we have a tidy
check before git push
:
tidy error: Stray file with UI testing output: "/Users/yukang/rust/tests/ui/suggestions/issue-113981.b.stderr"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh lol, that might be caused by rust-tidy assuming that the b
in issue-113981.b.stderr
is the revision of the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, from the code it's expecting the .rs
file of issue-113981.rs
exists:
rust/src/tools/tidy/src/ui_tests.rs
Line 120 in 23405bb
tidy_error!(bad, "Stray file with UI testing output: {:?}", file_path); |
but we need multiple .
in the file name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right and there's no suitable // ignore-tidy-xxx
for this case. Apparently, you can place ignore-tidy
in the file path to make tidy ignore it? Not sure how that is supposed to work. E.g. see tests/ui/parser/shebang/issue-71471-ignore-tidy.rs
. You might be able to do something similar 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the tip, just made a quick fix 🤔
ab36d0e
78d00bb
to
ab36d0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one nit & maybe commit squashing, then it's good from my side
ab36d0e
to
e3feab8
Compare
Oh, and if you could rename the test file maybe (CC #113345) to not just consist of the issue number? Sorry I forgot. Only if you like though. If you do, you can put |
e3feab8
to
d326459
Compare
d326459
to
58fb785
Compare
yes, it's a better style, done! |
58fb785
to
e0c479e
Compare
@bors r=fmease,oli-obk |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#114008 (coverage: Obtain the `__llvm_covfun` section name outside a per-function loop) - rust-lang#114014 (builtin_macros: expect raw strings too) - rust-lang#114043 (docs(LazyLock): add example pass local LazyLock variable to struct) - rust-lang#114051 (Add regression test for invalid "unused const" in method) - rust-lang#114052 (Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases) - rust-lang#114058 (Add help for crate arg when crate name is invalid) - rust-lang#114060 (abi: unsized field in union - assert to delay bug ) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#114008 (coverage: Obtain the `__llvm_covfun` section name outside a per-function loop) - rust-lang#114014 (builtin_macros: expect raw strings too) - rust-lang#114043 (docs(LazyLock): add example pass local LazyLock variable to struct) - rust-lang#114051 (Add regression test for invalid "unused const" in method) - rust-lang#114052 (Suggest `{Option,Result}::as_ref()` instead of `cloned()` in some cases) - rust-lang#114058 (Add help for crate arg when crate name is invalid) - rust-lang#114060 (abi: unsized field in union - assert to delay bug ) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #113981