Commit graph

158231 commits

Author SHA1 Message Date
bors
9dbbbb12c0 Auto merge of #83846 - torhovland:issue-10971, r=davidtwco
Added the --temps-dir option

Fixes #10971.

The new `--temps-dir` option puts intermediate files in a user-specified directory. This provides a fix for the issue where parallel invocations of rustc would overwrite each other's intermediate files.

No files are kept in the intermediate directory unless `-C save-temps=yes`.

If additional files are specifically requested using `--emit asm,llvm-bc,llvm-ir,obj,metadata,link,dep-info,mir`, these will be put in the output directory rather than the intermediate directory.

This is a backward-compatible change, i.e. if `--temps-dir` is not specified, the behavior is the same as before.
2021-11-11 02:52:32 +00:00
tamaron
181716a16c compare between Path instead of str 2021-11-11 11:40:34 +09:00
Yuki Okushi
8d4fbc9a73
Add #[inline]s to SortedIndexMultiMap 2021-11-11 08:35:59 +09:00
bors
8e0293137f Auto merge of #90784 - matthiaskrgr:rollup-car8g12, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #89930 (Only use `clone3` when needed for pidfd)
 - #90736 (adjust documented inline-asm register constraints)
 - #90783 (Update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-10 23:13:06 +00:00
Jubilee Young
7d91357875 Dynamically detect AVX512 in CI
We would like to check for errors with AVX512,
but we don't pick our CPU. So, detect available features.
This variance in checks stochastically reveals issues.
Nondeterminism is acceptable as our goal is protecting downstream.
2021-11-10 14:40:32 -08:00
Jubilee Young
949f71c0dc Deny warnings in CI and fix 2021-11-10 14:40:32 -08:00
Jubilee Young
c52083e256 Use the right name for AVX512F 2021-11-10 14:40:32 -08:00
Matthias Krüger
17cb2b6f43
Rollup merge of #90783 - camelid:update-miri, r=RalfJung
Update Miri

Fixes #90763.

This is the last step in landing rust-lang/miri#1340!

r? `@RalfJung`
2021-11-10 23:04:27 +01:00
Matthias Krüger
90bb5fc08e
Rollup merge of #90736 - Lokathor:inline-asm-docs-updates, r=Amanieu
adjust documented inline-asm register constraints

This change more clearly specifies how `reg` and `reg_thumb` work with ARM, Thumb2, and Thumb1 code.

