Commit graph

128836 commits

Author SHA1 Message Date
bors d92d28e523 Auto merge of #77298 - jyn514:bootstrap-config, r=Mark-Simulacrum
Don't warn if the config file is somewhere other than `config.toml`

Previously, `config.config` was always hardcoded as `"config.toml"`.
I thought that it was being overridden with the actual value later, but
it turns out `flags.config` was being completely discarded. This keeps
`config.config` in sync with `flags.config`.

Fixes https://github.com/rust-lang/rust/issues/77293
r? `@Mark-Simulacrum`
cc `@davidtwco`
2020-09-30 15:03:09 +00:00
Hugues de Valon 1aaafac6ff Add support for cmse_nonsecure_entry attribute
This patch adds support for the LLVM cmse_nonsecure_entry attribute.
This is a target-dependent attribute that only has sense for the
thumbv8m Rust targets.
You can find more information about this attribute here:
https://developer.arm.com/documentation/ecm0359818/latest/

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2020-09-30 15:48:59 +01:00
Hugues de Valon d255d70e7a Update LLVM and add Unsupported diagnostic
Secure entry functions do not support if arguments are passed on the
stack. An "unsupported" diagnostic will be emitted by LLVM if that is
the case.
This commits adds support in Rust for that diagnostic so that an error
will be output if that is the case!

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
2020-09-30 14:57:37 +01:00
bors 939cc3e445 Auto merge of #77281 - tmiasko:liveness-everybody, r=oli-obk
Liveness analysis for everybody

Perform liveness analysis for every body instead of limiting it to fns.

Fixes #77169.
2020-09-30 12:44:31 +00:00
Pietro Albini 6e15975540
build-manifest: split the manifest struct definition in a separate file 2020-09-30 14:40:38 +02:00
Pietro Albini d4928ad7fd
build-manifest: keep legacy behavior when invoking through ./x.py dist 2020-09-30 14:29:02 +02:00
Ingvar Stepanyan 494d6e514b
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 paths like `/some/path` was returning `false`on a WASI target, which is obviously not true and undesirable.
2020-09-30 13:12:25 +01:00
Pietro Albini e05e2f9a94
bootstrap: add ./x.py run src/tools/build-manifest 2020-09-30 13:54:12 +02:00
varkor 609786dbd8 Validate rustc_args_required_const 2020-09-30 11:59:44 +01:00
bors 511ed9f235 Auto merge of #77356 - RalfJung:miri, r=RalfJung
update miri

Fixes https://github.com/rust-lang/rust/issues/77310
r? `@ghost` Cc `@rust-lang/miri`
2020-09-30 10:08:28 +00:00
Ralf Jung 19d8eaf444 update miri 2020-09-30 10:49:15 +02:00
Oliver Scherer ce6c25da58 References to ZSTs may be at arbitrary aligned addresses 2020-09-30 10:40:49 +02:00
bors 12f667fac3 Auto merge of #77294 - shepmaster:try-anchors, r=pietroalbini
Use YAML anchors for try builds

r? `@pietroalbini`
2020-09-30 07:57:48 +00:00
Tyson Nottingham d061fee177 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.
2020-09-30 00:57:35 -07:00
bors c0127e4dbf Auto merge of #77292 - lzutao:std_asm, r=Amanieu
Prefer asm! in std - all in sgx module

Similar to the change in #76669 but all `llvm_asm!` is gate in x86/x86_64 target.
Godbolt:
- https://rust.godbolt.org/z/h7nG1h
- https://rust.godbolt.org/z/xx39hW
2020-09-30 05:27:16 +00:00
Dylan MacKenzie 7c6d685551 Rewrite E0019 example
Inline assembly is now the only user of E0019. What is it doing that
E0015 is not?
2020-09-29 21:17:48 -07:00
Dylan MacKenzie 1513904c1c Remove default build_error impl
Now all structured errors must have their own error code
2020-09-29 21:17:48 -07:00
bors 6ac6c67574 Auto merge of #77069 - sexxi-goose:closure_print_2, r=nikomatsakis
pretty.rs: Update Closure and Generator print

More detailed outline: https://github.com/rust-lang/project-rfc-2229/pull/17

Closes: https://github.com/rust-lang/project-rfc-2229/issues/11

r? `@nikomatsakis`
cc `@eddyb` `@davidtwco` `@estebank`
2020-09-30 03:10:47 +00:00
Dylan MacKenzie bed7b29510 Update compile-fail test 2020-09-29 19:45:06 -07:00
samlich 607d30dcfa
Add test for issue #74761 2020-09-30 02:30:14 +00:00
Dylan MacKenzie 287993c961 Remove machinery for halting error output 2020-09-29 19:20:33 -07:00
Dylan MacKenzie 4bbc79c5ae Bless tests 2020-09-29 19:20:33 -07:00
Dylan MacKenzie e02ea835a7 Don't stop const-checking after erroneous trait bound 2020-09-29 19:20:33 -07:00
Dylan MacKenzie 879d3794d3 Bless output 2020-09-29 19:20:33 -07:00
Dylan MacKenzie 37f37dc5ba Emit multiple function pointer errors from const-checker 2020-09-29 19:20:33 -07:00
Dylan MacKenzie 51fbd555f0 Bless tests 2020-09-29 19:20:33 -07:00
Dylan MacKenzie b400871b9c Don't emit duplicate errors for the return place 2020-09-29 19:20:33 -07:00
Dylan MacKenzie 5b3145574e Priority levels 2020-09-29 19:20:33 -07:00
Dylan MacKenzie a23297f5c0 Bless mut tests 2020-09-29 19:20:33 -07:00
Dylan MacKenzie b518ccb4c3 Give MutDeref a real error message 2020-09-29 19:20:33 -07:00
Dylan MacKenzie de35c4293d Remove ops::non_const
This helper function was meant to reduce code duplication between
const-checking pre- and post-drop-elaboration. Most of the functionality
is only relevant for the pre-drop-elaboration pass.
2020-09-29 19:20:33 -07:00
Dylan MacKenzie ce50939952 Fix "unstable in stable" error
The "otherwise" note is printed before the suggestion currently.
2020-09-29 19:20:33 -07:00
Dylan MacKenzie 782a595d7c Return a DiagnosticBuilder from structured errors
This ensures that `emit_error` will actually cause compilation to fail.
2020-09-29 19:20:33 -07:00
Dylan MacKenzie 20e07e7b8e Forbid generator-specific MIR in all const-contexts 2020-09-29 19:20:33 -07:00
Dylan MacKenzie c38aca0502 delay_span_bug if const-checking an async function
This errors during AST lowering. Any errors we emit here are just noise.
2020-09-29 19:20:33 -07:00
Dylan MacKenzie 25c7753eee Continue after impl Trait in const fn 2020-09-29 19:13:11 -07:00
bors 0d9afb6717 Auto merge of #77133 - tmandry:bootstrap-host, r=Mark-Simulacrum
bootstrap: Always build for host, even when target is given

This changes the behavior from *not* building for host whenever an
explicit target is specified. I find this much less confusing.

You can still disable host steps by passing an explicit empty list for
host.

Fixes #76990.

r? `@Mark-Simulacrum`
2020-09-30 00:59:12 +00:00
Dylan MacKenzie 325b7d42ec Continue const-checking after errors when easy
This doesn't change any UI test output
2020-09-29 17:38:28 -07:00
Dylan MacKenzie 4d343a5e59 Useful derives on mir::LocalKind 2020-09-29 17:38:28 -07:00
Tomasz Miąsko 93e3db30e9 liveness: Use Option::None to represent absent live nodes
No functional changes intended.
2020-09-30 00:00:00 +00:00
Eric Huss 15c3573778 Update cargo 2020-09-29 15:55:35 -07:00
Tyler Mandry bf7aeaa617 Filter out empty items in bootstrap:🎏:split 2020-09-29 22:50:57 +00:00
Eric Huss f4d5275cbb Update books 2020-09-29 15:36:08 -07:00
Joshua Nelson 351f850d33 Remove unused --cfg stageN 2020-09-29 18:25:52 -04:00
bors 0d97f7a968 Auto merge of #77289 - TimDiekmann:alloc-ref-by-ref, r=Amanieu
Change `AllocRef::by_ref` to take `&self` instead of `&mut self`

r? `@Amanieu`
2020-09-29 22:13:37 +00:00
Joshua Nelson 6533c29bea Remove --cfg dox from rustdoc.rs
This was added in https://github.com/rust-lang/rust/pull/53076 because
several dependencies were using `cfg(dox)` instead of `cfg(rustdoc)`.
I ran `rg 'cfg\(dox\)'` on the source tree with no matches, so I think
this is now safe to remove.
2020-09-29 18:00:19 -04:00
Tomasz Miąsko 924e8aaaf2 Liveness analysis for everybody
Perform liveness analysis for every body instead of limiting it to fns.
2020-09-29 23:45:31 +02:00
Tyler Mandry 63eaa60294 Use --host='' instead of --host ''
Trying to fix a problem in CI. Maybe some version of Docker is not
passing '' args correctly?
2020-09-29 20:13:52 +00:00
bors 381b445ff5 Auto merge of #77274 - tmiasko:liveness-cnd, r=lcnr
Liveness refactoring continued

* Move body_owner field from IrMaps to Liveness (the only user of the field).
* Use upvars instead of FnKind to check for closures (avoids FnKind, will be useful when checking all bodies, not just fns).
* Use visit_param to add variables corresponding to params.
* Store upvars_mentioned inside Liveness struct.
* Inline visitor implementation for IrMaps, avoiding unnecessary indirection.
* Test interaction with automatically_derived attribute (not covered by any of existing tests).

No functional changes intended.
2020-09-29 19:25:10 +00:00
bors 9b77a6a200 Auto merge of #77145 - pietroalbini:refactor-build-manifest-versions, r=Mark-Simulacrum
Refactor versions detection in build-manifest

This PR refactors how `build-manifest` handles versions, making the following changes:

* `build-manifest` now detects the "package releases" on its own, without relying on rustbuild providing them through CLI arguments. This drastically simplifies calling the tool outside of `x.py`, and will allow to ship the prebuilt tool in a tarball in the future, with the goal of stopping to invoke `x.py` during `promote-release`.
* The `tar` command is not used to extract the version and the git hash from tarballs anymore. The `flate2` and `tar` crates are used instead. This makes detecting those pieces of data way faster, as the archive is decompressed just once and we stop parsing the archive once all the information is retrieved.
* The code to extract the version and the git hash now stores all the collected data dynamically, without requiring to add new fields to the `Builder` struct every time.

I tested the changes locally and it should behave the same as before.

r? `@Mark-Simulacrum`
2020-09-29 16:41:53 +00:00