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.
Add regression test for `string_lit_as_bytes` issue
Closes#5619
Before the fix in https://github.com/rust-lang/rust/pull/72637, `string_lit_as_bytes` was incorrectly triggering on the `env!` macro. With the fix merged, this test makes sure that the lint is not triggering anymore.
changelog: none
Give corrected code
This PR adds corrected code for doc examples.
I did this in several commits to facilitate review.
Don't hesitate to tell me if I forgot some.
Also, sometimes I felt it was not necessary to give corrected code, but I maybe wrong.
fixes: #4829
changelog: Improve documentation examples across multiple lints.
New lint: iter_next_slice
Hello, this is a work-in-progress PR for issue: https://github.com/rust-lang/rust-clippy/issues/5572
I have implemented lint to replace `iter().next()` for `slice[index..]` and `array` with `get(index)` and `get(0)` respectively. However since I made a lot of changes, I would like to request some feedback before continuing so that I could fix mistakes.
Thank you!
---
changelog: implement `iter_next_slice` lint and test, and modify `needless_continues`, `for_loop_over_options_result` UI tests since they have `iter().next()`
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.
`--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.
Add regression test for endless loop / update `pulldown_cmark`
Closes#4917
This was fixed in pulldown_cmark 0.7.1, specifically raphlinus/pulldown-cmark#438
changelog: none