Based upon the [llvm documentation](https://llvm.org/docs/LangRef.html#supported-constraint-code-list) for register constraint codes.
To be clear, this just updates the docs to match what already happens with rustc/llvm.
No change in the compiler is required to make it match this new documentation.
2021-11-10 23:04:26 +01:00
Matthias Krüger
a09115f3b4
Rollup merge of #89930 - cuviper:avoid-clone3, r=joshtriplett
Only use `clone3` when needed for pidfd

In #89522 we learned that `clone3` is interacting poorly with Gentoo's
`sandbox` tool. We only need that for the unstable pidfd extensions, so
otherwise avoid that and use a normal `fork`.

This is a re-application of beta #89924, now that we're aware that we need
more than just a temporary release fix. I also reverted 12fbabd27f, as
that was just fallout from using `clone3` instead of `fork`.

r? `@Mark-Simulacrum`
cc `@joshtriplett`
2021-11-10 23:04:25 +01:00
Noah Lev
5443854ad0 Update Miri
This is the last step in landing rust-lang/miri#1340!
2021-11-10 12:42:51 -08:00
bors
82af160c2c Auto merge of #90769 - matthiaskrgr:rollup-266apqm, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #88447 (Use computed visibility in rustdoc)
 - #88868 (Allow simd_bitmask to return byte arrays)
 - #90727 (Remove potential useless data for search index)
 - #90742 (Use AddAssign impl)
 - #90758 (Fix collections entry API documentation.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-10 20:12:14 +00:00
Scott McMurray
5b115fcb68 Moar #[inline] 2021-11-10 11:57:14 -08:00
Alex Crichton
1ac5d7dcde std: Tweak expansion of thread-local const
This commit tweaks the expansion of `thread_local!` when combined with a
`const { ... }` value to help ensure that the rules which apply to
`const { ... }` blocks will be the same as when they're stabilized.
Previously with this invocation:

    thread_local!(static NAME: Type = const { init_expr });

this would generate (on supporting platforms):

    #[thread_local]
    static NAME: Type = init_expr;

instead the macro now expands to:

    const INIT_EXPR: Type = init_expr;
    #[thread_local]
    static NAME: Type = INIT_EXPR;

with the hope that because `init_expr` is defined as a `const` item then
it's not accidentally allowing more behavior than if it were put into a
`static`. For example on the stabilization issue [this example][ex] now
gives the same error both ways.

[ex]: https://github.com/rust-lang/rust/issues/84223#issuecomment-953384298
2021-11-10 11:07:43 -08:00
Alex Crichton
7dc38369c0 Disable .debug_aranges for all wasm targets
This follows from discussion on
https://bugs.llvm.org/show_bug.cgi?id=52442 where it looks like this
section doesn't make sense for wasm targets.
2021-11-10 10:47:00 -08:00
Matthias Krüger
5f2497541f
Rollup merge of #90758 - joseph-roitman:fix-entry-doc-key-ref, r=dtolnay
Fix collections entry API documentation.

I found some documentation that seems out of date.
2021-11-10 18:52:30 +01:00
Matthias Krüger
0a9c1be100
Rollup merge of #90742 - est31:add_assign, r=davidtwco
Use AddAssign impl
2021-11-10 18:52:29 +01:00
Matthias Krüger
b31f0198b1
Rollup merge of #90727 - GuillaumeGomez:remove-potential-useless-search-index-data, r=notriddle,camelid
Remove potential useless data for search index

I uncovered this case when working on https://github.com/rust-lang/rust/pull/90726 to debug https://github.com/rust-lang/rust/pull/90385.

Explanations: if we have a full generic, we check if it has generics then we do the following:
 * If it has only one generic, we remove one nested level in order to not keep the "parent" generic (since it has empty name, it's useless after all).
 * Otherwise we add it alongside its generics.

However, I didn't handle the case where a generic had no generics. Meaning that we were adding items with empty names in the search index. So basically useless data in the search index.

r? `@camelid`
2021-11-10 18:52:28 +01:00
Matthias Krüger
858fea410d
Rollup merge of #88868 - calebzulawski:feature/simd_bitmask, r=workingjubilee
Allow simd_bitmask to return byte arrays

cc `@rust-lang/project-portable-simd` `@workingjubilee`
2021-11-10 18:52:27 +01:00
Matthias Krüger
a8dff349ca
Rollup merge of #88447 - inquisitivecrystal:rustdoc-vis, r=jyn514
Use computed visibility in rustdoc

This PR changes `librustdoc` to use computed visibility instead of syntactic visibility. It was initially part of #88019, but was separated due to concerns that it might cause a regression somewhere we couldn't predict.

r? `@jyn514`
cc `@cjgillot` `@petrochenkov`
2021-11-10 18:52:26 +01:00
Jimmy Envall
fc9624c673 Fix trait object error code 2021-11-10 18:49:30 +01:00
Alex Crichton
9a442353f3 Add a missing doc link 2021-11-10 08:35:43 -08:00
Alex Crichton
1d74c77b31 Update src/doc/rustc/src/platform-support.md
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2021-11-10 08:35:43 -08:00
Alex Crichton
9d6f7f7a57 Add target documentation for wasm64-unknown-unknown 2021-11-10 08:35:43 -08:00
Alex Crichton
e4b3496618 Update stdarch/dlmalloc
Ensure that they compile with the now-a-feature-is-required logic.
2021-11-10 08:35:43 -08:00
Alex Crichton
b5c3f4c5d8 Update dlmalloc for libstd
This pulls in a fix for wasm64 to work correctly with this dlmalloc
2021-11-10 08:35:43 -08:00
Alex Crichton
88f1bf73ee Update stdarch/compiler_builtins
Brings in some fixes and better support for the wasm64 target.
2021-11-10 08:35:42 -08:00
Alex Crichton
a3b9405ae7 Use more robust checks in rustc for wasm 2021-11-10 08:35:42 -08:00
Alex Crichton
d2a3c24a95 Update more rustc/libtest things for wasm64
* Add wasm64 variants for inline assembly along the same lines as wasm32
* Update a few directives in libtest to check for `target_family`
  instead of `target_arch`
* Update some rustc codegen and typechecks specialized for wasm32 to
  also work for wasm64.
2021-11-10 08:35:42 -08:00
Alex Crichton
d208e1943b Fix a crash with wasm64 in LLVM
This commit works around a crash in LLVM when the
`-generate-arange-section` argument is passed to LLVM. An LLVM bug is
opened for this and the code in question is also set to continue passing
this flag with LLVM 14, assuming that this is fixed by the time LLVM 14
comes out. Otherwise this should work around debuginfo crashes on LLVM
13.
2021-11-10 08:35:42 -08:00
Alex Crichton
caa9e4a2d0 Review comments 2021-11-10 08:35:42 -08:00
Alex Crichton
f738abe63b Update platform support docs 2021-11-10 08:35:42 -08:00
Alex Crichton
971638824f Use target_family = "wasm" 2021-11-10 08:35:42 -08:00
Alex Crichton
cfb2f98e9e Enable WebAssembly features by default on wasm64
These are all stable as-of-now in the WebAssembly specification so any
engine which implements wasm64 will surely implement these features as
well.
2021-11-10 08:35:42 -08:00
Alex Crichton
7f3ffbc8c2 std: Get the standard library compiling for wasm64
This commit goes through and updates various `#[cfg]` as appropriate to
get the wasm64-unknown-unknown target behaving similarly to the
wasm32-unknown-unknown target. Most of this is just updating various
conditions for `target_arch = "wasm32"` to also account for `target_arch
= "wasm64"` where appropriate. This commit also lists `wasm64` as an
allow-listed architecture to not have the `restricted_std` feature
enabled, enabling experimentation with `-Z build-std` externally.

The main goal of this commit is to enable playing around with
`wasm64-unknown-unknown` externally via `-Z build-std` in a way that's
similar to the `wasm32-unknown-unknown` target. These targets are
effectively the same and only differ in their pointer size, but wasm64
is much newer and has much less ecosystem/library support so it'll still
take time to get wasm64 fully-fledged.
2021-11-10 08:35:42 -08:00
lcnr
f55ff4103f don't inline report_overlap_conflict 2021-11-10 15:10:19 +01:00
lcnr
1296719c06 no overlap errors after failing the orphan check 2021-11-10 15:10:19 +01:00
bors
68ca579406 Auto merge of #90759 - yanok:llvm-dbginfo-fix, r=nikic
Update llvm submodule

This includes debug info generation fix, that fixes #90301.

Also includes WASM backend related fix for https://bugs.llvm.org/show_bug.cgi?id=52352
(I haven't found a corresponding Rust bug).
2021-11-10 12:56:29 +00:00
Ilya Yanok
8128916cad Update llvm submodule
This includes debug info generation fix, that fixes #90301.

Also includes WASM backend related fix for https://bugs.llvm.org/show_bug.cgi?id=52352
(I haven't found a corresponding Rust bug).
2021-11-10 10:58:59 +00:00
Joseph Roitman
7b40448a6f Fix collection entry API documentation. 2021-11-10 12:37:18 +02:00
Guillaume Gomez
8d5ef320fc Remove potential useless data for search index 2021-11-10 11:13:52 +01:00
bors
800a156c1e Auto merge of #88670 - camelid:miri-uninit-num, r=RalfJung
miri: Detect uninitialized integers and floats

Part of rust-lang/miri#1340.

Companion Miri PR: rust-lang/miri#1904

r? `@RalfJung`
2021-11-10 09:36:03 +00:00
Tor Hovland
1793a7acc7 Changing cdylib to staticlib, as the former doesn't work with arm-none-eabi-gcc. 2021-11-10 08:25:35 +01:00
asquared31415
3e799e4963 add missing sym feature 2021-11-10 01:35:39 -05:00
bors
493ea776eb Auto merge of #90754 - matthiaskrgr:rollup-v0483m5, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #90690 (kmc-solid: Avoid the use of `asm_const`)
 - #90748 (Add a real tracking issue for `CommandExt::groups`)
 - #90751 (Update books)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-11-10 06:15:50 +00:00
asquared31415
f3e42cb160 Fix aarch tests 2021-11-10 01:06:03 -05:00
asquared31415
b233d3b5da Add support for specifying multiple clobber_abi in asm!
Allow multiple clobber_abi in asm

Update docs
Fix aarch64 test
Combine abis
Emit duplicate ABI error, empty ABI list error
multiple clobber_abi
2021-11-10 01:06:03 -05:00
Scott McMurray
cc7d8014d7 Specialize array cloning for Copy types
Because after PR 86041, the optimizer no longer load-merges at the LLVM IR level, which might be part of the perf loss.  (I'll run perf and see if this makes a difference.)

Also I added a codegen test so this hopefully won't regress in future -- it passes on stable and with my change here, but not on the 2021-11-09 nightly.
2021-11-09 21:43:20 -08:00
Noah Lev
c20ee3e4d6 Add comments ensuring that generics are cleaned before args
Otherwise, rustdoc panics with messages like this:

   thread 'rustc' panicked at 'assertion failed: cx.impl_trait_bounds.is_empty()',
   src/librustdoc/clean/utils.rs:462:5

This ordering requirement is unrelated to the `clean_fn_decl_with_args`
refactoring, but the requirement was uncovered as part of that change.

I'm not sure if *all* of these places have the requirement, but I added
comments to them just in case.
2021-11-09 21:10:42 -08:00
Matthias Krüger
e7375016eb
Rollup merge of #90751 - ehuss:update-books, r=ehuss
Update books

## nomicon

1 commits in 358e6a61d5f4f0496d0a81e70cdcd25d05307342..c6b4bf831e9a40aec34f53067d20634839a6778b
2021-10-20 11:23:12 -0700 to 2021-11-09 02:30:56 +0900
- Replace some use of variant with covariant (rust-lang/nomicon#322)

## book

11 commits in fd9299792852c9a368cb236748781852f75cdac6..5c5dbc5b196c9564422b3193264f3288d2a051ce
2021-10-22 21:59:46 -0400 to 2021-11-09 19:30:43 -0500
- Fix constants link.
- Fix updated anchor
- Propagate edits to chapter 2 back
- Edits to nostarch's chapter 3 edits
- ch 3 from nostarch
- Fix Cargo.toml snippet about custom derive macros
- Snapshot of chapter 9 for nostarch
- Create tmp/src for converting quotes, not sure why this broke but ok
- Update question mark to better explain where it can be used
- Clarify sentence about Results in functions that don't return Result. Fixes rust-lang/book#2912.
- Merge pull request rust-lang/book#2913 from covariant/patch-1

## rust-by-example

2 commits in 27f1ff5e440ef78828b68ab882b98e1b10d9af32..e9d45342d7a6c1def4731f1782d87ea317ba30c3
2021-10-13 08:04:40 -0300 to 2021-11-02 13:33:03 -0500
- Enums: Linked-List Needs Re-Wording (rust-lang/rust-by-example#1469)
- fix: Use the point as top left corner for `square` (rust-lang/rust-by-example#1471)

## rustc-dev-guide

13 commits in b06008731af0f7d07cd0614e820c8276dfed1c18..196ef69aa68f2cef44f37566ee7db37daf00301b
2021-10-21 15:13:09 -0500 to 2021-11-07 07:48:47 -0600
- Fix typo: [upv.rs_mentioned] -&gt; [upvars_mentioned]
- Add note to emphasize replacing TARGET_TRIPLE (rust-lang/rustc-dev-guide#1250)
- Remove some legacy test suites.
- tiny capitalization fix
- Fix date
- Update some date-check comments
- Ensure date-check cron job is using latest stable Rust
- enhance subtree docs, link to clippy docs
- Edit introduction to bootstrapping
- Some minor adjustments to the diagnostic documentation
- Edit "About this guide" for semantic line feeds
- Fix `rustc_mir` related links (rust-lang/rustc-dev-guide#1228)
- Add documentation for LLVM CFI support

## edition-guide

3 commits in 7c0088ca744d293a5f4b1e2ac378e7c23d30fe55..27f4a84d3852e9416cae5861254fa53a825c56bd
2021-10-05 13:28:05 +0200 to 2021-11-08 10:13:20 -0500
- Add a missing period (rust-lang/edition-guide#271)
- Fix syntax error in code example (rust-lang/edition-guide#270)
- Fixed an example error of prelude.md (rust-lang/edition-guide#269)
2021-11-10 06:02:56 +01:00