further split up const_fn feature flag
This continues the work on splitting up `const_fn` into separate feature flags:
* `const_fn_trait_bound` for `const fn` with trait bounds
* `const_fn_unsize` for unsizing coercions in `const fn` (looks like only `dyn` unsizing is still guarded here)
I don't know if there are even any things left that `const_fn` guards... at least libcore and liballoc do not need it any more.
`@oli-obk` are you currently able to do reviews?
Revert "rustdoc: Hide `#text` in doc-tests"
See discussion in #84502 - I'm worried that #84445 may cause a lot of breakages if this were to hit stable, so I think it's safer to revert and work on the known correct fix#84478.
Rollup of 8 pull requests
Successful merges:
- #83519 (Implement a lint that highlights all moves larger than a configured limit)
- #84105 (stabilize `core::array::{from_ref,from_mut}` in `1.53.0`)
- #84179 (Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`)
- #84427 (Update Clippy)
- #84459 (rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`)
- #84460 (rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module)
- #84464 (rustdoc: Get rid of `clean::TypeKind`)
- #84518 (Clean up DOM strings)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
rustdoc: Remove unnecessary `is_crate` field from doctree::Module and clean::Module
It can be calculated on-demand even without a TyCtxt.
This also changed `json::conversions::from_item_kind` to take a whole item, which avoids
having to add more and more parameters.
Helps with https://github.com/rust-lang/rust/issues/76382.
r? ```@camelid```
rustdoc: Turn `JsonRenderer::mod_item_in` into `unreachable!()`
The JSON renderer no longer gets called on modules (since https://github.com/rust-lang/rust/pull/83055).
r? ``@aDotInTheVoid``
Explicitly implement `!Send` and `!Sync` for `sys::{Args, Env}`
Remove the field `_dont_send_or_sync_me: PhantomData<*mut ()>` in favor of an explicit implementation of `!Send` and `!Sync`.
Implement a lint that highlights all moves larger than a configured limit
Tracking issue: #83518
[MCP 420](https://github.com/rust-lang/compiler-team/issues/420) still ~blazing~ in progress
r? ```@pnkfelix```
The main open issue I see with this minimal impl of the feature is that the lint is immediately "stable" (so it can be named on stable), even if it is never executed on stable. I don't think we have the concept of unstable lint names or hiding lint names without an active feature gate, so that would be a bigger change.
Rollup of 10 pull requests
Successful merges:
- #83990 (implement `TrustedRandomAccess` for `Take` iterator adapter)
- #84250 (bootstrap: use bash on illumos to run install scripts)
- #84320 (Use details tag for trait implementors.)
- #84436 (Make a few functions private)
- #84453 (Document From implementations for Waker and RawWaker)
- #84458 (Remove unnecessary fields and parameters in rustdoc)
- #84485 (Add some associated type bounds tests)
- #84489 (Mention FusedIterator case in Iterator::fuse doc)
- #84492 (rustdoc: Remove unnecessary dummy span)
- #84496 (Add some specialization tests)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Mention FusedIterator case in Iterator::fuse doc
Using `fuse` on an iterator that incorrectly implements
`FusedIterator` does not fuse the iterator. This commit adds a
note about this in the documentation of this method to increase
awareness about this potential issue (esp. when relying on fuse
in unsafe code).
Closes#83969
Make a few functions private
These were made public in 3105bcfdc1. This
is so long ago I doubt anyone remembers why they're public. No one outside rustc_session uses
them, including in-tree tools.
Use details tag for trait implementors.
Part of #83332 and following on from #83337 and #83355.
This removes one category of JS-generated toggles (implementors), and replaces them with a `<details>` tag. This simplifies the JS, and fixes some bugs where things that were supposed to be hidden by the toggle were not hidden. Compare https://hoffman-andrews.com/rust/details-implementors/std/io/trait.Read.html#impl-Read vs https://doc.rust-lang.org/nightly/std/io/trait.Read.html#implementors.
This introduces a `left: -23px` to put the toggle in the correct place, matching the current style for `.collapse-toggle`.
It's worth noting this introduces a slight behavior change: since the entire line is now a `<summary>`, any part of the line is clickable. So for instance, in `impl Read for File`, clicking `impl` or `for` will collapse / expand the docs. Clicking `Read` or `File` still links to the appropriate documentation as before.
bootstrap: use bash on illumos to run install scripts
The default illumos shell ("sh" in the default PATH) is ksh93, rather
than bash, and does not support constructs like "local" that came from
bash. The bootstrap function for invoking "install.sh" scripts should
use "bash" explicitly there to avoid issues.
implement `TrustedRandomAccess` for `Take` iterator adapter
`TrustedRandomAccess` requires the iterator length to fit within `usize`. `take(n)` only constrains the upper bound of an iterator. So if the inner is `TrustedRandomAccess` (which already implies a finite length) then so can be `Take`.
```````@rustbot``````` label T-libs-impl
On stable, suggest removing `#![feature]` for features that have been stabilized
I don't know how to test this (https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Run.20tests.20without.20enabling.20nightly.20features.3F). I confirmed locally that this gives the
appropriate help with `channel = "beta"`:
```
error[E0554]: `#![feature]` may not be used on the beta release channel
--> src/lib.rs:2:1
|
2 | #![feature(min_const_generics)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attribute
|
= help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable
error[E0554]: `#![feature]` may not be used on the beta release channel
--> src/lib.rs:3:1
|
3 | #![feature(min_const_generics, min_specialization)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable
error[E0554]: `#![feature]` may not be used on the beta release channel
--> src/lib.rs:4:1
|
4 | #![feature(box_patterns)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
```
Closes https://github.com/rust-lang/rust/issues/83715.
It can be calculated on-demand even without a TyCtxt.
This also changed `from_item_kind` to take a whole item, which avoids
having to add more and more parameters.
Fix ICE if original_span(fn_sig) returns a span not in body sourcefile
Fixes: #84421
r? ````@tmandry````
fyi: ````@wesleywiser```` ````@sdroege```` ````@rajivshah3````
doc/platform-support: clarify UEFI support
Add missing information on what standard-library features are supported by the UEFI targets.
All current UEFI targets (which is i686 and x86_64) only support no_std cross-compilations. `std` support has not been worked on and is unlikely to emerge anytime soon, due to the much restricted environment that UEFI provides.
Move `sys_common::poison` to `sync::poison`
`sys_common` should not contain publicly exported types, only platform-independent abstractions on top of `sys`, which `sys_common::poison` is not. There is thus no reason for the module to not live under `sync`.
Part of #84187.
Clean up .gitignore
Categorizes entries in the `.gitignore` file.
Other changes:
- added `desktop.ini` (Windows equivalent of `.DS_Store`)
- removed `.hg/` and `.hgignore`
rustdoc: Convert sub-variant toggle to HTML
Instead of creating a JS toggle, this injects details/summary for
sub-variants of enums. This also fixes the CSS so that the toggle button
does not jump when expanding/collapsing.
Takes inspiration from #83337 and should be considered part of #83332. Not quite sure if the `.sub-variant` selectors could be further simplified? AFAICS it is only used in that place, and that does not seem to allow any recursion.