Skip to content

trans::glue: don't generate struct destructors in the free glue #7159

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

Closed
wants to merge 1 commit into from
Closed

trans::glue: don't generate struct destructors in the free glue #7159

wants to merge 1 commit into from

Conversation

Blei
Copy link
Contributor

@Blei Blei commented Jun 15, 2013

The free glue shouldn't be called for structs, and the drop glue already
contains the destructor.

The free glue shouldn't be called for structs, and the drop glue already
contains the destructor.
bors added a commit that referenced this pull request Jun 16, 2013
The free glue shouldn't be called for structs, and the drop glue already
contains the destructor.
@bors bors closed this Jun 16, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 4, 2021
Add unit-hash lint

changelog: [`unit_hash`] Add lint for hashing unit values

This will lint for situations where the end user is attempting to hash a unit value (`()`), as the implementation in `std` simply [does nothing][impl]. Closes rust-lang#7159 .

Example:

```rust
().hash(&mut state);

// Should (probably) be replaced with:
0_u8.hash(&mut state);
```

[impl]: https://github.com/rust-lang/rust/blob/a5f164faad4a2fed606b8160fd7ecd2d5cbba381/library/core/src/hash/mod.rs#L656
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