Commit graph

123170 commits

Author SHA1 Message Date
bors
04488afe34 Auto merge of #75878 - pietroalbini:stable-next, r=Mark-Simulacrum
[stable] Prepare Rust 1.46.0

Also updated the compatibility notes to account for the regressions we didn't fix for this release. The release team evaluated them, and we agreed they're not enough to block the release.

r? @Mark-Simulacrum
cc @rust-lang/release
2020-08-24 14:59:38 +00:00
Pietro Albini
ed6d57b85b
ci: bump release channel to stable 2020-08-24 16:36:27 +02:00
Pietro Albini
c05d8ae05a
stage0: use production artifacts 2020-08-24 16:36:27 +02:00
Pietro Albini
847c2ade2d
releases: include last-minute compatibility notes for 1.46.0 2020-08-24 16:09:40 +02:00
bors
cfbc6d4cf1 Auto merge of #75722 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports

* Fix regionck failure when converting Index to IndexMut #74960
* Update RELEASES.md for 1.46.0 #74744
* allow escaping bound vars when normalizing `ty::Opaque` #75443

r? @ghost
2020-08-21 13:32:14 +00:00
Mark Rousskov
68d6e56fea Fix fortanix build 2020-08-21 08:49:05 -04:00
Mark Rousskov
798ba0e052 Drop reviewers for toolstate embedded book 2020-08-20 19:28:41 -04:00
Matthew Jasper
11014967a3 Don't immediately error for cycles during normalization 2020-08-20 22:26:02 +01:00
Bastian Kauschke
1c5fe50557 allow escaping bound vars when normalizing ty::Opaque 2020-08-20 15:19:52 -04:00
Mark Rousskov
ba72217f68 Cherry-pick 1.46 release notes 2020-08-20 15:17:00 -04:00
Gary Guo
96ca7842db Add UI test for issue 74933 2020-08-20 15:17:00 -04:00
Gary Guo
b4e552b1c8 Fix regionck failure when converting Index to IndexMut 2020-08-20 15:17:00 -04:00
bors
32c481e156 Auto merge of #74966 - jumbatm:allow-clashing-extern-decl, r=Mark-Simulacrum
[beta] Make ClashingExternDeclarations Allow by default.

As per https://github.com/rust-lang/rust/pull/73990#issuecomment-666457338, this PR changes `clashing_extern_declarations` to allow-by-default to sidestep current false positives & negatives on the beta branch.

