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

Fix handling of #[must_use] on unit and uninhabited types #54920

Merged
merged 1 commit into from
Oct 12, 2018

Conversation

varkor
Copy link
Member

@varkor varkor commented Oct 8, 2018

Fixes #54828.

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 8, 2018
@varkor varkor force-pushed the must_use-unit branch 2 times, most recently from e4dd87a to 6c785a6 Compare October 8, 2018 20:12
let ty_warned = match t.sty {
ty::Tuple(ref tys) if tys.is_empty() => return,
ty::Never => return,
// FIXME(varkor): replace with `t.is_unit() || t.conservative_is_uninhabited()`.
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll fix this as part of #54125.

@rust-highfive

This comment has been minimized.

@estebank
Copy link
Contributor

estebank commented Oct 9, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 9, 2018

📌 Commit be88961 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 9, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 9, 2018
Fix handling of #[must_use] on unit and uninhabited types

Fixes rust-lang#54828.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Oct 11, 2018
Fix handling of #[must_use] on unit and uninhabited types

Fixes rust-lang#54828.
kennytm added a commit to kennytm/rust that referenced this pull request Oct 12, 2018
Fix handling of #[must_use] on unit and uninhabited types

Fixes rust-lang#54828.
bors added a commit that referenced this pull request Oct 12, 2018
Rollup of 16 pull requests

Successful merges:

 - #54755 (Documents reference equality by address (#54197))
 - #54811 (During rustc bootstrap, make default for `optimize` independent of `debug`)
 - #54825 (NLL says "borrowed content" instead of more precise "dereference of raw pointer")
 - #54860 (Add doc comments about safest way to initialize a vector of zeros)
 - #54869 (Fix mobile docs)
 - #54891 (Fix tracking issue for Once::is_completed)
 - #54913 (doc fix: it's auto traits that make for automatic implementations)
 - #54920 (Fix handling of #[must_use] on unit and uninhabited types)
 - #54932 (A handful of random string-related improvements)
 - #54936 (impl Eq+Hash for TyLayout)
 - #54950 (std: Synchronize global allocator on wasm32)
 - #54956 ("(using ..." doesn't have the matching ")")
 - #54958 (add a macro for static (compile-time) assertions)
 - #54967 (Remove incorrect span for second label inner macro invocation)
 - #54983 (Fix slice's benchmarks)
 - #54989 (Fix spelling in the documentation to htmldocck.py)

Failed merges:

r? @ghost
@bors bors merged commit be88961 into rust-lang:master Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants