rust/src
Guillaume Gomez 1fa0c4db4f
Rollup merge of #114059 - fmease:rustdoc-fix-x-crate-impl-sized, r=GuillaumeGomez
rustdoc: fix cross-crate `impl Sized` & `impl ?Sized`

Previously, cross-crate impl-Trait (APIT, RPIT, etc.) that only consists of a single `Sized` bound (modulo outlives-bounds) and ones that are `?Sized` were incorrectly rendered. To give you a taste (before vs. after):

```diff
- fn sized(x: impl ) -> impl
+ fn sized(x: impl Sized) -> impl Sized

- fn sized_outlives<'a>(x: impl 'a) -> impl 'a
+ fn sized_outlives<'a>(x: impl Sized + 'a) -> impl Sized + 'a

- fn maybe_sized(x: &impl ) -> &impl
+ fn maybe_sized(x: &impl ?Sized) -> &impl ?Sized

- fn debug_maybe_sized(x: &impl Debug) -> &impl ?Sized + Debug
+ fn debug_maybe_sized(x: &(impl Debug + ?Sized)) -> &(impl Debug + ?Sized)
```

Moreover, we now surround impl-Trait that has multiple bounds with parentheses if they're the pointee of a reference or raw pointer type. This affects both local and cross-crate docs. The current output isn't correct (rustc would emit the error *ambiguous `+` in a type* if we fed the rendered code back to it).

---

Best reviewed commit by commit :)

`@rustbot` label A-cross-crate-reexports
2023-07-27 16:05:13 +02:00
..
bootstrap Rollup merge of #113996 - inferiorhumanorgans:dragonfly-cmake-system-name, r=ozkanonur 2023-07-26 20:49:13 +02:00
ci CI: fix CMake installation for 32 and 64bit dist Linux 2023-07-25 17:34:32 +02:00
doc Auto merge of #113411 - unikraft:unikraft, r=wesleywiser 2023-07-25 03:41:56 +00:00
etc Improve htmldocck error a bit by providing line where error occurred 2023-07-19 14:34:06 +02:00
librustdoc Rollup merge of #114059 - fmease:rustdoc-fix-x-crate-impl-sized, r=GuillaumeGomez 2023-07-27 16:05:13 +02:00
llvm-project@06248fa7f3 Update LLVM submodule 2023-06-20 00:49:54 +01:00
rustdoc-json-types Verify that ItemEnum can be serialized and then deserialized using bincode 2023-05-22 18:26:20 +01:00
tools Rollup merge of #114032 - tshepang:patch-1, r=GuillaumeGomez 2023-07-27 16:05:12 +02:00
README.md Remove stale reference to the test suite location 2023-01-13 11:49:06 +00:00
stage0.json Bump bootstrap compiler to latest 2023-07-12 21:26:04 -04:00
version Bump version 2023-07-08 10:35:49 -04:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.