Skip to content

Conversation

pcwalton
Copy link
Contributor

let mut s = if abis.is_rust() {
~""
} else {
format!("extern {} ", abis.to_str())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this going to be correct? Shouldn't it be extern \"{}\", or is that changing/changed?

@bors bors closed this Nov 1, 2013
@bors bors merged commit a6f776d into rust-lang:master Nov 1, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 27, 2023
[needless_return]: Remove all semicolons on suggestion

Closes rust-lang#10182

Multiple semicolons currently breaks autofix for `needless_return` suggestions. Any semicolons left after removing return means that the return type will always be `()`, and thus fail to compile.

This PR allows `needless_return` to remove multiple semicolons.

The change won't cover the case where there is multiple line yet.

i.e.

```rust
fn needless_return() -> bool {
    return true;
;;
}
```

---

changelog: Sugg: [`needless_return`]: Now removes all semicolons on the same line
[rust-lang#10187](rust-lang/rust-clippy#10187)
<!-- changelog_checked -->
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.

4 participants