Commit Graph

123324 Commits

Author SHA1 Message Date
Joshua M. Clulow
8368a35f83 build dist for x86_64-unknown-illumos
This change creates a new Docker image, "dist-x86_64-illumos", and sets
things up to build the full set of "dist" packages for illumos hosts, so
that illumos users can use "rustup" to install packages.  It also
adjusts the manifest builder to expect complete toolchains for this
platform.
2020-07-08 23:39:09 +00:00
Joshua M. Clulow
7fb421bd77 linker: illumos ld does not support --eh-frame-hdr
As of rust-lang/rust#73564, the --eh-frame-hdr flag is unconditionally
passed to linkers on many platforms.  The illumos link editor does not
currently support this flag.

The linker machinery in the Rust toolchain currently seems to use the
(potentially cross-compiled) target to choose linker flags, rather than
looking at what might be running on the build system.  Disabling the
flag for all illumos/Solaris targets seems like the best we can do for
now without more serious surgery.
2020-07-08 23:36:05 +00:00
Bastian Kauschke
1f982305e4 ToPredicate by value 2020-07-08 23:40:06 +02:00
Tom Eccles
d9fec595e8 ci: fix context for disabled docker images
When the dockerfiles were moved into the host-x86_64 directory, paths
for COPY commands were updated with the new host-x86_64/ prefix. This
suggested that the intended context was src/ci/docker. However, the context
for disabled docker images was src/ci/docker/host-x86_64. This broke the new
paths and prevented src/ci/docker/scripts from being included in the
context at all.

This commit corrects this context allowing docker to find the files it
needs for COPY commands.
2020-07-08 22:02:31 +01:00
Tom Eccles
51b646e487 ci: disabled: riscv: minimise docker overlays
Suggested by @bjorn3

Every RUN command creates a new overlay on top of the image as of before
the RUN command. Using fewer RUN commands prevents intermediate overlays
(which in this case would have contained the entire Linux source tree).
2020-07-08 21:20:13 +01:00
bors
8aa18cbdc5 Auto merge of #74153 - ehuss:fix-bootstrap-test-librustc, r=Mark-Simulacrum
Fix x.py test for librustc crates.

#73352 introduced a bug where `x.py test src/librustc_ast` would fail to actually run the tests. The issue is that `krate` and `all_krates` were changed to return relative paths. This caused the code to do a test of "relative_path ends with absolute path" which is always false.  The solution is to swap that around.

The change to `Crate` isn't necessary, it just simplifies the code and makes it uniform with `CrateLibrustc`.
2020-07-08 20:03:32 +00:00
Eduardo Broto
db1c946aaa unnecessary_sort_by: avoid linting if key borrows 2020-07-08 21:31:59 +02:00
Eric Huss
ca22091a90 Update cargo 2020-07-08 10:48:24 -07:00
Eric Huss
7238726399 Fix librustc_errors unit tests. 2020-07-08 10:44:29 -07:00
Seth Pellegrino
56b6b44641 Avoid running test on Windows platforms
There don't seem to be any other compiletests that are 1) building a standalone "no_core" create and then 2) trying to link against it. There seems to be a platform-specific limitation in doing so:

```
2020-07-08T16:07:42.9419409Z   = note:    Creating library D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.lib and object D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.exp
2020-07-08T16:07:42.9419810Z           LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
2020-07-08T16:07:42.9420032Z           D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll : fatal error LNK1120: 1 unresolved externals
```

Possibly this could be resolved by adding a `__DllMainCRTStartup` or `__DllMainCRTStartup@12` symbol in an architecture- and platform-specific way.
2020-07-08 09:48:15 -07:00
robojumper
37d75da266 make match_like_matches_macro only apply to matches with a wildcard 2020-07-08 18:37:20 +02:00
Tamir Duberstein
1e567c1168
Avoid "blacklist"
Other terms are more inclusive and precise.

Clippy still has a lint named "blacklisted-name", but renaming it would
be a breaking change, so is left for future work.

The target configuration option "abi-blacklist" has been depreciated and
renamed to "unsupported-abis". The old name continues to work.
2020-07-08 12:08:27 -04:00
bors
e12a316b01 Auto merge of #5776 - flip1995:rustup, r=flip1995
Rustup

changelog: none

r? @ghost
2020-07-08 15:56:23 +00:00
Eric Huss
26353eae4c Fix x.py test for librustc crates. 2020-07-08 08:52:48 -07:00
Seth Pellegrino
9366458c58 Apply #![crate_type = "rlib"] directly to the linker 2020-07-08 08:20:43 -07:00
Arlo Siemsen
59f979fa06 Fix cross-compilation of LLVM to aarch64 Windows targets
When cross-compiling, the LLVM build system recurses to build tools
that need to run on the host system. However, since we pass cmake defines
to set the compiler and target, LLVM still compiles these tools for the
target system, rather than the host. The tools then fail to execute
during the LLVM build.

This change sets defines for the tools that need to run on the
host (llvm-nm, llvm-tablegen, and llvm-config), so that the LLVM build
does not attempt to build them, and instead relies on the tools already built.

If compiling with clang-cl, this change also adds the `--target` option
to specify the target triple. MSVC compilers do not require this, since there
is a separate compiler binary for cross-compilation.
2020-07-08 08:19:50 -07:00
Ayaz Hafiz
3c63fba03d
Correctly mark the ending span of a match arm
Closes #74050

r? @matthewjasper
2020-07-08 07:28:07 -07:00
bors
1d919c9377 Auto merge of #74124 - ehuss:fix-doc-dry-run-up-to-date, r=Mark-Simulacrum
Fix occasional bootstrap panic in docs.

I am occasionally running into this panic when running `x.py`:

> thread 'main' panicked at 'source "/Users/eric/Proj/rust/rust/build/x86_64-apple-darwin/md-doc/unstable-book" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:173:19

I have not been able to figure out the exact sequence of commands that leads to this error (I tried for quite a while to reproduce it). I think it may involve updating my tree, but I am uncertain.  An artificial way to trigger it is to build the documentation, and then delete the `md-doc` directory manually.

The cause is that bootstrap does a "dry run" before every command, and in this case `up_to_date` panics because the destination exists (`build/x86_64-apple-darwin/doc/unstable-book/index.html `) but the source does not (`build/x86_64-apple-darwin/md-doc/unstable-book`).

I am uncertain if it is important that the last line `builder.run(…)` needs to be called during the dry run. This patch seems to fix the issue, though.
2020-07-08 09:47:41 +00:00
Dennis Hamester
c8b16cdbd0 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-08 08:15:34 +02:00
Ivan Tham
0965443001
Remove unneeded ToString import in liballoc slice 2020-07-08 12:47:19 +08:00
Ivan Tham
7bc85e29c9
Liballoc use vec instead of vector
Keep congruency with other parts, full word vector is rarely used.
2020-07-08 12:44:43 +08:00
Dan Gohman
58fc61b79c Make WASI's FileExt's read_at/write_at consistent with other targets.
Rename the existing read_at/write_at to read_vectored_at/write_vectored_at,
for consistency with libstd's read_vectored/write_vectored. And,
introduce new read_at/write_at functions which take a single buffer,
similar to all other targets which provide these functions, so this will
make it easier for applications to share code between WASI and other
targets.

Note that WASI's FileExt is currently unstable.
2020-07-07 16:04:52 -07:00
Dan Gohman
653c091262 Add read_exact_at and write_all_at to WASI's FileExt
This adds `read_exact_at` and `write_all_at` to WASI's `FileExt`,
similar to the Unix versions of the same names.
2020-07-07 16:04:52 -07:00
Yuki Okushi
dd07774617
Fix broken link in rustdocdoc 2020-07-08 07:15:17 +09:00
Michael Forney
32025fd76a Update rust-installer to latest version
This pulls in a fix for the install script on some tr(1) implementations,
as well as an update to use `anyhow` instead of `failure` for error
handling.
2020-07-07 14:15:51 -07:00
Seth Pellegrino
8d267db31a Revert "Add guard to check for local core crate"
This reverts commit ee3a0f867e.
2020-07-07 14:15:31 -07:00
Eric Huss
b50c13cc28 Update books 2020-07-07 13:53:46 -07:00
bors
8ac1525e09 Auto merge of #74006 - euclio:sys-unix-static-mut, r=oli-obk
libstd: remove some mutable statics in sys::unix

My understanding is that this achieves the same behavior and performance with safe code.
2020-07-07 19:35:26 +00:00
Seth Pellegrino
f258d98f65 ignore-tidy-linelength for @has assertions 2020-07-07 10:39:10 -07:00
Oliver Middleton
56fb71786a rustdoc: Rename invalid_codeblock_attribute lint to be plural 2020-07-07 18:29:26 +01:00
Seth Pellegrino
865b930bc9 Assert current behavior for links
For the two of these tests that have a local `char` to link to, this behavior isn't what's expected, but is what's happening presently.
2020-07-07 10:23:29 -07:00
Aleksey Kladov
b82df31bf3 ⬆️ rust-analyzer 2020-07-07 18:37:41 +02:00
bors
e1beee4992 Auto merge of #74059 - RalfJung:miri-uninit-validation, r=oli-obk
Miri value validation: fix handling of uninit memory

Fixes https://github.com/rust-lang/miri/issues/1456
Fixes https://github.com/rust-lang/miri/issues/1467

r? @oli-obk
2020-07-07 14:21:18 +00:00
Takayuki Nakata
5307cb5614 Add a lint for .repeat(1)
fix #3028.
2020-07-07 23:13:39 +09:00
Eric Huss
561d5acb9e Fix occasional bootstrap panic in docs. 2020-07-07 06:37:47 -07:00
Guillaume Gomez
00980b6ccd clean up E0718 explanation 2020-07-07 14:13:03 +02:00
bors
51eeabf505 Auto merge of #73562 - poliorcetics:e0432-to-edition2018, r=GuillaumeGomez
Update E0432 long description with the separate behaviors of editions 2015 and 2018

Fixes #64668.

I restarted from the work done in #71413.
2020-07-07 09:22:57 +00:00
Seth Pellegrino
165aecbee3 build extern docs as well 2020-07-06 19:46:53 -07:00
Seth Pellegrino
33a5d00efb Two new rustdoc tests for intra links
They both produce less-than-desirable output (links going to docs.rust-lang.org), but I haven't figured out yet how to assert about them properly.
2020-07-06 19:35:07 -07:00
bors
c41fcad908 Auto merge of #74117 - Manishearth:rollup-ds7z0kx, r=Manishearth
Rollup of 14 pull requests

Successful merges:

 - #70563 ([rustdoc] Page hash handling)
 - #73856 (Edit librustc_lexer top-level docs)
 - #73870 (typeck: adding type information to projection)
 - #73953 (Audit hidden/short code suggestions)
 - #73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)])
 - #73969 (mir: mark mir construction temporaries as internal)
 - #73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr))
 - #74067 (rustdoc: Restore underline text decoration on hover for FQN in header)
 - #74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.)
 - #74078 (Always resolve type@primitive as a primitive, not a module)
 - #74089 (Add rust-analyzer to the build manifest)
 - #74090 (Remove unused RUSTC_DEBUG_ASSERTIONS)
 - #74102 (Fix const prop ICE)
 - #74112 (Expand abbreviation in core::ffi description)

Failed merges:

r? @ghost
2020-07-07 00:56:44 +00:00
bors
70f9d23b91 Auto merge of #74117 - Manishearth:rollup-ds7z0kx, r=Manishearth
Rollup of 14 pull requests

Successful merges:

 - #70563 ([rustdoc] Page hash handling)
 - #73856 (Edit librustc_lexer top-level docs)
 - #73870 (typeck: adding type information to projection)
 - #73953 (Audit hidden/short code suggestions)
 - #73962 (libstd/net/tcp.rs: #![deny(unsafe_op_in_unsafe_fn)])
 - #73969 (mir: mark mir construction temporaries as internal)
 - #73974 (Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr))
 - #74067 (rustdoc: Restore underline text decoration on hover for FQN in header)
 - #74074 (Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.)
 - #74078 (Always resolve type@primitive as a primitive, not a module)
 - #74089 (Add rust-analyzer to the build manifest)
 - #74090 (Remove unused RUSTC_DEBUG_ASSERTIONS)
 - #74102 (Fix const prop ICE)
 - #74112 (Expand abbreviation in core::ffi description)

Failed merges:

r? @ghost
2020-07-07 00:56:44 +00:00
Manish Goregaokar
73f2069d52
Rollup merge of #74112 - pierwill:patch-2, r=sfackler
Expand abbreviation in core::ffi description
2020-07-06 17:45:41 -07:00
Manish Goregaokar
38f5151d3f
Rollup merge of #74102 - oli-obk:const_prop_icde, r=wesleywiser
Fix const prop ICE

we used to erase the local just before we tried to read it for diagnostics

fixes #73993

r? @wesleywiser
2020-07-06 17:45:39 -07:00
Manish Goregaokar
50e22bddcf
Rollup merge of #74090 - tmiasko:rustc-debug-assertions, r=RalfJung
Remove unused RUSTC_DEBUG_ASSERTIONS

Since #73374 the rustc wrapper no longer configures debug assertions
based on RUSTC_DEBUG_ASSERTIONS environment variable.

r? @RalfJung
2020-07-06 17:45:37 -07:00
Manish Goregaokar
caa858ba48
Rollup merge of #74089 - matklad:ship-rust-analyzer-some-more, r=pietroalbini
Add rust-analyzer to the build manifest

Does not die locally, produces `rust-analyzer-0.1.0-dev-x86_64-unknown-linux-gnu.tar.gz.sha256` and add something about rust-analyzer to some `.toml` file. Seems like a success?
2020-07-06 17:45:35 -07:00
Manish Goregaokar
ecc6f5683b
Rollup merge of #74078 - jyn514:lut, r=Manishearth
Always resolve type@primitive as a primitive, not a module

Previously, if there were a module in scope with the same name as the
primitive, that would take precedence. Coupled with
https://github.com/rust-lang/rust/issues/58699, this made it impossible
to link to the primitive when that module was in scope.

This approach could be extended so that `struct@foo` would no longer resolve
to any type, etc. However, it could not be used for glob imports:

```rust
pub mod foo {
  pub struct Bar;
}

pub enum Bar {}
use foo::*;

// This is expected to link to `inner::Bar`, but instead it will link to the enum.
/// Link to [struct@Bar]
pub struct MyDocs;
```

The reason for this is that this change does not affect the resolution
algorithm of rustc_resolve at all. The only reason we could special-case
primitives is because we have a list of all possible primitives ahead of time.

Closes https://github.com/rust-lang/rust/issues/74063

r? @Manishearth
2020-07-06 17:45:34 -07:00
Manish Goregaokar
86f8c5350f
Rollup merge of #74074 - sunfishcode:windows-openoptionsext-return-type, r=LukasKalbertodt
Fix the return type of Windows' `OpenOptionsExt::security_qos_flags`.

This adjusts the return type of Windows' `OpenOptionsExt::security_qos_flags`
to be consistent with the other functions in the trait.
2020-07-06 17:45:32 -07:00
Manish Goregaokar
3199aeb654
Rollup merge of #74067 - rye:rustdoc-fqn-hover-underline, r=GuillaumeGomez
rustdoc: Restore underline text decoration on hover for FQN in header

This causes the components of FQN's (e.g. `std`, `net`, and `Ipv4Addr` of the FQN `std::net::Ipv4Addr`) to behave similarly to other links in the contents of rustdoc-styled pages. When the user hovers over them, more clearly indicating that they can be used for navigation.

I (and I hope others at least in part) have found the prior design to be somewhat confusing, as it is not clear (upon hovering) that the various parts of the FQN are actually links that the user can navigate to.

<details><summary>📸 Before, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, producing no visual change" src="https://user-images.githubusercontent.com/1566689/86538363-4c827000-bebb-11ea-8291-5ea6b85d7e19.png" />
</details>
<details><summary>📸 After, mouse hovered over "net" in the FQN</summary>
<img alt="A rustdoc page with the mouse hovered over the fully-qualified name in the page header, now with an underline showing up under the word hovered over by the mouse" src="https://user-images.githubusercontent.com/1566689/86538471-d3374d00-bebb-11ea-9bb3-7aa2d7a4800b.png" />
</details>
2020-07-06 17:45:30 -07:00
Manish Goregaokar
7d7b3e637c
Rollup merge of #73974 - CAD97:rc-no-weak, r=dtolnay
Move A|Rc::as_ptr from feature(weak_into_raw) to feature(rc_as_ptr)

These were stabilized alongside the Weak versions, but having `feature = "weak_.."` on a fn definition for the non-weak pointers is potentially very misleading, especially in a review context where the impl header may not be immediately visible.

r? @RalfJung
@bors rollup=always
2020-07-06 17:45:28 -07:00
Manish Goregaokar
62ba1bf1f1
Rollup merge of #73969 - davidtwco:issue-73914-checkedadd-temp-generator-interior, r=matthewjasper
mir: mark mir construction temporaries as internal

Fixes #73914.

This PR marks temporaries from MIR construction as internal such that they are skipped in `sanitize_witness` (where each MIR local is checked to have been contained within the generator interior computed during typeck). This resolves an ICE whereby the construction of checked addition introduced a `(u64, bool)` temporary which was not in the HIR and thus not in the generator interior.

r? @matthewjasper
2020-07-06 17:45:26 -07:00