-
Notifications
You must be signed in to change notification settings - Fork 13.4k
syntax: Don't put quotes around filenames in codemap #21617
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
Conversation
This ends up propagating all the way out to the output of dep-info which then makes Cargo think that files are not existent (it thinks the files have quotes in their name) when they in fact do.
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -146,7 +146,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) | |||
Ok(src) => { | |||
// Add this input file to the code map to make it available as | |||
// dependency information | |||
let filename = format!("{:?}", file.display()); | |||
let filename = format!("{}", file.display()); |
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.
Isn't format!
here redundant?
I guess I don't have a particular problem with this commit, except that I expect things like filenames to be quoted or otherwise "set apart" in an error message. It seems surprising to me that cargo is scraping this information from the error -- what if there is a space in the name or something? |
Giving r+ in any case. |
@nikomatsakis my impression was that cargo is not scraping the info from an error, but rather from the output of |
This ends up propagating all the way out to the output of dep-info which then makes Cargo think that files are not existent (it thinks the files have quotes in their name) when they in fact do.
This ends up propagating all the way out to the output of dep-info which then
makes Cargo think that files are not existent (it thinks the files have quotes
in their name) when they in fact do.