-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix grammar mistake in bad Cargo.toml name error. #16090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
From the rustc errors and lints style guide
Though I do agree that the following is a run on sentence.
|
} else if src.path().join("cargo.toml").exists() { | ||
bail!( | ||
"`{}` does not contain a Cargo.toml file, but found cargo.toml please try to rename it to Cargo.toml. \ | ||
"`{}` does not contain a Cargo.toml file, but does contain cargo.toml. Please try to rename it to Cargo.toml. \ |
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.
Probably add a help:
and in the future we migrate to annotate-snippets
"`{}` does not contain a Cargo.toml file, but does contain cargo.toml. Please try to rename it to Cargo.toml. \ | |
"`{}` does not contain a Cargo.toml file, but does contain cargo.toml\nhelp: try to rename it to Cargo.toml |
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 feel like this is more in line with the style guide:
"`{}` does not contain a Cargo.toml file, but does contain cargo.toml. Please try to rename it to Cargo.toml. \ | |
"`{}` does not contain a `Cargo.toml` file | |
help: a `cargo.toml` exists |
if find_project_manifest_exact(path, "cargo.toml").is_ok() { | ||
Err(anyhow::format_err!( | ||
"Could not find Cargo.toml in `{}`, but found cargo.toml please try to rename it to Cargo.toml", | ||
"Could not find Cargo.toml in `{}`, but found cargo.toml. Please try to rename it to Cargo.toml", |
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.
Ditto
What does this PR try to resolve?
A small grammar mistake in the error that shows when a Cargo.toml file can not be found, but a cargo.toml can.