Matthias Krüger
cbf26629c4
Rollup merge of #139913 - fmease:rustdoc-fix-fn-param-handling, r=GuillaumeGomez
...
rustdoc/clean: Fix lowering of fn params (fixes correctness & HIR vs. middle parity regressions)
**(0)** PR #136411 aimed to stop rendering unnamed params of fn ptr types as underscores in the common case (e.g., `fn(_: i32)` → `fn(i32)`) to make the rendered output stylistically more conventional.
**(0.a)** However, since the cleaning fn that the PR modified is also used for lowering the HIR params of foreign fns and required assoc fns in traits, it accidentally butchered the rendering of the latter two:
```rs
pub trait Trait { fn assoc_fn(_: i32); } // as well as (Rust 2015 only): fn assoc_fn(i32);
unsafe extern "C" { pub fn foreign_fn(_: i32); }
// Since 1.86 the fns above gets mis-rendered as:
pub fn assoc_fn(: i32) // <-- BUTCHERED
pub unsafe extern "C" fn foreign_fn(: i32) // <-- BUTCHERED
```
**(0.b)** Furthermore, it broke parity with middle cleaning (which includes inlined cross-crate re-exports) re-regressing parts of #44306 I once fixed in PR #103885 .
**(1)** Lastly, PR #139035 introduced an ICE triggered by the following input file:
```rs
trait Trait { fn anon(()) {} } // internal error: entered unreachable code
```
---
This PR fixes all of these regressions and in the first commit renames several types and fns to be more ~~correct~~ descriptive and legible.
~~It also refactors `Param.name` to be of type `Option<Symbol>` instead `Symbol` (where `None` ~ `kw::Empty`), so rendering mistakes like that can no longer creep in like that (ignoring tests). CC #137978.~~ Independently done in PR #139846 a day prior.
2025-04-18 05:16:31 +02:00
..
2025-04-18 05:16:31 +02:00
2024-07-17 11:01:29 +01:00
2024-07-29 14:34:34 +00:00
2025-03-22 12:47:05 -05:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-09-12 13:47:51 -07:00
2025-04-17 08:55:53 +02:00
2025-02-23 22:24:00 +05:30
2025-04-10 09:56:37 +02:00
2024-06-24 11:08:41 +02:00
2024-09-07 19:02:22 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-22 05:03:54 +01:00
2024-06-24 11:08:41 +02:00
2025-01-06 22:04:16 -05:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-16 19:34:50 +00:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-06-24 11:08:41 +02:00
2025-04-17 08:55:53 +02:00
2024-06-24 11:08:41 +02:00
2025-01-17 22:36:49 +01:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-12-19 10:48:01 -08:00
2024-06-24 11:08:41 +02:00
2025-02-01 15:04:19 -08:00
2025-04-17 08:55:53 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-23 19:15:23 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-12-19 10:48:01 -08:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-04 01:05:31 +00:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-11 14:29:58 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-25 20:31:40 +02:00
2024-06-24 11:08:41 +02:00
2024-11-03 18:59:31 +00:00
2024-06-24 11:08:41 +02:00
2024-11-03 18:59:31 +00:00
2024-06-24 11:08:41 +02:00
2025-02-24 07:53:59 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-04 01:05:31 +00:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-11-13 16:03:57 +01:00
2024-06-04 13:49:39 +02:00
2024-06-24 11:08:41 +02:00
2024-06-04 13:49:39 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-19 14:39:20 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-08-22 20:27:57 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-03-04 01:35:48 +08:00
2025-03-04 01:35:48 +08:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-16 15:53:49 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-23 09:21:39 -07:00
2024-09-23 09:21:39 -07:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-10-23 19:15:23 -04:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-23 19:15:23 -04:00
2025-02-16 19:34:50 +00:00
2025-02-16 19:34:50 +00:00
2024-06-24 11:08:41 +02:00
2025-04-17 08:55:53 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-01 15:04:19 -08:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-11-13 16:56:40 +01:00
2025-01-18 20:29:55 +01:00
2024-11-14 17:01:29 +01:00
2024-07-12 18:14:37 -07:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2025-01-18 20:29:55 +01:00
2025-01-18 20:29:55 +01:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-11-10 13:38:41 -06:00
2024-06-24 11:08:41 +02:00
2024-11-07 14:23:53 -06:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-10 17:56:05 -07:00
2024-07-12 18:14:37 -07:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-05 12:15:15 +02:00
2024-09-05 12:16:59 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2025-03-04 18:04:07 +00:00
2025-03-04 18:04:07 +00:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-08-17 12:33:29 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-17 12:32:31 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-01 15:04:19 -08:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2025-01-17 22:36:49 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-12-12 17:08:36 +01:00
2024-11-25 17:25:25 +01:00
2024-06-24 11:08:41 +02:00
2024-12-17 13:56:10 +11:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-11-18 18:11:50 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-11-13 16:03:57 +01:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2025-02-01 15:04:19 -08:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2025-01-19 11:47:32 +01:00
2025-01-19 11:47:32 +01:00
2024-07-12 18:14:37 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-08-10 15:03:43 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2025-01-18 20:29:55 +01:00
2024-08-05 11:04:51 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-08-05 11:04:51 +02:00
2025-03-27 11:18:43 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-04-10 09:56:37 +02:00
2024-09-10 17:56:06 -07:00
2025-04-10 09:56:37 +02:00
2025-04-10 09:56:37 +02:00
2025-04-10 09:56:37 +02:00
2025-04-10 09:56:37 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-12 13:47:51 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-07-12 18:14:37 -07:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-03-04 01:35:48 +08:00
2025-01-18 20:29:55 +01:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2025-03-04 01:35:48 +08:00
2025-03-04 01:35:48 +08:00
2024-06-24 11:08:41 +02:00
2025-03-04 01:35:48 +08:00
2024-06-24 11:08:41 +02:00
2025-03-04 01:35:48 +08:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-04 01:05:31 +00:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-03-15 18:13:27 +00:00
2024-11-03 18:59:41 +00:00
2024-06-24 11:08:41 +02:00
2025-02-24 07:53:59 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-11 14:29:58 +01:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-10-23 19:15:23 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-02-02 12:36:12 +01:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-08-20 16:51:37 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-18 20:29:55 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-23 19:15:23 -04:00
2024-09-23 09:21:39 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-04-17 02:35:05 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-10-23 19:15:23 -04:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2025-01-30 21:12:50 +01:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-12-31 01:08:43 +00:00
2025-02-16 19:34:50 +00:00
2025-02-27 13:22:46 +00:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-09-10 17:56:05 -07:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00
2024-06-24 11:08:41 +02:00