When we coerce `dyn Foo` to `dyn Bar`, that is OK as long as `Foo` is
usable in all contexts where `Bar` is usable (hence using the source
must be a subtype of the target).
This is needed for the universe-based code to handle
`old-lub-glb-object`; that test used to work sort of by accident
before with the old code.
Previously, evaluation ignored outlives relationships. Since we using
evaluation to skip the "normal" trait selection (which enforces
outlives relationships) this led to incorrect results in some cases.
When building a distributed compiler on Linux where we use ThinLTO to
create the LLVM shared object this commit switches the compiler to
dynamically linking that LLVM artifact instead of statically linking to
LLVM. The primary goal here is to reduce CI compile times, avoiding two+
ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll
reuse the one ThinLTO step done by LLVM's build itself.
Lots of discussion about this change can be found [here] and down. A
perf run will show whether this is worth it or not!
[here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.
Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la #56491.
Bound sgx target_env with fortanix as target_vendor
This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231)
Signed-off-by: Yu Ding <dingelish@gmail.com>
Improve type mismatch error messages
Closes#56115.
Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.
TODO the book and clippy needs to be changed accordingly later.
r? @varkor
Eliminate Receiver::recv_timeout panic
Fixes#54552.
This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.
Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.
Fix inconsistent Clone documentation.
Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.
refs #57123