Skip to content
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

error[internal]: left behind trailing whitespace #5868

Closed
matthiaskrgr opened this issue Jul 31, 2023 · 2 comments
Closed

error[internal]: left behind trailing whitespace #5868

matthiaskrgr opened this issue Jul 31, 2023 · 2 comments

Comments

@matthiaskrgr
Copy link
Member

fn main() {
    let _v: Vec<i32> = [1].iter().map(|x| x.clone()).collect(); // could use `*x` instead
    //~^ ERROR using `.clone()` on a double reference, which returns `&str`
}

rustfmt --check

Diff in /tmp/rust/F/icemaker__/5AC1C74D9F9ECD84744150BA76CE5F6322EEB6FB856C15B133BBB855CBA6C3BC.rs at line 1:
 fn main() {
     let _v: Vec<i32> = [1].iter().map(|x| x.clone()).collect(); // could use `*x` instead
+
     //~^ ERROR using `.clone()` on a double reference, which returns `&str`
 }

error[internal]: left behind trailing whitespace
 --> /tmp/rust/F/icemaker__/5AC1C74D9F9ECD84744150BA76CE5F6322EEB6FB856C15B133BBB855CBA6C3BC.rs:3:3:1
  |
3 |
  | ^^^^
  |

warning: rustfmt has failed to format. See previous 1 errors.
@matthiaskrgr
Copy link
Member Author

@ytmimi
Copy link
Contributor

ytmimi commented Aug 1, 2023

Thanks for the report, but going to close this as a duplicate of #5391

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants