Don't count pathless --extern for unused-crate-dependencies warnings
`--extern proc_macro` is used to add the proc_macro crate to the extern
prelude for all procmacros. In general pathless `--extern` only references
sysroot/standard libraries and so should be exempt from
unused-crate-dependencies warnings.
r? @petrochenkov
split select into submodules
a0f06d11ae/src/librustc_trait_selection/traits/select.rs (L1)
I extracted two submodules:
- confirmation: apart from `pub(super) fn confirm_candidate`, everything else is private
- candidate_assembly: exports `pub(super) fn candidate_from_obligation` and `pub(super) fn assemble_candidates`
I tried to change as little as possible while doing this and hopefully split this into well reviewable commits.
Make libunwind build hermetic
We want to avoid exporting any symbols from Rust's version of libunwind,
and to do so we need to disable visibility annotations to make sure that
the -fvisibility=hidden has effect, and also hide global new/delete.
This matches the CMake build of libunwind.
WF-check all ty::Const's, not just array lengths.
fixes#68977
This PR removes the special case for array length in `wf::compute` and
checks the well formedness of all consts.
Changes `PredicateKind::WellFormed` to take a `GenericArg` and updates `wf::obligations`.
Add a test to ensure Fuse stays covariant
When #70502 attempted to specialize the data types in `Fuse`, one of the problems we found was that it broke variance. This was also realized when `Fuse` was first added, https://github.com/rust-lang/rust/pull/35656#discussion-diff-74995079, but now this PR adds a test so we don't forget again.
Remote testing fixes
Improvements for remote testing
- Create a `RUST_TEST_TMPDIR` directory on the remote testing host
- Verbose mode for remote-test-server
- Skip tests which don't support remote testing using `// ignore-remote`
To test:
- Build `remote-test-server` for the target machine and copy it over
- On the target:
``` sh
remote-test-server remote
```
- On the build machine
``` sh
export TEST_DEVICE_ADDR="1.2.3.4:12345"
./x.py test
```
RawString error reporting cleanup
I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.
I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.
My original intent was to improve performance, but the only thing I found was to inline some functions in `cursor.rs`. It's effect is barely measurable, though.
There is one open question. Before, the compiler aborts when encountering the `too many '#' symbols` error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.
I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the `format!` macro expansion).
Is that possibility important enough today to worry about it?
Allow tests to use
// ignore-remote
to ignore the test when using remote-test-{client,server}. In most
situations this would be covered by
// ignore-cross-compile
but I see no reason that a non-cross compiled remote test runner
shouldn't work.
Some tests (e.g. ui-fulldeps/create-dir-all-bare.rs) assume that
RUST_TEST_TMPDIR exists on the system running the test. Expand
remote-test-{server,client} such that a tmp directory is created on the
remote runner and this environment variable will point at it.
Make remote-test-client and remote-test-server compatible with windows
`compiletest` and `remote-test-client`:
The command line for `remote-test-client` was changed slightly to allow cross-platform compatible paths. The old way of supplying the support libs was by joining their paths with the executable path
with `:`. This caused Windows-style paths to be split after the directory letter. Now, the number of support libs is provided as a parameter as well, and the support lib paths are split off from the regular args in the client.
`remote-test-server`:
- Marked Unix-only parts as such and implemented Windows alternatives
- On Windows `LD_LIBRARY_PATH` doesn't exist. Libraries are loaded from `PATH` though, so that's the way around it.
- Tiny cleanup: `Command::args`/`envs` instead of manually looping over them
- The temp path for Windows has to be set via environment variable, since there isn't a global temp directory that would work on every machine (as a static string)
Rollup of 10 pull requests
Successful merges:
- #72775 (Return early to avoid ICE)
- #72795 (Add a test for `$:ident` in proc macro input)
- #72822 (remove trivial calls to mk_const)
- #72825 (Clarify errors and warnings about the transition to the new asm!)
- #72827 (changed *nix to Unix-like)
- #72880 (Clean up E0637 explanation)
- #72886 (Remove allow missing_debug_implementations for MaybeUninit)
- #72889 (rustc: Remove the `--passive-segments` LLD flag on wasm)
- #72891 (Add associated consts MIN/MAX for Wrapping<Int>)
- #72893 (test miri-unleash TLS accesses)
Failed merges:
r? @ghost
test miri-unleash TLS accesses
Finally gets rid of `IS_SUPPORTED_IN_MIRI`. :-)
I also added a test for the new `asm!` while I am at it.
r? @ecstatic-morse Cc @rust-lang/wg-const-eval
rustc: Remove the `--passive-segments` LLD flag on wasm
This flag looks like it's been removed in LLVM 10, so this removes rustc
unconditionally passing the flag.