std::unix::fs::link using direct linkat call for Solaris.
Since we support solaris 11 as minimum, we can get rid of the runtime overhead.
try-job: dist-various-2
Remove some msys2 utils
`dos2unix` should no longer be necessary. I suspect `diffutils` might not be needed either as (I think) only `diff` is used and that seems to be shipped with git bash at least.
try-job: x86_64-msvc
try-job: x86_64-msvc-ext
try-job: dist-x86_64-msvc
Update fuchsia commit, and SDK to 21.20240610.2.1
This includes a fix to the race when publishing multiple packages at the same time.
try-job: x86_64-gnu-integration
change method resolution to constrain hidden types instead of rejecting method candidates
Some of these are in probes and may affect inference. This is therefore a breaking change.
This allows new code to compile on stable:
```rust
trait Trait {}
impl Trait for u32 {}
struct Bar<T>(T);
impl Bar<u32> {
fn foo(self) {}
}
fn foo(x: bool) -> Bar<impl Sized> {
if x {
let x = foo(false);
x.foo();
//^ this used to not find the `foo` method, because while we did equate `x`'s type with possible candidates, we didn't allow opaque type inference while doing so
}
todo!()
}
```
r? ```````@compiler-errors```````
fixes #121404
cc https://github.com/rust-lang/rust/issues/116652
For PGO/coverage tests that don't need to build or run an actual artifact, we
can use `-Zno-profiler-runtime` to run the test even when the profiler runtime
is not available.
Fix wrong `assert_unsafe_precondition` message for `core::ptr::copy`
A small fix in the `assert_unsafe_precondition` message for `core::ptr::copy` as described by https://github.com/rust-lang/rust/issues/126400 .
fixes#126400
const-eval: make lint scope computation consistent
The first commit is some renaming for consistency, but otherwise unrelated. It just didn't feel worth a separate PR, but I can split this up if you prefer.
r? ``@oli-obk``
Tweak output of import suggestions
When both `std::` and `core::` items are available, only suggest the `std::` ones. We ensure that in `no_std` crates we suggest `core::` items.
Ensure that the list of items suggested to be imported are always in the order of local crate items, `std`/`core` items and finally foreign crate items.
Tweak wording of import suggestion: if there are multiple items but they are all of the same kind, we use the kind name and not the generic "items".
Fix#83564.
Add pub struct with allow(dead_code) into worklist
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
Fixes#126289
Fix Miri sysroot for `x run`
Miri no longer (after https://github.com/rust-lang/miri/pull/3411) respects `MIRI_SYSROOT` and wants to be treated like a REAL rustc, with `--sysroot`. \*pats Miri\* sure Miri, just for you :3.
fixes#126233
r? RalfJung (or whoever else feels like it)
[1/2] clean-up / general improvements
This PR applies various clippy suggestions on the tools. I have only applied the ones that make sense and left out trivial changes (e.g., suggestions like 'remove &' are ignored to keep the original commit history for the lines).
I am planning to do the same for the library and compiler, but those will add too many changes to this PR, so I will handle them in a separate PR later.
Clarify `Command::new` behavior for programs with arguments
I mistakenly passed program path along arguments as the same string into `Command::new` a couple of times now. It might be useful to explicitly highlight that `Command::new` intends to accept path to a program, not path to a program plus arguments. Also nudge the user to use `Command::arg` or `Command::args` if they wish to pass arguments.
When both `std::` and `core::` items are available, only suggest the
`std::` ones. We ensure that in `no_std` crates we suggest `core::`
items.
Ensure that the list of items suggested to be imported are always in the
order of local crate items, `std`/`core` items and finally foreign crate
items.
Tweak wording of import suggestion: if there are multiple items but they
are all of the same kind, we use the kind name and not the generic "items".
Fix#83564.
Implement LLVM x86 SSE4.2 intrinsics
SSE4.2 is arguably the least important SIMD extension for the x86 ISA, but it should still be supported for the sake of completeness.
Minor fix: Change wording of epoll_create1 and socketpair's throw_unsup_format
This PR slightly changes the wording and format of ``epoll_create1``'s ``throw_unsup_format`` to match other shims. It is just a minor detail that I couldn't help but want to change while reading it. Sorry if it is not appropriate to open a PR for such minor detail.