The `trpl`, `mdbook-trpl-note`, and `mdbook-trpl-listing` crates should
*never* be part of a host workspace: neither in `rust-lang/book` nor in
`rust-lang/rust`. They are always built as independent packages, so they
do not end up depending implicitly on the host’s workspace dependencies.
Accordingly, opt out by setting an empty `[workspace]` key in each of
the packages' `Cargo.toml` files so that they do not have to be
configured in both places they might be used.
Up to this point, the chapter has stuck to `join` and `join3`, as simple
function-based APIs. The `join_all` API is obviously more convenient
than those *if you can use it*, but being able to use it requires having
something which `impl Iterator` of a given type, and therefore demands a
homogeneous type, which motivates introducing `Box::pin`.
That in turn is quite annoying to work with and requires `Output =
<same>` for all the futures in the collection, because of how `join_all`
is typed (Rust does not have the ability to do do variadic types, which
is what would be necessary for `join_all` to work the way we might
want). Thus, we get a motivation for `futures::join!`, which unlike
`join_all` *can* work with heterogeneous types.
This fills out a fair bit of the text here and adds a lot of the listing
support, and outlines what remains to do text-wise.
Remove these from the workspace, because they will need to be used as
path dependencies in `rust-lang/rust`, as part of the build, because the
Rust build pipeline invokes mdBook programmatically rather than via
tools built directly, and we really don’t want to muck with publishing
these to crates.io at present. As a result, they cannot be part of this
workspace, because path dependencies do not get built as a crate within
the hosting workspace. Make sure they do not rely on any features other
than the core `mdbook` library.
At some point we may want to include these in the workspace, but for
now they need to be excluded so `cargo build` and `rust-analyzer` work
correctly with the workspace layout.
Since RFC3052 is fully implemented in Cargo and the various Rust
websites, we can set an example by removing the authors field from all
the listings as it has been effectively soft deprecated.
Follow on/related to #2785, which removed the references in the text.