Note that the changes to fix the issue properly have been merged to master (see #73990), but those changes will have to arrive on the next release train.
2020-08-09 16:34:13 +00:00
bors
63ca02846e Auto merge of #75261 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports

* Forbid non-derefable types explicitly in unsizing casts #75136
* forbid `#[track_caller]` on main #75130
* Fix #[track_caller] shims for trait objects. #74784
* rustc_target: Add a target spec option for disabling `--eh-frame-hdr` #74631
* Disable Azure Pipelines except for macOS #74620
* Upload builds from GHA instead of Azure Pipelines #74565
* Add the aarch64-apple-darwin target #74541
* Use `ReEmpty(U0)` as the implicit region bound in typeck #74509
* rustbuild: drop tool::should_install #74457
* lint: use `transparent_newtype_field` to avoid ICE #74340
* Don't panic if the lhs of a div by zero is not statically known #74221
* improper_ctypes_definitions: allow `Box` #74448
* typeck: check for infer before type impls trait #73965
2020-08-07 19:51:05 +00:00
David Wood
ed591d0040 typeck: check for infer before type impls trait
This commit checks that the target type of the cast (an error related
to which is being reported) does not have types to be inferred before
checking if it implements the `From` trait.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-07 11:55:46 -04:00
David Wood
887c4c92ee improper_ctypes_definitions: allow Box
This commit stops linting against `Box` in `extern "C" fn`s for the
`improper_ctypes_definitions` lint - boxes are documented to be
FFI-safe.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-07 11:55:23 -04:00
Oliver Scherer
83f16cb66a Don't panic if the lhs of a div by zero is not statically known 2020-08-07 11:54:46 -04:00
David Wood
34c9ac3192 lint: use transparent_newtype_field to avoid ICE
This commit re-uses the `transparent_newtype_field` function instead of
manually calling `is_zst` on normalized fields to determine which field
in a transparent type is the non-zero-sized field, thus avoiding an ICE.

Signed-off-by: David Wood <david@davidtw.co>
2020-08-07 11:54:30 -04:00
Marc-Antoine Perennou
1a2f6d5d6f rustbuild: drop tool::should_install
Always install when the build succeeds

Fixes #74431

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-08-07 11:54:05 -04:00
Matthew Jasper
ca9eb24ee9 Use ReEmpty(U0) as the implicit region bound in typeck 2020-08-07 11:53:52 -04:00
Jake Goulding
9452bd7205 Add the aarch64-apple-darwin target
This is a basic copy-paste-modify from the existing
x86_64-apple-darwin target.
2020-08-07 11:52:17 -04:00
Pietro Albini
ec98df7e67 ci: disable Azure Pipelines except for macOS 2020-08-07 11:51:35 -04:00
Pietro Albini
b5ad15b6eb ci: upload non-macOS from GHA instead of Azure Pipelines 2020-08-07 11:51:10 -04:00
Pietro Albini
d3aaac0c86 ci: allow RLA to pick the right PR number 2020-08-07 11:51:10 -04:00
Vadim Petrochenkov
346dc2ff9c rustc_target: Add a target spec option for disabling --eh-frame-hdr 2020-08-07 11:47:31 -04:00
Adam Perry
e69dd7ad3b Fix #[track_caller] shims for trait objects.
We were missing an Instance::resolve_for_fn_ptr in resolve_for_vtable.

Closes #74764.
2020-08-07 11:47:12 -04:00
Bastian Kauschke
c5d167a4b1 tweak error message 2020-08-07 11:46:43 -04:00
Bastian Kauschke
3accd067ae forbid #[track_caller] on main 2020-08-07 11:46:43 -04:00
Yuki Okushi
e421cb153e Forbid non-derefable types explicitly in unsizing casts 2020-08-07 11:46:27 -04:00
jumbatm
1625966666 Make ClashingExternDeclarations Allow by default. 2020-07-31 11:26:59 +10:00
bors
6f959902b3 Auto merge of #74593 - ehuss:update-beta-cargo, r=Mark-Simulacrum
[beta] Update cargo

2 commits in 4f74d9b2a771c58b7ef4906b2668afd075bc8081..149022b1d8f382e69c1616f6a46b69ebf59e2dea
2020-07-08 17:13:00 +0000 to 2020-07-17 16:39:39 -0400
- [beta] Revert "Improve support for non-`master` main branches" (rust-lang/cargo#8503)
- [beta] Avoid colliding with older Cargo fingerprint changes (rust-lang/cargo#8488)
2020-07-23 02:59:09 +00:00
Manish Goregaokar
85f1370606 Rollup merge of #74418 - rye:gha-dedup-shell-setting, r=pietroalbini
ci: Set `shell: bash` as a default, remove duplicates

A follow-up to #74406, this commit merely removes the `shell: bash` lines where they were added in favor of setting defaults for *all* "run" steps in the jobs that run the tests.

The changes in #74406 were needed because of an upstream change to the `windows-2019` GitHub Actions image. Previously, the configuration worked fine without specifying `shell: bash`, but for some reason this broke with a new change that was deployed today. The preceding PR was a hotfix to get CI passing, but there was a slightly less duplicative way to specify the default shell for the jobs, which was to set the `defaults.run` option.

This change applies to the `pr`, `try`, `auto`, and `auto-fallible` jobs, which are derived from the YAML-anchor `base-ci-job`.  I did not apply these changes to the `master`, `try-success`, `try-failure`, `auto-success`, or `auto-failure` jobs because they have only a few steps.

cc/r? @Mark-Simulacrum
2020-07-22 08:28:23 -07:00
Manish Goregaokar
59e3a05815 Rollup merge of #74406 - Mark-Simulacrum:fix-windows-maybe, r=Mark-Simulacrum
Set shell for github actions CI

r? @pietroalbini but because this seems at worst harmless and CI is broken self approving
2020-07-22 08:28:18 -07:00
Eric Huss
6a070f2a2e [beta] Update cargo 2020-07-21 08:41:21 -07:00
bors
e51b714db8 Auto merge of #74323 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] 1.46 beta
2020-07-15 19:14:36 +00:00
Mark Rousskov
dba515e861 Cherry-pick non-nightly rustfmt fixes 2020-07-15 08:11:21 -04:00
Mark Rousskov
83b6d84a2f Dummy function to re-add const_transmute feature gate 2020-07-14 21:09:06 -04:00
Mark Rousskov
2af7940474 1.46 beta 2020-07-14 08:56:12 -04:00
bors
c724b67e1b Auto merge of #73490 - CAD97:range-unchecked-stepping, r=Amanieu
Use step_unchecked more liberally in range iter impls

Without these `_unchecked`, these operations on iterators of `char` fail to optimize out the unreachable panicking condition on overflow.

cc @cuviper https://github.com/rayon-rs/rayon/pull/771 where this was discovered.
2020-07-14 08:56:06 +00:00
bors
4a689da944 Auto merge of #74313 - Manishearth:rollup-b55rn6t, r=Manishearth
Rollup of 8 pull requests

Successful merges:

 - #73354 (Update RELEASES.md for 1.45.0)
 - #73852 (rustdoc: insert newlines between attributes)
 - #73867 (Document the union keyword)
 - #74046 (Fix caching issue when building tools.)
 - #74123 (clean up E0718 explanation)
 - #74147 (rustdoc: Allow linking from private items to private types)
 - #74285 (#71669: add ui, codegen tests for volatile + nearby int intrinsics)
 - #74286 (Added detailed error code explanation for issue E0688 in Rust compiler.)

Failed merges:

r? @ghost
2020-07-14 05:23:45 +00:00
Manish Goregaokar
9a1df31d55
Rollup merge of #74286 - PankajChaudhary5:E0688, r=GuillaumeGomez
Added detailed error code explanation for issue E0688 in Rust compiler.

Added proper error explanation for issue E0688 in the Rust compiler.
Error Code E0688

Sub Part of Issue #61137

r? @GuillaumeGomez
2020-07-13 22:23:15 -07:00
Manish Goregaokar
fa4ada1a86
Rollup merge of #74285 - wangtheo:issue-71669, r=lcnr
#71669: add ui, codegen tests for volatile + nearby int intrinsics

Added some tests for intrinsics. See https://github.com/rust-lang/rust/issues/71669.
2020-07-13 22:23:13 -07:00
Manish Goregaokar
e4a9b36126
Rollup merge of #74147 - dennis-hamester:fix/issue-74134, r=jyn514
rustdoc: Allow linking from private items to private types

Fixes #74134

After PR #72771 this would trigger an intra_doc_link_resolution_failure warning
when rustdoc is invoked without --document-private-items. Links from private
items to private types are however never actually generated in that case and
thus shouldn't produce a warning. These links are in fact a very useful tool to
document crate internals.

Tests are added for all 4 combinations of public/private items and link
targets. Test 1 is the case mentioned above and fails without this commit. Tests
2 - 4 passed before already but are added nonetheless to prevent regressions.
2020-07-13 22:23:11 -07:00
Manish Goregaokar
549aa03d86
Rollup merge of #74123 - GuillaumeGomez:cleanup-e0718, r=pickfire
clean up E0718 explanation

r? @Dylan-DPC
2020-07-13 22:23:10 -07:00
Manish Goregaokar
e5532436a1
Rollup merge of #74046 - ehuss:deny-warnings-caching, r=Mark-Simulacrum
Fix caching issue when building tools.

This fixes a problem with tool builds not being cached properly.

#73297 changed it so that Clippy will participate in the "deny warnings" setting. Unfortunately this causes a problem because Clippy shares the build directory with other tools which do not participate in "deny warnings".  Because Cargo does not independently cache artifacts based on different RUSTFLAGS settings, it causes all the shared dependencies to get rebuilt if Clippy ever gets built.

The solution here is to stop using RUSTFLAGS, and just sneak the settings in through the rustc wrapper. Cargo won't know about the different settings, so it will not bust the cache. This should be safe since lint settings on dependencies are ignored. This is how things used to work in the past before #64316.

Alternate solutions:
* Treat Clippy as a "submodule" and don't enforce warnings on it. This was the behavior before #73297. The consequence is that if a warning sneaks into clippy, that the clippy maintainers will need to fix it when they sync clippy back to the clippy repo.
* Just deny warnings on all tools (removing the in-tree/submodule distinction). This is tempting, but with some issues (cc #52336):
  * Adding or changing warnings in rustc can be difficult to land because tools have to be updated if they trip the warning. In practice, this isn't too bad.  Cargo (and rustfmt) already runs with `deny(warnings)`, so this has been the de-facto standard already (although they do not use the extra lints like `unused_lifetimes`).
* Teach Cargo to add flags to the workspace members, but not dependencies.
* Teach Cargo to add flags without fingerprinting them?
* Teach Cargo to independently cache different RUSTFLAGS artifacts (this was [reverted](https://github.com/rust-lang/cargo/pull/7417) due to complications). This would also unnecessarily rebuild dependencies, but would avoid cache thrashing.
* Teach Cargo about lint settings.

Closes #74016
2020-07-13 22:23:08 -07:00
Manish Goregaokar
d9614dbe47
Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplett
Document the union keyword

Partial fix of #34601.

This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union.

@rustbot modify labels: T-doc,C-enhancement
2020-07-13 22:23:03 -07:00
Manish Goregaokar
eb7fdb2e07
Rollup merge of #73852 - euclio:rustdoc-attr-newlines, r=GuillaumeGomez
rustdoc: insert newlines between attributes

Fixes #73205.
2020-07-13 22:23:00 -07:00
Manish Goregaokar
aa29e3de31
Rollup merge of #73354 - XAMPPRocky:relnotes-1.45.0, r=Mark-Simulacrum
Update RELEASES.md for 1.45.0

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

r? @Mark-Simulacrum
cc @rust-lang/release
2020-07-13 22:22:58 -07:00
wangtheo
8df79fcc76
Remove trailing whitespace 2020-07-13 09:44:48 -04:00
Pankaj Chaudhary
bc2b37aad7 Merge branch 'master' into E0688 2020-07-13 14:57:22 +05:30