Skip to content

Commit aa8c37d

Browse files
Rollup merge of #85650 - scottmcm:adjust-adjustment-docs, r=jyn514
Add some backticks to the `rustc_middle::ty::adjustment::Adjustment` docs A few `[i32]`s are getting picked up as intra-doc links, rather than showing as slices, making the sentence quite confusing. See https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/adjustment/struct.Adjustment.html
2 parents 4661559 + bc2c3dc commit aa8c37d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_middle/src/ty/adjustment.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub enum PointerCast {
4747
/// 1. The simplest cases are where a pointer is not adjusted fat vs thin.
4848
/// Here the pointer will be dereferenced N times (where a dereference can
4949
/// happen to raw or borrowed pointers or any smart pointer which implements
50-
/// Deref, including Box<_>). The types of dereferences is given by
50+
/// `Deref`, including `Box<_>`). The types of dereferences is given by
5151
/// `autoderefs`. It can then be auto-referenced zero or one times, indicated
5252
/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is
5353
/// `false`.
@@ -56,7 +56,7 @@ pub enum PointerCast {
5656
/// with a thin pointer, deref a number of times, unsize the underlying data,
5757
/// then autoref. The 'unsize' phase may change a fixed length array to a
5858
/// dynamically sized one, a concrete object to a trait object, or statically
59-
/// sized struct to a dynamically sized one. E.g., &[i32; 4] -> &[i32] is
59+
/// sized struct to a dynamically sized one. E.g., `&[i32; 4]` -> `&[i32]` is
6060
/// represented by:
6161
///
6262
/// ```
@@ -66,7 +66,7 @@ pub enum PointerCast {
6666
/// ```
6767
///
6868
/// Note that for a struct, the 'deep' unsizing of the struct is not recorded.
69-
/// E.g., `struct Foo<T> { x: T }` we can coerce &Foo<[i32; 4]> to &Foo<[i32]>
69+
/// E.g., `struct Foo<T> { x: T }` we can coerce `&Foo<[i32; 4]>` to `&Foo<[i32]>`
7070
/// The autoderef and -ref are the same as in the above example, but the type
7171
/// stored in `unsize` is `Foo<[i32]>`, we don't store any further detail about
7272
/// the underlying conversions from `[i32; 4]` to `[i32]`.
@@ -75,8 +75,8 @@ pub enum PointerCast {
7575
/// that case, we have the pointer we need coming in, so there are no
7676
/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation.
7777
/// At some point, of course, `Box` should move out of the compiler, in which
78-
/// case this is analogous to transforming a struct. E.g., Box<[i32; 4]> ->
79-
/// Box<[i32]> is an `Adjust::Unsize` with the target `Box<[i32]>`.
78+
/// case this is analogous to transforming a struct. E.g., `Box<[i32; 4]>` ->
79+
/// `Box<[i32]>` is an `Adjust::Unsize` with the target `Box<[i32]>`.
8080
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable)]
8181
pub struct Adjustment<'tcx> {
8282
pub kind: Adjust<'tcx>,

0 commit comments

Comments
 (0)