require type defaults to be after const generic parameters
From current discussions it seems like the goal here is for type and const parameters to be unordered and allow things like `struct Foo<const N: usize, T = u32>(T)` and `struct Foo<T, const N: usize = 7>` this way.
Note: This means that using `min_const_generics` it will not be possible for an adt to have both type defaults and const parameters.
closes#70471
r? @varkor @eddyb
Remove Linux workarounds for missing CLOEXEC support
Now that #74163 updated the minimum Linux kernel to 2.6.32, we can
assume the availability of APIs that open file descriptors that are
already set to close on exec, including the flags `O_CLOEXEC`,
`SOCK_CLOEXEC`, and `F_DUPFD_CLOEXEC`.
Closes#74519.
Rollup of 9 pull requests
Successful merges:
- #73783 (Detect when `'static` obligation might come from an `impl`)
- #73868 (Advertise correct stable version for const control flow)
- #74460 (rustdoc: Always warn when linking from public to private items)
- #74538 (Guard against non-monomorphized type_id intrinsic call)
- #74541 (Add the aarch64-apple-darwin target )
- #74600 (Enable perf try builder)
- #74618 (Do not ICE on assoc type with bad placeholder)
- #74631 (rustc_target: Add a target spec option for disabling `--eh-frame-hdr`)
- #74643 (build: Remove unnecessary `cargo:rerun-if-env-changed` annotations)
Failed merges:
r? @ghost
build: Remove unnecessary `cargo:rerun-if-env-changed` annotations
... and a couple of related cleanups.
rustc and cargo now track the majority of env var dependencies automatically (https://github.com/rust-lang/cargo/pull/8421), so the annotations are no longer necessary.
Enable perf try builder
This adds a dedicated branch for perf to use for CI, intended to allow perf to
enqueue builds without needing to use bors. bors is great, but bors requires an
open PR to work, and we want to invoke perf on closed PRs sometimes (in
particular, rollups).
Guard against non-monomorphized type_id intrinsic call
This PR checks whether the type is sufficient monomorphized when calling type_id or type_name intrinsics. If the type is not sufficiently monomorphized, e.g. used in a pattern, the code will be rejected.
Fixes#73976
rustdoc: Always warn when linking from public to private items
Change the logic such that linking from a public to a private item always triggers `intra_doc_link_resolution_failure`.
Previously, the warning was not emitted when `--document-private-items` is passed.
This came up during the discussion in https://github.com/rust-lang/rust/pull/74147#discussion_r452597901.
Change the logic such that linking from a public to a private item always
triggers intra_doc_link_resolution_failure. Previously, the warning was
not emitted when --document-private-items is passed.
Also don't rely anymore on the item's visibility, which would falsely trigger
the lint now that the check for --document-private-items is gone.
Disable polymorphisation
Fixes#74614.
This PR disables polymorphisation to fix the regression in #74614 after investigation into the issue makes it clear that the fix won't be trivial. ~~I'll file an issue shortly to replace #74614 with the findings so far.~~ #74636 has been filed to track the fix of the underlying regression.
r? @eddyb
Apply #66379 to `*mut T` `as_ref`
#66379 changed the documentation of `as_ref` on the type `*const T` and `as_mut` on the type `*mut T`, but it missed making that same change for `as_ref` on the type `*mut T`.
refactor and reword intra-doc link errors
This commit refactors intra-doc link error reporting to deduplicate code
and decouple error construction from the type of error. This greatly
improves flexibility at each error construction site, while reducing the
complexity of the diagnostic creation.
This commit also rewords the diagnostics for clarity and style:
- Diagnostics should not end in periods.
- It's unnecessary to say "ignoring it". Since this is a warning by
default, it's already clear that the link is ignored.
Stabilize control-flow-guard codegen option
This is the stabilization PR discussed in #68793. It converts the `-Z control-flow-guard` debugging option into a codegen option (`-C control-flow-guard`), and changes the associated tests.