Skip to content

Cleanup proc_macro config #4102

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

Merged
merged 1 commit into from
Apr 23, 2020
Merged

Cleanup proc_macro config #4102

merged 1 commit into from
Apr 23, 2020

Conversation

matklad
Copy link
Member

@matklad matklad commented Apr 23, 2020

In general, there should be no reason to call .to_string_lossy.
If you want to display the path, use .display().
If you want to pass the path to an OS API (like std::process::Command)
than use PathBuf or OsString.

bors r+
🤖

bors bot added a commit that referenced this pull request Apr 23, 2020
4102: Cleanup proc_macro config r=matklad a=matklad

In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.



bors r+
🤖

Co-authored-by: Aleksey Kladov <[email protected]>
@matklad
Copy link
Member Author

matklad commented Apr 23, 2020

cc @edwin0cheng

@@ -694,13 +694,10 @@ pub fn foo(_input: TokenStream) -> TokenStream {
.with_config(|config| {
// FIXME: Use env!("CARGO_BIN_EXE_ra-analyzer") instead after
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed now

In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.
@bors
Copy link
Contributor

bors bot commented Apr 23, 2020

Canceled.

@matklad
Copy link
Member Author

matklad commented Apr 23, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 23, 2020

@bors bors bot merged commit 29bc218 into rust-lang:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants