]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAdd comment to `Abort` match arm
ecstatic-morse [Sun, 4 Oct 2020 20:02:54 +0000 (13:02 -0700)]
Add comment to `Abort` match arm

Co-authored-by: Ralf Jung <post@ralfj.de>
3 years agoDiscuss cleanup blocks and `span_bug` on `Abort`
Dylan MacKenzie [Sun, 4 Oct 2020 17:39:12 +0000 (10:39 -0700)]
Discuss cleanup blocks and `span_bug` on `Abort`

3 years agoEnsure that the const-eval engine handles `#[unwind(aborts)]`
Dylan MacKenzie [Sat, 3 Oct 2020 22:09:43 +0000 (15:09 -0700)]
Ensure that the const-eval engine handles `#[unwind(aborts)]`

3 years agoAdd check-pass test for `#[unwind(aborts)]` on a `const fn`
Dylan MacKenzie [Sat, 3 Oct 2020 21:48:01 +0000 (14:48 -0700)]
Add check-pass test for `#[unwind(aborts)]` on a `const fn`

3 years agoAllow `Abort` terminators in a const-context
Dylan MacKenzie [Sat, 3 Oct 2020 21:38:01 +0000 (14:38 -0700)]
Allow `Abort` terminators in a const-context

These appear along the cleanup path inside functions with
`#[unwind(aborts)]`. We don't const-check the cleanup path anyways,
since const-eval already has "abort-on-panic" semantics and there's
often drops that would otherwise be forbidden, so the check wasn't
really preventing anything anyways.

3 years agoAuto merge of #77462 - jonas-schievink:rollup-m0rqdh5, r=jonas-schievink
bors [Fri, 2 Oct 2020 19:42:07 +0000 (19:42 +0000)]
Auto merge of #77462 - jonas-schievink:rollup-m0rqdh5, r=jonas-schievink

Rollup of 12 pull requests

Successful merges:

 - #76101 (Update RELEASES.md for 1.47.0)
 - #76739 (resolve: prohibit anon const non-static lifetimes)
 - #76811 (Doc alias name restriction)
 - #77405 (Add tracking issue of iter_advance_by feature)
 - #77409 (Add example for iter chain struct)
 - #77415 (Better error message for `async` blocks in a const-context)
 - #77423 (Add `-Zprecise-enum-drop-elaboration`)
 - #77432 (Use posix_spawn on musl targets)
 - #77441 (Fix AVR stack corruption bug)
 - #77442 (Clean up on example doc fixes for ptr::copy)
 - #77444 (Fix span for incorrect pattern field and add label)
 - #77453 (Stop running macOS builds on Azure Pipelines)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #77453 - pietroalbini:ci-no-more-azure, r=Mark-Simulacrum
Jonas Schievink [Fri, 2 Oct 2020 18:27:18 +0000 (20:27 +0200)]
Rollup merge of #77453 - pietroalbini:ci-no-more-azure, r=Mark-Simulacrum

Stop running macOS builds on Azure Pipelines

The Infrastructure Team agreed to migrate macOS builds to GitHub Actions, so this commit stops running those builders on Azure Pipelines. The GitHub Actions runners are already configured to upload to the production bucket.

We can't still fully remove the Azure Pipelines configuration, as we still need to have that available until no stable releases run any of their builds on Azure Pipelines anymore. I'll open an issue to track fully removing our Azure Pipelines setup once the PR is merged.

r? @Mark-Simulacrum

3 years agoRollup merge of #77444 - estebank:pat-field-label, r=davidtwco
Jonas Schievink [Fri, 2 Oct 2020 18:27:16 +0000 (20:27 +0200)]
Rollup merge of #77444 - estebank:pat-field-label, r=davidtwco

Fix span for incorrect pattern field and add label

Address #73750.

3 years agoRollup merge of #77442 - pickfire:patch-7, r=scottmcm
Jonas Schievink [Fri, 2 Oct 2020 18:27:14 +0000 (20:27 +0200)]
Rollup merge of #77442 - pickfire:patch-7, r=scottmcm

Clean up on example doc fixes for ptr::copy

Follow up of #77385

r? @scottmcm

3 years agoRollup merge of #77441 - couchand:2020-10/fix-75504, r=jonas-schievink
Jonas Schievink [Fri, 2 Oct 2020 18:27:13 +0000 (20:27 +0200)]
Rollup merge of #77441 - couchand:2020-10/fix-75504, r=jonas-schievink

Fix AVR stack corruption bug

Updates the Rust LLVM fork to pull in a fix for a stack corruption bug in AVR platform interrupt code lowering.

Fixes #75504

----

It looks like this is also pulling in a register selection fix by @Amanieu and @tambry that hasn't merged yet; I don't see an open PR for that update.

3 years agoRollup merge of #77432 - tmiasko:posix-spawn-musl, r=cuviper
Jonas Schievink [Fri, 2 Oct 2020 18:27:11 +0000 (20:27 +0200)]
Rollup merge of #77432 - tmiasko:posix-spawn-musl, r=cuviper

Use posix_spawn on musl targets

The posix_spawn had been available in a form suitable for use in a
Command implementation since musl 0.9.12. Use it in a preference to a
fork when possible, to benefit from CLONE_VM|CLONE_VFORK used there.

3 years agoRollup merge of #77423 - ecstatic-morse:discriminant-switch-effect-config, r=pnkfelix
Jonas Schievink [Fri, 2 Oct 2020 18:27:09 +0000 (20:27 +0200)]
Rollup merge of #77423 - ecstatic-morse:discriminant-switch-effect-config, r=pnkfelix

Add `-Zprecise-enum-drop-elaboration`

Its purpose is to assist in debugging #77382 and #74551. Passing `-Zprecise-enum-drop-elaboration=no` will turn off the added precision that seems to be causing issues on some platforms. This assumes that we can reproduce #77382 on the latest master. I should have done this earlier. Oh well.

cc @cuviper
r? @pnkfelix

3 years agoRollup merge of #77415 - ecstatic-morse:const-checking-async-block, r=oli-obk
Jonas Schievink [Fri, 2 Oct 2020 18:27:08 +0000 (20:27 +0200)]
Rollup merge of #77415 - ecstatic-morse:const-checking-async-block, r=oli-obk

Better error message for `async` blocks in a const-context

Improves the error message for the case in #77361.

r? @oli-obk

3 years agoRollup merge of #77409 - pickfire:patch-6, r=GuillaumeGomez
Jonas Schievink [Fri, 2 Oct 2020 18:27:06 +0000 (20:27 +0200)]
Rollup merge of #77409 - pickfire:patch-6, r=GuillaumeGomez

Add example for iter chain struct

r? @GuillaumeGomez

3 years agoRollup merge of #77405 - timvermeulen:iter_advance_by_tracking_issue, r=scottmcm
Jonas Schievink [Fri, 2 Oct 2020 18:27:04 +0000 (20:27 +0200)]
Rollup merge of #77405 - timvermeulen:iter_advance_by_tracking_issue, r=scottmcm

Add tracking issue of iter_advance_by feature

3 years agoRollup merge of #76811 - GuillaumeGomez:doc-alias-name-restriction, r=oli-obk,ollie27
Jonas Schievink [Fri, 2 Oct 2020 18:27:03 +0000 (20:27 +0200)]
Rollup merge of #76811 - GuillaumeGomez:doc-alias-name-restriction, r=oli-obk,ollie27

Doc alias name restriction

Fixes #76705.

3 years agoRollup merge of #76739 - davidtwco:issue-75323-non-static-lifetime-in-anonconst,...
Jonas Schievink [Fri, 2 Oct 2020 18:26:55 +0000 (20:26 +0200)]
Rollup merge of #76739 - davidtwco:issue-75323-non-static-lifetime-in-anonconst, r=varkor

resolve: prohibit anon const non-static lifetimes

Fixes #75323, fixes #74447 and fixes #73375.

This PR prohibits non-static lifetimes in anonymous constants when only the `min_const_generics` feature is enabled. ~~To do so, `to_region_vid`'s `bug!` had to be changed into a delayed bug, which unfortunately required providing it a `TyCtxt`.~~

---
~~While I am happy with how the implementation of the error turned out in `rustc_passes::check_const`,  emitting an error wasn't sufficient to avoid hitting the ICE later. I also tried implementing the error in `rustc_mir::transform::check_consts::validation` and that worked, but it didn't silence the ICE either. To silence the ICE, I changed it to a delayed bug which worked but was more invasive that I would have liked, and required I return an incorrect lifetime. It's possible that this check should be implemented earlier in the compiler to make the invasive changes unnecessary, but I wasn't sure where that would be and wanted to get some feedback first.~~
The approach taken by this PR has been changed to implement the error in name resolution, which ended up being much simpler.

cc @rust-lang/wg-const-eval
r? @lcnr

3 years agoRollup merge of #76101 - XAMPPRocky:relnotes-.1.47.0, r=Mark-Simulacrum
Jonas Schievink [Fri, 2 Oct 2020 18:26:54 +0000 (20:26 +0200)]
Rollup merge of #76101 - XAMPPRocky:relnotes-.1.47.0, r=Mark-Simulacrum

Update RELEASES.md for 1.47.0

### [Rendered](https://github.com/XAMPPRocky/rust/blob/relnotes-.1.47.0/RELEASES.md)

r? @Mark-Simulacrum
cc @rust-lang/release

3 years agoUpdate doc alias documentation
Guillaume Gomez [Wed, 16 Sep 2020 14:43:22 +0000 (16:43 +0200)]
Update doc alias documentation

3 years agoUpdate tests
Guillaume Gomez [Wed, 16 Sep 2020 14:42:06 +0000 (16:42 +0200)]
Update tests

3 years agoRemove unneeded replace
Guillaume Gomez [Wed, 16 Sep 2020 22:20:14 +0000 (00:20 +0200)]
Remove unneeded replace

3 years agoForbid some characters to be used as doc alias
Guillaume Gomez [Wed, 16 Sep 2020 14:41:45 +0000 (16:41 +0200)]
Forbid some characters to be used as doc alias

3 years agoUpdate RELEASES.md for 1.47.0
Erin Power [Sun, 30 Aug 2020 08:49:59 +0000 (10:49 +0200)]
Update RELEASES.md for 1.47.0

3 years agoAuto merge of #77369 - jonas-schievink:validate-storage-liveness, r=wesleywiser
bors [Fri, 2 Oct 2020 17:20:13 +0000 (17:20 +0000)]
Auto merge of #77369 - jonas-schievink:validate-storage-liveness, r=wesleywiser

-Zvalidate-mir: Assert that storage is allocated on local use

This extends the MIR validator to check that locals are only used when their backing storage is currently allocated via `StorageLive`.

The result of this is that miscompilations such as https://github.com/rust-lang/rust/issues/77359 are caught and turned into ICEs.

The PR currently fails tests because miscompilations such as https://github.com/rust-lang/rust/issues/77359 are caught and turned into ICEs.

I have confirmed that tests pass (even with `-Zvalidate-mir`) once `SimplifyArmIdentity` is turned into a no-op (except mir-opt tests, of course).

3 years agoIgnore now-broken mir-opt test
Jonas Schievink [Fri, 2 Oct 2020 14:50:45 +0000 (16:50 +0200)]
Ignore now-broken mir-opt test

3 years agovalidate: skip debuginfo
Jonas Schievink [Fri, 2 Oct 2020 14:50:29 +0000 (16:50 +0200)]
validate: skip debuginfo

3 years agoci: stop running macOS builds on Azure Pipelines
Pietro Albini [Fri, 2 Oct 2020 14:15:05 +0000 (16:15 +0200)]
ci: stop running macOS builds on Azure Pipelines

3 years agovalidate: storage must be allocated on local use
Jonas Schievink [Wed, 30 Sep 2020 16:56:10 +0000 (18:56 +0200)]
validate: storage must be allocated on local use

3 years agoAuto merge of #77418 - pietroalbini:ci-environment-files, r=Mark-Simulacrum
bors [Fri, 2 Oct 2020 13:22:26 +0000 (13:22 +0000)]
Auto merge of #77418 - pietroalbini:ci-environment-files, r=Mark-Simulacrum

Switch to environment files to change the environment on GHA

This PR switches our CI to use GitHub's new [environment files](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files) to set environment variables and add items to `$PATH`, as GitHub [plans to disable the old `::set-env` and `::add-path` log commands](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/) due to a [security issue](https://github.com/actions/toolkit/security/advisories/GHSA-mfwh-5m23-j46w).

Our self-hosted runners are on version 2.273.4, so they already have support for this.

r? `@Mark-Simulacrum`

3 years agoresolve: prohibit anon const non-static lifetimes
David Wood [Tue, 15 Sep 2020 13:38:41 +0000 (14:38 +0100)]
resolve: prohibit anon const non-static lifetimes

This commit modifies name resolution to emit an error when non-static
lifetimes are used in anonymous constants when the `min_const_generics`
feature is enabled.

Signed-off-by: David Wood <david@davidtw.co>
3 years agoAuto merge of #77396 - wesleywiser:disable-simplifyarmidentity, r=oli-obk
bors [Fri, 2 Oct 2020 10:04:46 +0000 (10:04 +0000)]
Auto merge of #77396 - wesleywiser:disable-simplifyarmidentity, r=oli-obk

Disable the SimplifyArmIdentity mir-opt

The optimization still has some bugs that need to be worked out
such as #77359.

We can try re-enabling this again after the known issues are resolved.

r? `@oli-obk`

3 years agoAuto merge of #77029 - ehuss:command-access, r=dtolnay
bors [Fri, 2 Oct 2020 07:51:24 +0000 (07:51 +0000)]
Auto merge of #77029 - ehuss:command-access, r=dtolnay

Add accessors to Command.

This adds some accessor methods to `Command` to provide a way to access the values set when building the `Command`. An example where this can be useful is to display the command to be executed. This is roughly based on the [`ProcessBuilder`](https://github.com/rust-lang/cargo/blob/13b73cdaf76b2d9182515c9cf26a8f68342d08ef/src/cargo/util/process_builder.rs#L105-L134) in Cargo.

Possible concerns about the API:
- Values with NULs on Unix will be returned as `"<string-with-nul>"`. I don't think it is practical to avoid this, since otherwise a whole separate copy of all the values would need to be kept in `Command`.
- Does not handle `arg0` on Unix. This can be awkward to support in `get_args` and is rarely used. I figure if someone really wants it, it can be added to `CommandExt` as a separate method.
- Does not offer a way to detect `env_clear`. I'm uncertain if it would be useful for anyone.
- Does not offer a way to get an environment variable by name (`get_env`). I figure this can be added later if anyone really wants it. I think the motivation for this is weak, though. Also, the API could be a little awkward (return a `Option<Option<&OsStr>>`?).
- `get_envs` could skip "cleared" entries and just return `&OsStr` values instead of `Option<&OsStr>`. I'm on the fence here. My use case is to display a shell command, and I only intend it to be roughly equivalent to the actual execution, and I probably won't display `None` entries. I erred on the side of providing extra information, but I suspect many situations will just filter out the `None`s.
- Could implement more iterator stuff (like `DoubleEndedIterator`).

I have not implemented new std items before, so I'm uncertain if the existing issue should be reused, or if a new tracking issue is needed.

cc #44434

3 years agoFix span for incorrect pattern field and add label
Esteban Küber [Fri, 2 Oct 2020 07:44:16 +0000 (00:44 -0700)]
Fix span for incorrect pattern field and add label

3 years agoClean up on example doc fixes for ptr::copy
Ivan Tham [Fri, 2 Oct 2020 06:44:01 +0000 (14:44 +0800)]
Clean up on example doc fixes for ptr::copy

Follow up of #77385

3 years agoFix AVR stack corruption bug
Andrew Dona-Couch [Fri, 2 Oct 2020 04:07:00 +0000 (04:07 +0000)]
Fix AVR stack corruption bug

Updates the Rust LLVM fork to pull in a fix for a stack corruption
bug in AVR platform interrupt code lowering.

Fixes #75504

3 years agoAuto merge of #77436 - JohnTitor:rollup-65dh7rp, r=JohnTitor
bors [Fri, 2 Oct 2020 00:48:41 +0000 (00:48 +0000)]
Auto merge of #77436 - JohnTitor:rollup-65dh7rp, r=JohnTitor

Rollup of 11 pull requests

Successful merges:

 - #76851 (Fix 'FIXME' about using NonZeroU32 instead of u32.)
 - #76979 (Improve std::sys::windows::compat)
 - #77111 (Stabilize slice_ptr_range.)
 - #77147 (Split sys_common::Mutex in StaticMutex and MovableMutex.)
 - #77312 (Remove outdated line from `publish_toolstate` hook)
 - #77362 (Fix is_absolute on WASI)
 - #77375 (rustc_metadata: Do not forget to encode inherent impls for foreign types)
 - #77385 (Improve the example for ptr::copy)
 - #77389 (Fix some clippy lints)
 - #77399 (BTreeMap: use Unique::from to avoid a cast where type information exists)
 - #77429 (Link `new` method in `DefautHasher`s doc)

Failed merges:

r? `@ghost`

3 years agoDisable the SimplifyArmIdentity mir-opt
Wesley Wiser [Thu, 1 Oct 2020 00:04:19 +0000 (20:04 -0400)]
Disable the SimplifyArmIdentity mir-opt

The optimization still has some bugs that need to be worked out
such as #77359.

We can try re-enabling this again after the known issues are resolved.

3 years agoRollup merge of #77429 - WaffleLapkin:doc_link_default_hasher_new, r=jyn514
Yuki Okushi [Thu, 1 Oct 2020 23:25:27 +0000 (08:25 +0900)]
Rollup merge of #77429 - WaffleLapkin:doc_link_default_hasher_new, r=jyn514

Link `new` method in `DefautHasher`s doc

FIXME referenced #56922 which was resolved

r? @jyn514

3 years agoRollup merge of #77399 - ssomers:btree_cleanup_5, r=Mark-Simulacrum
Yuki Okushi [Thu, 1 Oct 2020 23:25:25 +0000 (08:25 +0900)]
Rollup merge of #77399 - ssomers:btree_cleanup_5, r=Mark-Simulacrum

BTreeMap: use Unique::from to avoid a cast where type information exists

r? @Mark-Simulacrum

3 years agoRollup merge of #77389 - jyn514:THE-PAPERCLIP-COMETH, r=Mark-Simulacrum
Yuki Okushi [Thu, 1 Oct 2020 23:25:24 +0000 (08:25 +0900)]
Rollup merge of #77389 - jyn514:THE-PAPERCLIP-COMETH, r=Mark-Simulacrum

Fix some clippy lints

Found while working on https://github.com/rust-lang/rust/pull/77351;
these are just the ones that could be fixed automatically.

3 years agoRollup merge of #77385 - scottmcm:fix-77220, r=jyn514
Yuki Okushi [Thu, 1 Oct 2020 23:25:22 +0000 (08:25 +0900)]
Rollup merge of #77385 - scottmcm:fix-77220, r=jyn514

Improve the example for ptr::copy

Fixes #77220

3 years agoRollup merge of #77375 - petrochenkov:inherext, r=oli-obk
Yuki Okushi [Thu, 1 Oct 2020 23:25:20 +0000 (08:25 +0900)]
Rollup merge of #77375 - petrochenkov:inherext, r=oli-obk

rustc_metadata: Do not forget to encode inherent impls for foreign types

So I tried to move FFI interface for LLVM from `rustc_codegen_llvm` to `rustc_llvm` and immediately encountered this fascinating issue.

Fixes https://github.com/rust-lang/rust/issues/46665.

3 years agoRollup merge of #77362 - RReverser:patch-1, r=dtolnay
Yuki Okushi [Thu, 1 Oct 2020 23:25:19 +0000 (08:25 +0900)]
Rollup merge of #77362 - RReverser:patch-1, r=dtolnay

Fix is_absolute on WASI

WASI does not match `cfg(unix)`, but its paths are Unix-like (`/some/path`) and don't have Windows-like prefixes.

Without this change, `is_absolute` for any paths, including `/some/path`, was returning `false`on a WASI target, which is obviously not true and undesirable.

3 years agoRollup merge of #77312 - LeSeulArtichaut:toolstate-msg, r=Mark-Simulacrum
Yuki Okushi [Thu, 1 Oct 2020 23:25:17 +0000 (08:25 +0900)]
Rollup merge of #77312 - LeSeulArtichaut:toolstate-msg, r=Mark-Simulacrum

Remove outdated line from `publish_toolstate` hook

We no longer add `I-nominated` to toolstate failure issues since T-compiler changed its meeting preparation workflow.

3 years agoRollup merge of #77147 - fusion-engineering-forks:static-mutex, r=dtolnay
Yuki Okushi [Thu, 1 Oct 2020 23:25:15 +0000 (08:25 +0900)]
Rollup merge of #77147 - fusion-engineering-forks:static-mutex, r=dtolnay

Split sys_common::Mutex in StaticMutex and MovableMutex.

The (unsafe) `Mutex` from `sys_common` had a rather complicated interface. You were supposed to call `init()` manually, unless you could guarantee it was neither moved nor used reentrantly.

Calling `destroy()` was also optional, although it was unclear if 1) resources might be leaked or not, and 2) if `destroy()` should only be called when `init()` was called.

This allowed for a number of interesting (confusing?) different ways to use this `Mutex`, all captured in a single type.

In practice, this type was only ever used in two ways:

1. As a static variable. In this case, neither `init()` nor `destroy()` are called. The variable is never moved, and it is never used reentrantly. It is only ever locked using the `LockGuard`, never with `raw_lock`.

2. As a `Box`ed variable. In this case, both `init()` and `destroy()` are called, it will be moved and possibly used reentrantly.

No other combinations are used anywhere in `std`.

This change simplifies things by splitting this `Mutex` type into two types matching the two use cases: `StaticMutex` and `MovableMutex`.

The interface of both new types is now both safer and simpler. The first one does not call nor expose `init`/`destroy`, and the second one calls those automatically in its `new()` and `Drop` functions. Also, the locking functions of `MovableMutex` are no longer unsafe.

---

This will also make it easier to conditionally box mutexes later, by moving that decision into sys/sys_common. Some of the mutex implementations (at least those of Wasm and 'sys/unsupported') are safe to move, so wouldn't need a box. ~~(But that's blocked on  #76932 for now.)~~ (See #77380.)

3 years agoRollup merge of #77111 - fusion-engineering-forks:stabilize-slice-ptr-range, r=dtolnay
Yuki Okushi [Thu, 1 Oct 2020 23:25:13 +0000 (08:25 +0900)]
Rollup merge of #77111 - fusion-engineering-forks:stabilize-slice-ptr-range, r=dtolnay

Stabilize slice_ptr_range.

This has been unstable for almost a year now. Time to stabilize?

Closes #65807.

@rustbot modify labels: +T-libs +A-raw-pointers +A-slice +needs-fcp

3 years agoRollup merge of #76979 - fusion-engineering-forks:windows-fallback-check, r=dtolnay
Yuki Okushi [Thu, 1 Oct 2020 23:25:11 +0000 (08:25 +0900)]
Rollup merge of #76979 - fusion-engineering-forks:windows-fallback-check, r=dtolnay

Improve std::sys::windows::compat

Improves the compat_fn macro in sys::windows, which is used for conditionally loading APIs that might not be available.

- The module (dll) name can now be any string, not just an ident. (Not all Windows api modules are valid Rust identifiers. E.g. `WaitOnAddress` comes from `API-MS-Win-Core-Synch-l1-2-0.dll`.)
- Adds `FuncName::is_available()` for checking if a function is really available without having to do a duplicate lookup.
- Add comment explaining the lack of locking.
- Use `$_:block` to simplify the macro_rules.
- Apply `allow(unused_variables)` only to the fallback instead of everything.

---

The second point (`is_available()`) simplifies code that needs to pick an implementation depening on what is available, like `sys/windows/mutex.rs`. Before this change, it'd do its own lookup and keep its own `AtomicUsize` to track the result. Now it can just use `c::AcquireSRWLockExclusive::is_available()` directly.

This will also be useful when park/unpark/CondVar/etc. get improved implementations (e.g. from parking_lot or something else), as the best APIs for those are not available before Windows 8.

3 years agoRollup merge of #76851 - fusion-engineering-forks:fixme-nonzero, r=petrochenkov
Yuki Okushi [Thu, 1 Oct 2020 23:25:10 +0000 (08:25 +0900)]
Rollup merge of #76851 - fusion-engineering-forks:fixme-nonzero, r=petrochenkov

Fix 'FIXME' about using NonZeroU32 instead of u32.

It was blocked by #58732 (const fn NonZeroU32::new), which is fixed now.

3 years agoAuto merge of #77412 - Mark-Simulacrum:rls-fix, r=Xanewok
bors [Thu, 1 Oct 2020 22:37:05 +0000 (22:37 +0000)]
Auto merge of #77412 - Mark-Simulacrum:rls-fix, r=Xanewok

Update rls

Includes https://github.com/rust-lang/rls/pull/1700, just fixing compilation and test failures.

Fixes #77311.

3 years agoLink `new` method in `DefautHasher`s doc
Waffle [Thu, 1 Oct 2020 21:30:19 +0000 (00:30 +0300)]
Link `new` method in `DefautHasher`s doc

3 years agoRemove outdated line from `publish_toolstate` hook
LeSeulArtichaut [Mon, 28 Sep 2020 20:28:47 +0000 (22:28 +0200)]
Remove outdated line from `publish_toolstate` hook

3 years agoAdd `-Zprecise-enum-drop-elaboration`
Dylan MacKenzie [Thu, 1 Oct 2020 18:31:43 +0000 (11:31 -0700)]
Add `-Zprecise-enum-drop-elaboration`

Its purpose is to assist in debugging #77382 and #74551.

3 years agoAuto merge of #76971 - bugadani:issue-75659, r=Amanieu
bors [Thu, 1 Oct 2020 18:16:02 +0000 (18:16 +0000)]
Auto merge of #76971 - bugadani:issue-75659, r=Amanieu

Refactor memchr to allow optimization

Closes #75659

The implementation already uses naive search if the slice if short enough, but the case is complicated enough to not be optimized away. This PR refactors memchr so that it exists early when the slice is short enough.

Codegen-wise, as shown in #75659, memchr was not inlined previously so the only way I could find to test this is to check if there is no memchr call. Let me know if there is a more robust solution here.

3 years agoci: switch to environment files to change the environment on GHA
Pietro Albini [Thu, 1 Oct 2020 17:26:07 +0000 (19:26 +0200)]
ci: switch to environment files to change the environment on GHA

See GitHub's blog post on why the change was necessary:

    https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

3 years agoRemove trailing whitespace in iter chain doc
Ivan Tham [Thu, 1 Oct 2020 17:21:36 +0000 (01:21 +0800)]
Remove trailing whitespace in iter chain doc

3 years agoRegression test for case in #77361
Dylan MacKenzie [Thu, 1 Oct 2020 17:07:15 +0000 (10:07 -0700)]
Regression test for case in #77361

3 years agoGive better const-checking error for `async` blocks
Dylan MacKenzie [Thu, 1 Oct 2020 16:28:25 +0000 (09:28 -0700)]
Give better const-checking error for `async` blocks

3 years agoUpdate rls
Mark Rousskov [Thu, 1 Oct 2020 17:07:41 +0000 (13:07 -0400)]
Update rls

* https://github.com/rust-lang/rls/pull/1700

3 years agoAdd example for iter chain struct
Ivan Tham [Thu, 1 Oct 2020 16:45:19 +0000 (00:45 +0800)]
Add example for iter chain struct

3 years agoAuto merge of #76969 - withoutboats:rawfd-refexive-traits, r=dtolnay
bors [Thu, 1 Oct 2020 15:39:33 +0000 (15:39 +0000)]
Auto merge of #76969 - withoutboats:rawfd-refexive-traits, r=dtolnay

Make RawFd implement the RawFd traits

This PR makes `RawFd` implement `AsRawFd`, `IntoRawFd` and `FromRawFd`, so it can be passed to interfaces that use one of those traits as a bound.

3 years agoAdd note about possible future improvement
Mara Bos [Thu, 1 Oct 2020 15:32:23 +0000 (17:32 +0200)]
Add note about possible future improvement

Co-authored-by: David Tolnay <dtolnay@gmail.com>
3 years agoAdd tracking issue
Tim Vermeulen [Thu, 1 Oct 2020 14:52:22 +0000 (16:52 +0200)]
Add tracking issue

3 years agoWork around potential merging/duplication issues in sys/windows/compat.
Mara Bos [Thu, 1 Oct 2020 14:49:55 +0000 (16:49 +0200)]
Work around potential merging/duplication issues in sys/windows/compat.

3 years agoFormatting.
Mara Bos [Sun, 20 Sep 2020 14:30:11 +0000 (16:30 +0200)]
Formatting.

3 years agoUse AcquireSRWLockExclusive::is_available() instead of an extra lookup.
Mara Bos [Sun, 20 Sep 2020 12:49:04 +0000 (14:49 +0200)]
Use AcquireSRWLockExclusive::is_available() instead of an extra lookup.

3 years agoImprove std::sys::windows::compat.
Mara Bos [Sun, 20 Sep 2020 12:46:10 +0000 (14:46 +0200)]
Improve std::sys::windows::compat.

- Module name can now be any string, not just an ident.
  (Not all Windows api modules are valid Rust identifiers.)
- Adds c::FuncName::is_available() for checking if a function is really
  available without having to do a duplicate lookup.
- Add comment explaining the lack of locking.
- Use `$_:block` to simplify the macro_rules.
- Apply allow(unused_variables) only to the fallback instead of
  everything.

3 years agoOnly test on x86_64
Dániel Buga [Thu, 1 Oct 2020 14:02:32 +0000 (16:02 +0200)]
Only test on x86_64

3 years agoAuto merge of #76919 - fusion-engineering-forks:thread-parker, r=dtolnay
bors [Thu, 1 Oct 2020 13:21:34 +0000 (13:21 +0000)]
Auto merge of #76919 - fusion-engineering-forks:thread-parker, r=dtolnay

Use futex-based thread::park/unpark on Linux.

This moves the parking/unparking logic out of `thread/mod.rs` into a module named `thread_parker` in `sys_common`. The current implementation is moved to `sys_common/thread_parker/generic.rs` and the new implementation using futexes is added in `sys_common/thread_parker/futex.rs`.

3 years agoBTreeMap: use Unique::from to avoid a cast where type information exists
Stein Somers [Sat, 26 Sep 2020 18:49:22 +0000 (20:49 +0200)]
BTreeMap: use Unique::from to avoid a cast where type information exists

3 years agoAuto merge of #74839 - alarsyo:multiple_return_terminators, r=oli-obk
bors [Thu, 1 Oct 2020 09:52:58 +0000 (09:52 +0000)]
Auto merge of #74839 - alarsyo:multiple_return_terminators, r=oli-obk

Implement multiple return terminator optimization

Closes #72022

3 years agoBless mir-opt tests for 32 bit
Antoine Martin [Thu, 1 Oct 2020 08:27:28 +0000 (10:27 +0200)]
Bless mir-opt tests for 32 bit

3 years agoAdd test for multiple terminator optimization
Antoine Martin [Thu, 1 Oct 2020 08:08:09 +0000 (10:08 +0200)]
Add test for multiple terminator optimization

3 years agoBless mir-opt tests with new opt
Antoine Martin [Thu, 1 Oct 2020 08:07:04 +0000 (10:07 +0200)]
Bless mir-opt tests with new opt

3 years agoImplement multiple return terminators optimization
Antoine Martin [Thu, 1 Oct 2020 08:06:37 +0000 (10:06 +0200)]
Implement multiple return terminators optimization

3 years agoAuto merge of #77354 - ecstatic-morse:const-checking-moar-errors, r=oli-obk
bors [Thu, 1 Oct 2020 07:38:47 +0000 (07:38 +0000)]
Auto merge of #77354 - ecstatic-morse:const-checking-moar-errors, r=oli-obk

Overhaul const-checking diagnostics

The primary purpose of this PR was to remove `NonConstOp::STOPS_CONST_CHECKING`, which causes any additional errors found by the const-checker to be silenced. I used this flag to preserve diagnostic parity with `qualify_min_const_fn.rs`, which has since been removed.

However, simply removing the flag caused a deluge of errors in some cases, since an error would be emitted any time a local or temporary had a wrong type. To remedy this, I added an alternative system (`DiagnosticImportance`) to silence additional error messages that were likely to distract the user from the underlying issue. When an error of the highest importance occurs, all less important errors are silenced. When no error of the highest importance occurs, all less important errors are emitted after checking is complete. Following the suggestions from the important error is usually enough to fix the less important errors, so this should lead to better UX most of the time.

There's also some unrelated diagnostics improvements in this PR isolated in their own commits. Splitting them out would be possible, but a bit of a pain. This isn't as tidy as some of my other PRs, but it should *only* affect diagnostics, never whether or not something passes const-checking. Note that there are a few trivial exceptions to this, like banning `Yield` in all const-contexts, not just `const fn`.

As always, meant to be reviewed commit-by-commit.

r? `@oli-obk`

3 years agoThings are only moved if non-copy
scottmcm [Thu, 1 Oct 2020 07:04:20 +0000 (07:04 +0000)]
Things are only moved if non-copy

3 years agoAuto merge of #77383 - pickfire:patch-6, r=Mark-Simulacrum
bors [Thu, 1 Oct 2020 05:35:48 +0000 (05:35 +0000)]
Auto merge of #77383 - pickfire:patch-6, r=Mark-Simulacrum

Fix typo in vec doc "tries to reserves"

Superseeds #77192

3 years agoFix some clippy issues
Joshua Nelson [Thu, 1 Oct 2020 05:23:08 +0000 (01:23 -0400)]
Fix some clippy issues

Found while working on https://github.com/rust-lang/rust/pull/77351;
these are just the ones that could be fixed automatically.

3 years agoAuto merge of #77379 - camelid:improve-wording-crate-resolution-error, r=davidtwco
bors [Thu, 1 Oct 2020 03:28:50 +0000 (03:28 +0000)]
Auto merge of #77379 - camelid:improve-wording-crate-resolution-error, r=davidtwco

Improve wording for external crate resolution error

I think it reads better this way.

3 years agoImprove the example for ptr::copy
Scott McMurray [Thu, 1 Oct 2020 03:00:09 +0000 (20:00 -0700)]
Improve the example for ptr::copy

Fixes #77220

3 years agoFix typo in vec doc "tries to reserves"
Ivan Tham [Thu, 1 Oct 2020 02:08:51 +0000 (10:08 +0800)]
Fix typo in vec doc "tries to reserves"

3 years agoAuto merge of #77381 - Dylan-DPC:rollup-0sr6p5p, r=Dylan-DPC
bors [Thu, 1 Oct 2020 01:12:41 +0000 (01:12 +0000)]
Auto merge of #77381 - Dylan-DPC:rollup-0sr6p5p, r=Dylan-DPC

Rollup of 12 pull requests

Successful merges:

 - #76909 (Add Iterator::advance_by and DoubleEndedIterator::advance_back_by)
 - #77153 (Fix recursive nonterminal expansion during pretty-print/reparse check)
 - #77202 (Defer Apple SDKROOT detection to link time.)
 - #77303 (const evaluatable: improve `TooGeneric` handling)
 - #77305 (move candidate_from_obligation_no_cache)
 - #77315 (Rename AllocErr to AllocError)
 - #77319 (Stable hashing: add comments and tests concerning platform-independence)
 - #77324 (Don't fire `const_item_mutation` lint on writes through a pointer)
 - #77343 (Validate `rustc_args_required_const`)
 - #77349 (Update cargo)
 - #77360 (References to ZSTs may be at arbitrary aligned addresses)
 - #77371 (Remove trailing space in error message)

Failed merges:

r? `@ghost`

3 years agoRollup merge of #77371 - camelid:remove-extra-space-in-diagnostic, r=varkor
Dylan DPC [Thu, 1 Oct 2020 00:13:49 +0000 (02:13 +0200)]
Rollup merge of #77371 - camelid:remove-extra-space-in-diagnostic, r=varkor

Remove trailing space in error message

- Add test for error message
- Remove trailing space in error message

3 years agoRollup merge of #77360 - oli-obk:zst_const_pat_regression, r=RalfJung
Dylan DPC [Thu, 1 Oct 2020 00:13:48 +0000 (02:13 +0200)]
Rollup merge of #77360 - oli-obk:zst_const_pat_regression, r=RalfJung

References to ZSTs may be at arbitrary aligned addresses

fixes #77320

r? @RalfJung

3 years agoRollup merge of #77349 - ehuss:update-cargo, r=ehuss
Dylan DPC [Thu, 1 Oct 2020 00:13:46 +0000 (02:13 +0200)]
Rollup merge of #77349 - ehuss:update-cargo, r=ehuss

Update cargo

8 commits in 05c611ae3c4255b7a2bcf4fcfa65b20286a07839..75615f8e69f748d7ef0df7bc0b064a9b1f5c78b2
2020-09-23 23:10:38 +0000 to 2020-09-29 18:42:19 +0000
- Correct mistake about supporting sub-makes and document CARGO_MAKEFLAGS (rust-lang/cargo#8741)
- Properly set for_host for proc-macro tests. (rust-lang/cargo#8742)
- Add Zsh completion for target triples (rust-lang/cargo#8740)
- Reinitialize index on "Object not found" error. (rust-lang/cargo#8735)
- Normalize raw string indentation. (rust-lang/cargo#8739)
- Update links to rustup docs. (rust-lang/cargo#8738)
- Add contributor guide. (rust-lang/cargo#8715)
- Fix minor error in `cargo update` docs. (rust-lang/cargo#8737)

3 years agoRollup merge of #77343 - varkor:rustc_args_required_const-validation, r=lcnr
Dylan DPC [Thu, 1 Oct 2020 00:13:44 +0000 (02:13 +0200)]
Rollup merge of #77343 - varkor:rustc_args_required_const-validation, r=lcnr

Validate `rustc_args_required_const`

Fixes https://github.com/rust-lang/rust/issues/74608.

3 years agoRollup merge of #77324 - Aaron1011:fix/const-item-mutation-ptr, r=petrochenkov
Dylan DPC [Thu, 1 Oct 2020 00:13:43 +0000 (02:13 +0200)]
Rollup merge of #77324 - Aaron1011:fix/const-item-mutation-ptr, r=petrochenkov

Don't fire `const_item_mutation` lint on writes through a pointer

Fixes #77321

3 years agoRollup merge of #77319 - tgnottingham:siphasher_endianness, r=nnethercote
Dylan DPC [Thu, 1 Oct 2020 00:13:41 +0000 (02:13 +0200)]
Rollup merge of #77319 - tgnottingham:siphasher_endianness, r=nnethercote

Stable hashing: add comments and tests concerning platform-independence

SipHasher128 implements short_write in an endian-independent way, yet
its write_xxx Hasher trait methods undo this endian-independence by byte
swapping the integer inputs on big-endian hardware. StableHasher then
adds endian-independence back by also byte-swapping on big-endian
hardware prior to invoking SipHasher128.

This double swap may have the appearance of being a no-op, but is in
fact by design. In particular, we really do want SipHasher128 to be
platform-dependent, in order to be consistent with the libstd SipHasher.
Try to clarify this intent. Also, add and update a couple of unit tests.

---

Previous commit text:

~SipHasher128: fix platform-independence confusion~

~StableHasher is supposed to ensure platform independence by converting
integers to little-endian and extending isize and usize to 64 bits as
necessary, but in fact, much of that work is already handled by
SipHasher128.~

~In particular, SipHasher128 implements short_write in an
endian-independent way, yet both StableHasher and SipHasher128
additionally attempt to achieve endian-independence by byte swapping on
BE hardware before invoking short writes. This double swap has no
effect, so let's remove it.~

~Because short_write is endian-independent, SipHasher128 is already
handling part of the platform-independence, and it would be somewhat
difficult to make it *not* handle that part with the current
implementation. As splitting platform-independence responsibilities
between StableHasher and SipHasher128 would be confusing, let's make
SipHasher128 handle all of it.~

~Finally, update some incorrect comments and increase test coverage.
Unit tests pass on both LE and BE systems.~

3 years agoRollup merge of #77315 - exrook:rename-allocerror, r=joshtriplett
Dylan DPC [Thu, 1 Oct 2020 00:13:39 +0000 (02:13 +0200)]
Rollup merge of #77315 - exrook:rename-allocerror, r=joshtriplett

Rename AllocErr to AllocError

Implements rust-lang/wg-allocators#57

3 years agoRollup merge of #77305 - lcnr:candidate_from_obligation, r=davidtwco
Dylan DPC [Thu, 1 Oct 2020 00:13:37 +0000 (02:13 +0200)]
Rollup merge of #77305 - lcnr:candidate_from_obligation, r=davidtwco

move candidate_from_obligation_no_cache

It's only called from `candidate_from_obligation` which is already in this file.

3 years agoRollup merge of #77303 - lcnr:const-evaluatable-TooGeneric, r=oli-obk,varkor
Dylan DPC [Thu, 1 Oct 2020 00:13:35 +0000 (02:13 +0200)]
Rollup merge of #77303 - lcnr:const-evaluatable-TooGeneric, r=oli-obk,varkor

const evaluatable: improve `TooGeneric` handling

Instead of emitting an error in `fulfill`, we now correctly stall on inference variables.

As `const_eval_resolve` returns `ErrorHandled::TooGeneric` when encountering generic parameters on which
we actually do want to error, we check for inference variables and eagerly emit an error if they don't exist, returning `ErrorHandled::Reported` instead.

Also contains a small bugfix for `ConstEquate` where we previously only stalled on type variables. This is probably a leftover from
when we did not yet support stalling on const inference variables.

r? @oli-obk cc @varkor @eddyb

3 years agoRollup merge of #77202 - ehuss:defer-apple-sdkroot, r=petrochenkov
Dylan DPC [Thu, 1 Oct 2020 00:13:34 +0000 (02:13 +0200)]
Rollup merge of #77202 - ehuss:defer-apple-sdkroot, r=petrochenkov

Defer Apple SDKROOT detection to link time.

This defers the detection of the SDKROOT for Apple iOS/tvOS targets to link time, instead of when the `Target` is defined. This allows commands that don't need to link to work (like `rustdoc` or `rustc --print=target-list`). This also makes `--print=target-list` a bit faster.

This also removes the note in the platform support documentation about these targets being missing. When I wrote it, I misunderstood how the SDKROOT stuff worked.

Notes:
* This means that JSON spec targets can't explicitly override these flags. I think that is probably fine, as I believe the value is generally required, and can be set with the SDKROOT environment variable.
* This changes `x86_64-apple-tvos` to use `appletvsimulator`. I think the original code was wrong (it was using `iphonesimulator`). Also, `x86_64-apple-tvos` seems broken in general, and I cannot build it locally. The `data_layout` does not appear to be correct (it is a copy of the arm64 layout instead of the x86_64 layout). I have not tried building Apple's LLVM to see if that helps, but I suspect it is just wrong (I'm uncertain since I don't know how the tvOS simulator works with its bitcode-only requirements).
* I'm tempted to remove the use of `Result` for built-in target definitions, since I don't think they should be fallible. This was added in https://github.com/rust-lang/rust/pull/34980, but that only relates to JSON definitions. I think the built-in targets shouldn't fail. I can do this now, or not.

Fixes #36156
Fixes #76584

3 years agoRollup merge of #77153 - Aaron1011:fix/better-recursive-expand, r=petrochenkov
Dylan DPC [Thu, 1 Oct 2020 00:13:32 +0000 (02:13 +0200)]
Rollup merge of #77153 - Aaron1011:fix/better-recursive-expand, r=petrochenkov

Fix recursive nonterminal expansion during pretty-print/reparse check

Makes progress towards #43081

In PR #73084, we started recursively expanded nonterminals during the
pretty-print/reparse check, allowing them to be properly compared
against the reparsed tokenstream.

Unfortunately, the recursive logic in that PR only handles the case
where a nonterminal appears inside a `TokenTree::Delimited`. If a
nonterminal appears directly in the expanded tokens of another
nonterminal, the inner nonterminal will not be expanded.

This PR fixes the recursive expansion of nonterminals, ensuring that
they are expanded wherever they occur.

3 years agoRollup merge of #76909 - timvermeulen:advance_by, r=Amanieu
Dylan DPC [Thu, 1 Oct 2020 00:13:29 +0000 (02:13 +0200)]
Rollup merge of #76909 - timvermeulen:advance_by, r=Amanieu

Add Iterator::advance_by and DoubleEndedIterator::advance_back_by

This PR adds the iterator method

```rust
fn advance_by(&mut self, n: usize) -> Result<(), usize>
```

that advances the iterator by `n` elements, returning `Ok(())` if this succeeds or `Err(len)` if the length of the iterator was less than `n`.

Currently `Iterator::nth` is the method to override for efficiently advancing an iterator by multiple elements at once. `advance_by` is superior for this purpose because
- it's simpler to implement: instead of advancing the iterator and producing the next element you only need to advance the iterator
- it composes better: iterators like `Chain` and `FlatMap` can implement `advance_by` in terms of `advance_by` on their inner iterators, but they cannot implement `nth` in terms of `nth` on their inner iterators (see #60395)
- the default implementation of `nth` can trivially be implemented in terms of `advance_by` and `next`, which this PR also does

This PR also adds `DoubleEndedIterator::advance_back_by` for all the same reasons.

I'll make a tracking issue if it's decided this is worth merging. Also let me know if anything can be improved, this went through several iterations so there might very well still be room for improvement (especially in the doc comments). I've written overrides of these methods for most iterators that already override `nth`/`nth_back`, but those still need tests so I'll add them in a later PR.

cc @cuviper @scottmcm @Amanieu

3 years agoUse posix_spawn on musl targets
Tomasz Miąsko [Thu, 1 Oct 2020 00:00:00 +0000 (00:00 +0000)]
Use posix_spawn on musl targets

The posix_spawn had been available in a form suitable for use in a
Command implementation since musl 0.9.12. Use it in a preference to a
fork when possible, to benefit from CLONE_VM|CLONE_VFORK used there.

3 years agoAuto merge of #76325 - lzutao:split-core-str, r=Amanieu
bors [Wed, 30 Sep 2020 23:04:16 +0000 (23:04 +0000)]
Auto merge of #76325 - lzutao:split-core-str, r=Amanieu

Split core/str/mod.rs to smaller files

Note for reviewer:
* I split to multiple commits for easier reviewing, but I could git squash them all to one if requested.
* Recommend pulling this change locally and using advanced git diff viewer or this command:
  ```bash
  git show --reverse --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space master..
  ```

---

I split `core/str/mod.rs` to these modules:

* `converts`: Contains helper functions to convert from bytes to str.
* `error`: For error structs like Utf8Error.
* `iter`: For iterators of many str methods.
* `traits`: For indexing operations and build in traits on str.
* `validations`: For functions validating utf8 --- This name is awkward, maybe utf8.rs is better.

3 years agoImprove wording for external crate resolution error
Camelid [Wed, 30 Sep 2020 22:52:13 +0000 (15:52 -0700)]
Improve wording for external crate resolution error

I think it reads better this way.

3 years agoAuto merge of #77372 - jonas-schievink:rollup-e5bdzga, r=jonas-schievink
bors [Wed, 30 Sep 2020 20:49:27 +0000 (20:49 +0000)]
Auto merge of #77372 - jonas-schievink:rollup-e5bdzga, r=jonas-schievink

Rollup of 12 pull requests

Successful merges:

 - #77037 (more tiny clippy cleanups)
 - #77233 (BTreeMap: keep an eye out on the size of the main components)
 - #77280 (Ensure that all LLVM components requested by tests are available on CI)
 - #77284 (library: Forward compiler-builtins "mem" feature)
 - #77296 (liveness: Use Option::None to represent absent live nodes)
 - #77322 (Add unstable book docs for `-Zunsound-mir-opts`)
 - #77328 (Use `rtassert!` instead of `assert!` from the child process after fork() in std::sys::unix::process::Command::spawn())
 - #77331 (Add test for async/await combined with const-generics.)
 - #77338 (Fix typo in alloc vec comment)
 - #77340 (Alloc vec use imported path)
 - #77345 (Add test for issue #74761)
 - #77348 (Update books)

Failed merges:

r? `@ghost`

3 years agorustc_metadata: Do not forget to encode inherent impls for foreign types
Vadim Petrochenkov [Wed, 30 Sep 2020 19:49:59 +0000 (22:49 +0300)]
rustc_metadata: Do not forget to encode inherent impls for foreign types

3 years agoRollup merge of #77348 - ehuss:update-books, r=ehuss
Jonas Schievink [Wed, 30 Sep 2020 18:56:24 +0000 (20:56 +0200)]
Rollup merge of #77348 - ehuss:update-books, r=ehuss

Update books

## rust-by-example

5 commits in 19f0a0372af497b34369cf182d9d16156cab2969..7d3ff1c12db08a847a57a054be4a7951ce532d2d
2020-08-26 09:38:48 -0300 to 2020-09-28 15:54:25 -0300
- Prevent duplicated error information in "wrapping errors" example (rust-lang/rust-by-example#1375)
- Avoid lifetime annotation in struct example (rust-lang/rust-by-example#1378)
- Clone.md comment and variable name change (rust-lang/rust-by-example#1379)
- Replace panic example with a simpler version (rust-lang/rust-by-example#1380)
- Prefer `const` over `static` (rust-lang/rust-by-example#1381)

## embedded-book

1 commits in 0cd2ca116274b915924c3a7e07c1e046b6f19b77..dd310616308e01f6cf227f46347b744aa56b77d9
2020-08-19 10:33:15 +0000 to 2020-09-26 08:54:08 +0000
- Add instructions for ARM v8 instruction sets  (rust-embedded/book#265)