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

doc: a few rust.md fixes #11619

Merged
merged 4 commits into from
Jan 18, 2014
Merged

doc: a few rust.md fixes #11619

merged 4 commits into from
Jan 18, 2014

Conversation

adrientetar
Copy link
Contributor

Noticeably necroes #10892.
Also closes #11559.

r? @alexcrichton

adrientetar and others added 3 commits January 17, 2014 19:38
This fixes a regression introduced in
3d57b24.
…ching)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
@@ -2229,9 +2226,8 @@ A temporary's lifetime equals the largest lifetime of any reference that points

When a [local variable](#memory-slots) is used
as an [rvalue](#lvalues-rvalues-and-temporaries)
the variable will either be [moved](#move-expressions) or copied,
Copy link
Member

Choose a reason for hiding this comment

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

The variable might be moved still, but it wasn't correct to link to move-expressions.

Fixes rust-lang#11559 (not that the manual couldn't use a review).
@adrientetar
Copy link
Contributor Author

@cmr Adressed.

bors added a commit that referenced this pull request Jan 18, 2014
@bors bors closed this Jan 18, 2014
@bors bors merged commit 14f605d into rust-lang:master Jan 18, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 21, 2023
Fix ice in `redundant_locals`

Fixes rust-lang#11619

Rebinding over macro like the code below, idents will be different (`x#4` and `x#0` in that case).

```rust
fn reassign_in_macro() {
  let x = 10;
  macro_rules! mac {
    ($i:ident) => {
      let mut x = x;
    }
  }
  mac!(y);
}
```

It causes unwrapping `None`.

https://github.com/rust-lang/rust-clippy/blob/9554e477c29e6ddca9e5cdce71524341ef9d48e8/clippy_lints/src/redundant_locals.rs#L88-L98

changelog: ICE: [`redundant_locals`]: No longer lints rebinding over macro
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.

doc/rust.md: broken references
4 participants