Toolstate publication only runs if the channel is "nightly" and
previously the toolstate builders did not know that the channel was
nightly (since they are not dist builders).
A look through bootstrap seems to indicate that nothing should directly
depend on the channel being set to `-dev` on the test builders, though
this may cause some problems with UI tests (if for some reason they're
dumping the channel into stderr), but we cannot find evidence of such so
hopefully this is fine.
Switch bootstrap to 1.41
This updates the version number for master to 1.42 and switches the bootstrap compiler to yesterday's beta. Fallout of cfg(bootstrap) changes is also dealt with.
`hir::BorrowKind::Raw` borrows and casting a reference to a raw
pointer no longer do a reborrow followed by a cast. Instead we
dereference and take the address.
This operator creates a raw pointer to a Place directly, without first
creating a reference. See RFC #2582 for motivation.
The Rvalue is currently unused.
Revert enabling parallelism by default
We will re-land a similar patch at a future date but for now we should get a nightly
released in a few hours with the parallel patch, so this should be
reverted to make sure that the next nightly is not parallel-enabled.
r? @ghost
This reverts commit 3ed3b8bb7b, reversing
changes made to 99b89533d4.
We will reland a similar patch at a future date but for now we should get a nightly
released in a few hours with the parallel patch, so this should be
reverted to make sure that the next nightly is not parallel-enabled.
These depend on rustc being bug-free and it looks like that's not
currently entirely the case (e.g., we know of at least one bug that
introduces nondeterminism).
This also removes the unused NO_PARALLEL_COMPILER flag; if we want that
functionality we can readd it but this makes sure we really are parallel
everywhere.
This also patches a test that has differing output in the parallel case
(hopefully deterministically so!).
This avoids the problems of high thread counts (i.e., contention in the
kernel on the jobserver pipe due to thundering herd of readers) while
stil giving rustc some parallelism to work with.
PR https://github.com/rust-lang/rust/pull/66512 added the ability to set argv[0] on
Command. As a side effect, it changed the Debug output to print both the program and
argv[0], which in practice results in stuttery output ("echo echo foo").
This PR reverts the behaviour to the the old one, so that the command is only printed
once - unless arg0 has been set. In that case it emits "[command] arg0 arg1 ...".
The WebAssembly targets of rustc have weird issues around name mangling
and import the same name from different modules. This all largely stems
from the fact that we're using literal symbol names in LLVM IR to
represent what a function is called when it's imported, and we're not
using the wasm-specific `wasm-import-name` attribute. This in turn leads
to two issues:
* If, in the same codegen unit, the same FFI symbol is referenced twice
then rustc, when translating to LLVM IR, will only reference one
symbol from the first wasm module referenced.
* There's also a bug in LLD [1] where even if two codegen units
reference different modules, having the same symbol names means that
LLD coalesces the symbols and only refers to one wasm module.
Put another way, all our imported wasm symbols from the environment are
keyed off their LLVM IR symbol name, which has lots of collisions today.
This commit fixes the issue by implementing two changes:
1. All wasm symbols with `#[link(wasm_import_module = "...")]` are
mangled by default in LLVM IR. This means they're all given unique names.
2. Symbols then use the `wasm-import-name` attribute to ensure that the
WebAssembly file uses the correct import name.
When put together this should ensure we don't trip over the LLD bug [1]
and we also codegen IR correctly always referencing the right symbols
with the right import module/name pairs.
Closes#50021Closes#56309Closes#63562
[1]: https://bugs.llvm.org/show_bug.cgi?id=44316
.gitignore: Don't ignore a file that exists in the repository
.gitignore should not ignore files that exist in the repository. The
ignore of .cargo applies to the committed .cargo directory used in an
example:
$ git ls-files --exclude-standard --ignored
src/test/run-make/thumb-none-qemu/example/.cargo/config
Explicitly un-ignore that file.
make transparent enums more ordinary
By recognizing that structs & unions have one variant, we can make the treatment of transparent enums less ad-hoc.
cc https://github.com/rust-lang/rust/issues/60405
r? @davidtwco
Delete flaky test net::tcp::tests::fast_rebind
This test is unreliable for at least 3 users on two platforms: see #57509 and #51006. It was added 5 years ago in #22015. Do we know whether this is testing something important that would indicate a bug in our implementation, or if it's fine to remove?
r? @sfackler @alexcrichton because this somewhat resembles #59018Closes#57509. Closes#51006.
Improve code generated for `starts_with(<literal char>)`
This PR includes two minor improvements to the code generated when checking for string prefix/suffix.
The first commit simplifies the str/str operation, by taking advantage of the raw UTF-8 representation.
The second commit replaces the current str/char matching logic with a char->str encoding and then the previous method.
The resulting code should be equivalent in the generic case (one char is being encoded versus one char being decoded), but it becomes easy to optimize in the case of a literal char, which in most cases a developer might expect to be at least as simple as that of a literal string.
This PR should fix#41993