Skip to content

Minor std style and doc tweaks #14019

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 5 commits into from
May 9, 2014
Merged

Minor std style and doc tweaks #14019

merged 5 commits into from
May 9, 2014

Conversation

brson
Copy link
Contributor

@brson brson commented May 7, 2014

Just small bits of polish.

@alexcrichton
Copy link
Member

r=me

bors added a commit that referenced this pull request May 9, 2014
@bors bors closed this May 9, 2014
@bors bors merged commit 2aa4253 into rust-lang:master May 9, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2023
Substitute VSCode variables more generally
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2025
…ons (rust-lang#14019)

This PR fixes an issue with the `significant_drop_in_scrutinee`, where
the lint generates invalid Rust syntax when suggesting fixes for match
expressions that are part of larger expressions, such as in assignment
contexts. For example:

```rust
    let mutex = Mutex::new(State {});
    let _ = match mutex.lock().unwrap().foo() {
        true => 0,
        false => 1,
    };
```
would suggest:
```rust
let _ = let value = mutex.lock().unwrap().foo();
match value {
```
With this PR, it now suggests:
```rust
let value = mutex.lock().unwrap().foo();
let _ = match value {
```

closes: rust-lang#13986

changelog: [`significant_drop_in_scrutinee`] Fix incorrect suggestion
for `significant_drop_in_scrutinee` lint in expression context
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