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

Rollup of 6 pull requests #72612

Closed
wants to merge 14 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

Diggsey and others added 14 commits May 25, 2020 11:47
Use raw pointers to avoid making any assertions about the data field.
This will print a diagnostic for crates which are mentioned as `--extern`
arguments on the command line, but are never referenced from the source.

This diagnostic is controlled by `-Wunused-crate-dependencies` or
`#![warn(unused_crate_dependencies)]` and is "allow" by default.

There are cases where certain crates need to be linked in but are not
directly referenced - for example if they are providing symbols for C
linkage. In this case the warning can be suppressed with
`use needed_crate as _;`.

Thanks to @petrochenkov for simplified core.

Resolves issue rust-lang#57274
Warn about unused crate deps

Implements rust-lang#57274 by adding -Wunused-crate-dependencies. This will warn about any `--extern` option on the command line which isn't referenced by the crate source either via `use` or `extern crate`.

Crates which are added for some side effect but are otherwise unreferenced - such as for symbols they define - the warning can be suppressed with `use somecrate as _;`.

If a crate has multiple aliases (eg using `foo = { package = "bar" }` in `Cargo.toml`), then it will warn about each unused alias.

This does not consider crate added by some other means than `--extern`, including the standard library. It also doesn't consider any crate without `add_prelude` set (though I'm not sure about this).

Unfortunately this probably [does not yet work well with Cargo](rust-lang#57274 (comment)) as it will over-specify crates, causing spurious warnings. As a result, this lint is "allow" by default and must be explicitly enabled either via `#![warn(unused_crate_deps)]` or with `-Wunused-crate-deps`.
Resolve UB in Arc/Weak interaction (2)

Use raw pointers to avoid making any assertions about the data field.

Follow up from rust-lang#72479, see that PR for more detail on the motivation.

@RalfJung I was able to avoid a lot of the changes to `Weak`, by making a helper type (`WeakInner`) - because of auto-deref and because the fields have the same name, the rest of the code continues to compile.
…eled-block, r=davidtwco

Allow unlabeled breaks from desugared `?` in labeled blocks

`?` is desugared into a `break` targeting the innermost `try` scope in which it resides. The `break` however will not have a label. https://github.com/rust-lang/rust/blob/master/src/librustc_ast_lowering/expr.rs#L1560

Since the `target` of the `break` is known, the compiler should not complain about an unlabeled jump for `break`s desugared from `?`.

Closes rust-lang#72483
Update books

## reference

7 commits in 892b928b565e35d25b6f9c47faee03b94bc41489..becdca9477c9eafa96a4eea5156fe7a2730d9dd2
2020-05-11 11:13:51 -0700 to 2020-05-21 21:08:02 +0100
- Update tuple index token. (rust-lang/reference#814)
- Fixes minor errors (rust-lang/reference#818)
- Update that macros can be deprecated. (rust-lang/reference#813)
- work on char/str descriptions (rust-lang/reference#809)
- cfg_attr needs a valid predicate (rust-lang/reference#812)
- Account for removal of UB in float-to-int casts (rust-lang/reference#810)
- Fix stray plus signs. (rust-lang/reference#811)

## book

6 commits in 6247be15a7f7509559f7981ee2209b9e0cc121df..e8a4714a9d8a6136a59b8e63544e149683876e36
2020-05-03 10:55:09 -0500 to 2020-05-25 10:29:27 -0500
- code is 1024 now, not 512
- Clean up install a bit
- We don't need build.sh anymore
- Fix CI status in README
- Port to github actions (rust-lang/book#2337)
- operating system -> allocator

## rust-by-example

5 commits in ab072b14393cbd9e8a1d1d75879bf51e27217bbb..7aa82129aa23e7e181efbeb8da03a2a897ef6afc
2020-05-09 08:46:39 -0300 to 2020-05-25 14:54:26 -0300
- Person of age 0 is alive (rust-lang/rust-by-example#1348)
- Gramatical fix in std/rc.md (rust-lang/rust-by-example#1347)
- Capture example should use String (rust-lang/rust-by-example#1331)
- Fix empty bound examples (rust-lang/rust-by-example#1343)
- Fix an inline comment in macros/repeat.md (rust-lang/rust-by-example#1344)

## edition-guide

1 commits in 49270740c7a4bff2763e6bc730b191d45b7d5167..0a8ab5046829733eb03df0738c4fafaa9b36b348
2020-05-11 08:50:29 -0500 to 2020-05-18 08:34:23 -0500
- Changes for Rust 1.32 & setup for edition-next (rust-lang/edition-guide#213)

## embedded-book

3 commits in 366c50a03bed928589771eba8a6f18e0c0c01d23..5555a97f04ad7974ac6fb8fb47c267c4274adf4a
2020-05-07 09:04:42 +0000 to 2020-05-25 18:00:51 +0000
- Remove reference to const-fn feature of cortex-m. Closes rust-embedded/book#242.  (rust-embedded/book#243)
- Spelling: Appplication -> Application  (rust-embedded/book#241)
- QEMU debugging updates  (rust-embedded/book#239)
…an-DPC

Add working example for E0617 explanation

r? @Dylan-DPC
Eagerly lower asm sub-expressions to HIR even if there is an error

Fixes rust-lang#72570

r? @oli-obk
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented May 26, 2020

📌 Commit 06e3a1d has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 26, 2020
@bors
Copy link
Contributor

bors commented May 26, 2020

⌛ Testing commit 06e3a1d with merge e79727c26d40f2bb49d3fd5f468509f4a6b615d4...

@bors
Copy link
Contributor

bors commented May 26, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 26, 2020
@JohnTitor JohnTitor added the rollup A PR which is a rollup label May 26, 2020
@JohnTitor
Copy link
Member

Left a comment on the PR that caused the failure, closing.

@JohnTitor JohnTitor closed this May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants