Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 19 pull requests #76948

Closed
wants to merge 54 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

jyn514 and others added 30 commits September 16, 2020 13:31
Previously, `x.py` would unconditionally run `x.py build` to get the
help message. After rust-lang#76165,
when checking the CI stage was moved into `Config`, that would cause an
assertion failure (but only only in CI!):

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', src/bootstrap/config.rs:619:49
```

This changes bootstrap to only generate a help message when it needs
to (when someone passes `--help`).
`const_mut_refs` doesn't actually work in a `const` or `static`
Otherwise, we may not have a standard library built for the native "host" target
of the rustc being run.
This isn't an issue for most folks who use x.py dist, which will directly depend
on this. But for x.py build, if we don't properly set target here rustdoc will
not be built.

Currently, there is not a default-on step for generating a rustc for a given
target either, so we will fail to build a rustc as well.
Add a target_override hook that takes priority over builtin targets.
llvm-project takes > 1GB storage space and a long time to download.
It's better to not download it unless needed.
Libc isn't used by alloc.
And std and panic_* use libc from crates.io now,
which isn't feature gated.
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
The Rust version number is currently embedded in bootstrap's source
code, which makes it hard to update it automatically or access it
outside of ./x.py (as you'd have to parse the source code).

This commit moves the version number to a standalone plaintext file,
which makes accessing or updating it trivial.
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
denisvasilik and others added 24 commits September 18, 2020 16:45
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This was missed in PR rust-lang#75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
…ist, r=alexcrichton

Fix cross compiling dist/build invocations

I am uncertain why the first commit is not affecting CI. I suspect it's because we pass --disable-docs on most of our cross-compilation builders. The second commit doesn't affect CI because CI runs x.py dist, not x.py build.

Both commits are standalone; together they should resolve rust-lang#76733. The first commit doesn't really fix that issue but rather just fixes cross-compiled x.py dist, resolving a bug introduced in rust-lang#76549.
Don't generate bootstrap usage unless it's needed

Previously, `x.py` would unconditionally run `x.py build` to get the
help message. After rust-lang#76165,
when checking the CI stage was moved into `Config`, that would cause an
assertion failure (but only only in CI!):

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `2`', src/bootstrap/config.rs:619:49
```

This changes bootstrap to only generate a help message when it needs
to (when someone passes `--help`).

r? @Mark-Simulacrum
This should fix the CI failures in rust-lang#76797 and rust-lang#75991.
…d-api, r=oli-obk

Use const-checking to forbid use of unstable features in const-stable functions

First step towards rust-lang#76618.

Currently this code isn't ever hit because `qualify_min_const_fn` runs first and catches pretty much everything. One exception is `const_precise_live_drops`, which does not use the newly added code since it runs as part of a separate pass.

Also contains some unrelated refactoring, which is split into separate commits.

r? @oli-obk
…=lcnr

use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip)
…=eddyb

Let backends define custom targets

Add a target_override hook that takes priority over builtin targets.
…d-future, r=jyn514

Move to intra doc links in core/src/future

Helps with rust-lang#75080.

@rustbot modify labels: T-doc A-intra-doc-links

r? @jyn514
Use intra docs links in core::{ascii, option, str, pattern, hash::map}

Partial fix for rust-lang#75080

@rustbot modify labels: T-doc A-intra-doc-links

r? @jyn514
Avoiding unnecesary allocations at rustc_errors

Simplify the code avoiding allocations with easy alternative
update Miri

Let's get rust-lang/miri#1540 shipped.
Cc @rust-lang/miri r? @ghost
…ake, r=jyn514

Use intra-doc links in library/core/src/task/wake.rs

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links
…ces, r=Mark-Simulacrum

Don't download/sync llvm-project submodule if download-ci-llvm is set

llvm-project takes > 1GB storage space and a long time to download.
It's better to not download it unless needed.
Remove unused feature gates from library/ crates

Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
support panic=abort in Miri

This is needed for rust-lang/miri#1058 on Windows: we cannot run the inline-assembly versions of `abort`, so fall back to the intrinsic (which Miri supports).
…eddyb

Remove DeclareMethods

Most of the `DeclareMethods` API was only used internally by rustc_codegen_llvm. As such, it makes no sense to require other backends to implement them.

(`get_declared_value` and `declare_cfn` were used, in one place, specific to the `main` symbol, which I've replaced with a more specialized function to allow more flexibility in implementation - the intent is that `declare_c_main` can go away once we do something more clever, e.g. @eddyb has ideas around having a MIR shim or somesuch we can explore in a follow-up PR)
…binary-heap, r=jyn514

Move to intra-doc links in library/alloc/src/collections/binary_heap.rs

Helps with rust-lang#75080.

@rustbot modify labels: T-doc, A-intra-doc-links
…crum

Move the version number to a plaintext file

The Rust version number is currently embedded in bootstrap's source code, which makes it hard to update it automatically or access it outside of ./x.py (as you'd have to parse the source code).

This PR moves the version number to a standalone plaintext file, which makes accessing or updating it trivial.

r? @Mark-Simulacrum
Add allocation information to undefined behaviour errors.

So far I'm looking on information on whether the error messages are suitable.

Fixes rust-lang#53325.
Record `tcx.def_span` instead of `item.span` in crate metadata

This was missed in PR rust-lang#75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-2eulg49 branch September 19, 2020 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.