Commit graph

298901 commits

Author SHA1 Message Date
Matthias Krüger
2bce1ad86a
Rollup merge of #139562 - notriddle:notriddle/ew-resize, r=GuillaumeGomez
rustdoc: add a handle that makes sidebar resizing more obvious

This aims to make the resizable sidebars more obvious

Preview: <https://notriddle.com/rustdoc-html-demo-12/sidebar-resize-handle/std/index.html>

![image](https://github.com/user-attachments/assets/d4d70982-8045-4fed-818a-982108b0d3b3)

![image](https://github.com/user-attachments/assets/4aaa3663-19f3-4e04-89c6-53db0ddb72ed)

![image](https://github.com/user-attachments/assets/3f612c5b-6be1-4383-801a-067c87425eb9)

This change is based on some discussion on [lolbinarycat's idea], but with a more "traditional" design. Specifically, while very few systems use exactly this design, most of them use [a skeumorph](https://ux.stackexchange.com/questions/80463/what-do-the-3-close-horizontal-bars-not-hamburger-menu-represent-and-what-is-t/80591#80591) of a grip texture:

- This design is similar to the one used in the Rust Playground, and almost identical to UX StackExchange:

  <details><img src="https://github.com/user-attachments/assets/39a6bb69-4895-4fd0-87da-b87913bc7309"></details>

  <details><img src="https://github.com/user-attachments/assets/a41942e1-651b-410b-b855-2aafe8fe54f4"></details>

- In Jira, resizable sidebars have a stack of four dots, but only in one row.

  <details><img src="https://github.com/user-attachments/assets/13047998-02bf-47e6-b796-16f393f870b0"></details>

- In The GIMP, resizable sidebars have a stack of three dots.

  <details><img src="https://github.com/user-attachments/assets/138f5c21-3069-4bbe-b306-0bb9a4bf0318"></details>

- In [old Windows], "panes" are defined to have the same border style as a window, which has a raised appearance. To evoke this, the PR adds a lightweight "shadow" border, darker than the sidebar itself

  <details><img src="https://github.com/user-attachments/assets/301da4b8-6c48-4131-b741-1689af84670a"></details>

- In [NeXT], a drag point usually had an innie, whether the line in a slider or the circle in a scroller; I can also hide and show the favorites bar in Workspace by dragging on a circular "grip spot"

  <details><img src="https://github.com/user-attachments/assets/b13c2d30-a3a8-4672-90fa-58c1fdf19f42"></details>

- In [old Mac], drag handles for things usually had a "grip track" of parallel lines.

  <details><img src="https://github.com/user-attachments/assets/1fbecc67-ffbc-4ed6-a8c5-a9ff085638db"></details>

  *This design is far closer to old Mac than anything else*, though they've put it in the bottom corner instead of the middle.

- [OSX] kept that, but the "Source List" part of the Finder still had the circle grip for a time the same way Workspace did (resulting in an odd mishmash, if you compare the source list sidebar with the other grip tracks embedded in the scrollbars).

  <details><img src="https://github.com/user-attachments/assets/551b8f9d-2dd8-4291-917f-dc88741a2b97"></details>

[lolbinarycat's idea]: https://github.com/rust-lang/rust/pull/139420
[old Windows]: https://archive.org/details/windowsinterface00micr/page/n9/mode/2up
[old Mac]: https://archive.org/details/apple-hig/1996_Human_Interface_Guidelines_for_Mac_OS_8_%28WWDC_Release%29/page/16/mode/2up
[NeXT]: https://archive.org/details/apple-hig/1993%20NeXTSTEP%20User%20Interface%20Guidelines%20-%20Release%203/page/145/mode/2up
[OSX]: https://dn721903.ca.archive.org/0/items/apple-hig/MacOSX_HIG_2005_09_08.pdf#page=267
2025-05-10 16:26:01 +02:00
Matthias Krüger
c6b9253ad5
Rollup merge of #129334 - ChayimFriedman2:more-lazy-methods, r=Amanieu
Implement (part of) ACP 429: add `DerefMut` to `Lazy[Cell/Lock]`

`DerefMut` is instantly stable, as a trait impl. That means this needs an FCP.

``@rustbot`` label +needs-fcp

https://github.com/rust-lang/libs-team/issues/429
2025-05-10 16:26:01 +02:00
bors
b10555674f Auto merge of #140854 - oli-obk:merge-queries, r=nnethercote
Merge typeck loop with static/const item eval loop

r? `@ghost`

Let's try a small one first. Doing this in general has some bad cache coherence issues because the query caches are laid out in `Vec<QueryResult>` lists per query where each index refers to a `DefId` in the same order as we're iterating. Iterating two or more lists at the same time does have cache issues, so I want to poke a bit at it to see if we can't merge just a few of them at a time.
2025-05-10 14:20:43 +00:00
Samuel Tardieu
5262ab2416
Fix unnecessary_unwrap emitted twice in closure (#14763) (#14770)
The problem is that `check_fn` is triggered by both function and
closure, and `visit_expr` can visit expressions in another closures
within a function or closure.

So just skip walking in a inner closure.

changelog: Fix [`unnecessary_unwrap`] emitted twice in closure which
inside in a function or another closure.

Fixes: rust-lang/rust-clippy#14763
2025-05-10 14:15:50 +00:00
Tshepang Mbambo
5a406be039 noise 2025-05-10 13:48:45 +02:00
Tshepang Mbambo
58fa975a15 we are a collective 2025-05-10 13:48:35 +02:00
Tshepang Mbambo
63b3bf99af "cargo fmt" 2025-05-10 13:47:31 +02:00
Tshepang Mbambo
a9d655179f bump edition 2025-05-10 13:47:31 +02:00
Tshepang Mbambo
927343ee47 no point versioning these
They are internal tools.
2025-05-10 13:47:31 +02:00
Tshepang Mbambo
52e4b4a588 add missing word 2025-05-10 13:14:38 +02:00
Tshepang Mbambo
f1d1ebc1e9 last updated a year ago 2025-05-10 13:07:34 +02:00
Tshepang Mbambo
7b9d7fc2d4 sembr 2025-05-10 12:59:37 +02:00
Tshepang Mbambo
5d8e19fd15 reduce clutter when reading source 2025-05-10 12:56:03 +02:00
Mu001999
0de994a368 Warn when #[export_name] is used with generic functions 2025-05-10 18:48:32 +08:00
Tshepang Mbambo
a82a32980e fix broken links 2025-05-10 12:43:59 +02:00
Tshepang Mbambo
eb6749c02e is a question 2025-05-10 12:35:50 +02:00
Tshepang Mbambo
2efa4e6115 sembr 2025-05-10 12:35:40 +02:00
Tshepang Mbambo
9f07c1ef93 make more readable 2025-05-10 12:34:43 +02:00
Tshepang Mbambo
4e684a9977 make more clear what is meant 2025-05-10 12:33:45 +02:00
Tshepang Mbambo
8c6c97d0e2 use the right case 2025-05-10 12:32:59 +02:00
Tshepang Mbambo
c1de624605 link to chapter referred to
This made it look the the topic was covered in the chapter just before
the current one.
2025-05-10 12:21:56 +02:00
bors
7e432c456b Auto merge of #140880 - nnethercote:Ident-new-debug-assert, r=oli-obk
Make the assertion in `Ident::new` debug-only.

This fixes a perf regression introduced in #140252.

r? `@oli-obk`
2025-05-10 10:01:38 +00:00
Tshepang Mbambo
90ec9da857
Merge pull request #2369 from rust-lang/tshepang-patch-1
add rdg push git config entry for git protocol pushers
2025-05-10 10:28:33 +02:00
王宇逸
5fc88de1e2 Update deps of bootstrap for Cygwin 2025-05-10 16:15:44 +08:00
Oli Scherer
cbd4db0b7c
Merge pull request #4318 from rust-lang/rustup-2025-05-10
Automatic Rustup
2025-05-10 07:02:30 +00:00
bors
bfb44c8155 Auto merge of #140705 - LegNeato:backtracelock, r=Mark-Simulacrum
Update `backtrace` in Cargo.lock

Ran `cargo update -p backtrace`. This is needed to forward port the rust-gpu compiler backend.

Subsumes https://github.com/rust-lang/rust/pull/140631. Was supposed to be fixed by https://github.com/rust-lang/rust/pull/140353, but there were test failures and the backtrace update was backed out.
2025-05-10 06:13:41 +00:00
gohome001
0092abd9d7 minor: code review tweak 2025-05-10 13:16:34 +08:00
The Miri Cronjob Bot
a4f765dcad Merge from rustc 2025-05-10 05:01:09 +00:00
The Miri Cronjob Bot
6e5d6473aa Preparing for merge from rustc 2025-05-10 04:53:58 +00:00
bors
c6faa1b22e Auto merge of #140876 - weihanglo:update-cargo, r=weihanglo
Update cargo

25 commits in 7918c7eb59614c39f1c4e27e99d557720976bdd7..056f5f4f3c100cb36b5e9aed2d20b9ea70aae295
2025-04-27 09:44:23 +0000 to 2025-05-09 14:54:18 +0000
- Revert "doc: Mention `XDG_DATA_HOME`" (rust-lang/cargo#15512)
- docs: update version notice for deprecation removal (rust-lang/cargo#15511)
- doc: Update instructions on using native-completions (rust-lang/cargo#15480)
- feat(network): use Retry-After header for HTTP 429 responses (rust-lang/cargo#15463)
- CI: Require schema job to pass (rust-lang/cargo#15504)
- chore(config): migrate renovate config (rust-lang/cargo#15501)
- Make cargo script ignore workspaces (rust-lang/cargo#15496)
- fix(rustc): Don't panic on unknown bins (rust-lang/cargo#15497)
- test: Remove unused nightly requirements (rust-lang/cargo#15498)
- Add support for `-Zembed-metadata` (rust-lang/cargo#15378)
- Fix tracking issue template link (rust-lang/cargo#15494)
- Refactor artifact deps in FeatureResolver::deps (rust-lang/cargo#15492)
- Improved error message for versions prefixed with `v` (rust-lang/cargo#15484)
- chore: fix some typos in comment (rust-lang/cargo#15485)
- fix: default to all targets when using `--edition` and ` --edition-idioms` in cargo fix (rust-lang/cargo#15192)
- Update fingerprint footnote (rust-lang/cargo#15478)
- feat(add): suggest similarly named features (rust-lang/cargo#15438)
- In package-workspace, keep dev-dependencies if they have a version (rust-lang/cargo#15470)
- docs: fix a typo in DependencyUI (rust-lang/cargo#15472)
- fix grammar, and remove confusing example (rust-lang/cargo#15457)
- Added tracing spans for rustc invocations (rust-lang/cargo#15464)
- Trivial tweaks to 'target_short_hash' (rust-lang/cargo#15461)
- chore(deps): update msrv (3 versions) to v1.84 (rust-lang/cargo#15456)
- feat(add/install): check if given crate argument would be valid with inserted @ symbol (rust-lang/cargo#15441)
- chang 1 tries to 1 try (rust-lang/cargo#15328)

r? ghost
2025-05-10 02:59:38 +00:00
Dietrich Daroch
ed799c2019 Split duration_constructors to get non-controversial bits out faster. 2025-05-09 22:52:39 -04:00
antoyo
3cffea7969
Merge pull request #668 from FractalFir/int128_fix
Add a workaround for 128 bit switches
2025-05-09 21:38:16 -04:00
bors
fd9fad6dbc Auto merge of #140869 - matthiaskrgr:rollup-r5k19w6, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #139863 (rustdoc: Replace unstable flag `--doctest-compilation-args` with a simpler one: `--doctest-build-arg`)
 - #140815 (also export metrics from librustdoc)
 - #140819 (Add regression test for 125877)
 - #140843 (Fix `broken-pipe-no-ice` run-make test for rpath-less builds)
 - #140848 (Improved error message for top-level or-patterns)
 - #140852 (Update the edition guide for let chains)
 - #140864 (Last minute relnotes fix)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-09 23:48:54 +00:00
Nicholas Nethercote
4cb9f0309d Make the assertion in Ident::new debug-only.
This fixes a perf regression introduced in #140252.
2025-05-10 09:39:04 +10:00
Laine Taffin Altman
2c5f64d55a
RELEASES.md: fix unbalanced and unneeded } 2025-05-09 16:28:26 -07:00
Laine Taffin Altman
10980be12e
RELEASES.md: fix nonsensical ~ operator
There is no `~` unary prefix operator, and it definitely shouldn't be in the release notes for a feature whose introducing PR doesn't test for it (because it doesn't exist).
2025-05-09 16:26:22 -07:00
relaxcn
e61886a6d9 fix unnecessary_unwrap emitted twice in closure 2025-05-10 07:12:40 +08:00
Alejandra González
3c5e403824
char::is_digit() is const-stable only since Rust 1.87 (#14771)
The `to_digit_is_some()` lint suggests using `char::is_digit()`. It
should not trigger in const contexts before Rust 1.87.

changelog: [`to_digit_is_some`]: Do not lint in const contexts when MSRV
is below 1.87
2025-05-09 23:06:29 +00:00
Nicholas Nethercote
5ebcbfc1e1 Remove AstDeref.
It's a "utility trait to reduce boilerplate" implemented for `P` and
`AstNodeWrapper`, but removing it gives a net reduction of twenty lines
of code. It's also simpler to just implement
`HasNodeId`/`HasAttrs`/`HasTokens` directly on types instead of via
`AstDeref`.

(I decided to make this change when doing some related refactoring and
the error messages involving `AstDeref` and `HasAttrs` were hard to
understand; removing it helped a lot.)
2025-05-10 08:58:47 +10:00
michal kostrubiec
33966ccbb6 Add a workaround for 128 bit switches 2025-05-10 00:34:54 +02:00
Samuel Tardieu
bde939058b
char::is_digit() is const-stable only since Rust 1.87
The `to_digit_is_some()` lint suggests using `char::is_digit()`. It
should not trigger in const contexts before Rust 1.87.
2025-05-10 00:20:55 +02:00
Alex Macleod
e4d82aefd9 Resolve through local re-exports in lookup_path 2025-05-09 22:13:35 +00:00
Weihang Lo
88781bc5f6
Update cargo 2025-05-09 17:33:16 -04:00
mejrs
684b7b70f4 don't depend on rustc_attr_parsing if rustc_data_structures will do 2025-05-09 23:16:55 +02:00
Alejandra González
16fd2a83d7
Fix integer_division false negative for NonZero denominators (#14664)
Close rust-lang/rust-clippy#14652

changelog: [`integer_division`]: fix false negative for NonZero
denominators
2025-05-09 20:50:04 +00:00
Michael Howell
e6e52063df rustdoc: use a different style of grip track 2025-05-09 12:56:38 -07:00
Matthias Krüger
505e78a29c
Rollup merge of #140864 - pietroalbini:pa-fix-relnotes, r=BoxyUwU
Last minute relnotes fix

This PR applies most of the suggestions in https://github.com/rust-lang/rust/pull/140802#discussion_r2080675967 (except for `as_flattened_mut`, which is indeed a const stabilization this cycle), and replaces all links from nightly to stable.

r? `@BoxyUwU`
2025-05-09 21:50:09 +02:00
Matthias Krüger
ab1f382ca8
Rollup merge of #140852 - est31:edition_guide_let_chains, r=ehuss
Update the edition guide for let chains

Pull https://github.com/rust-lang/edition-guide/pull/337 into the rustc tree.
2025-05-09 21:50:09 +02:00
Matthias Krüger
967a29f4c0
Rollup merge of #140848 - kornelski:not-a-dead-end, r=compiler-errors
Improved error message for top-level or-patterns

I was confused by "top-level or-patterns are not allowed in `let` bindings" error, because it sounded like or-patterns were completely unsupported.

This error has an auto-fix suggestion that shows otherwise, but the auto-fix isn't always visible in IDEs.

I've changed the wording to be consistent with "`Fn` bounds require arguments in parentheses", and it doesn't sound like a dead-end any more.
2025-05-09 21:50:08 +02:00
Matthias Krüger
f9003b7d37
Rollup merge of #140843 - jieyouxu:broken-pipe, r=Kobzol
Fix `broken-pipe-no-ice` run-make test for rpath-less builds

The `broken-pipe-no-ice` run-make test currently fails on rpath-less builds, because host compiler runtime libs are not configured for raw std command usages.

This PR is an alternative approach to #140744. However, instead of duplicating `run_make_support::util::set_host_compiler_dylib_path` logic, we instead support "ejecting" the "configured" underlying std `Command` from `bare_rustc()` and `rustdoc()`, where host compiler runtime libs are already set.

cc `@jchecahi`
r? `@Kobzol`
2025-05-09 21:50:07 +02:00