Skip to content

librustc: Have destructor run for unit-like structs. - #6889

Merged
bors merged 1 commit into
rust-lang:incomingfrom
luqmana:unit-struct-drop
Jun 1, 2013
Merged

librustc: Have destructor run for unit-like structs.#6889
bors merged 1 commit into
rust-lang:incomingfrom
luqmana:unit-struct-drop

Conversation

@luqmana

Copy link
Copy Markdown
Contributor

Fixes#6861

@borsbors closed this Jun 1, 2013
@bors
bors merged commit 64759c9 into rust-lang:incomingJun 1, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 25, 2021
Refactor unit types
Ref: rust-lang#6724
r? `@flip1995`
Changes:
1. Extract `unit_types` from `types` group.
2. Move lints of `unit_types` to their own modules.
Notes:
Other lints of `unit_types` is still scattered around the `clippy_lints`, e.g. `result_unit_err` or `option_map_unit_fn`.
These should be addressed in another PR.
changelog: none
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
6889: Resolve `macro-error` diagnostics on asm & llvm_asm r=matklad a=lf-
We currently stub these out as returning unit.
This fixes spurious RA `macro-error` diagnostics introduced somewhere around 0.2.400 in the following:
```rust
unsafe { asm!(""); llvm_asm!(""); }
```
I'd ideally like to write a unit test for this, but I'm not familiar with where the tests for `hir_expand` are.
Thanks to @edwin0cheng for help on resolving this issue.
Co-authored-by: lf- <lf-@users.noreply.github.com>
Sign up for freeto 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.

3 participants

@luqmana@catamorphism@bors