@@ -47,7 +47,7 @@ pub enum PointerCast {
47
47
/// 1. The simplest cases are where a pointer is not adjusted fat vs thin.
48
48
/// Here the pointer will be dereferenced N times (where a dereference can
49
49
/// 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
51
51
/// `autoderefs`. It can then be auto-referenced zero or one times, indicated
52
52
/// by `autoref`, to either a raw or borrowed pointer. In these cases unsize is
53
53
/// `false`.
@@ -56,7 +56,7 @@ pub enum PointerCast {
56
56
/// with a thin pointer, deref a number of times, unsize the underlying data,
57
57
/// then autoref. The 'unsize' phase may change a fixed length array to a
58
58
/// 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
60
60
/// represented by:
61
61
///
62
62
/// ```
@@ -66,7 +66,7 @@ pub enum PointerCast {
66
66
/// ```
67
67
///
68
68
/// 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]>`
70
70
/// The autoderef and -ref are the same as in the above example, but the type
71
71
/// stored in `unsize` is `Foo<[i32]>`, we don't store any further detail about
72
72
/// the underlying conversions from `[i32; 4]` to `[i32]`.
@@ -75,8 +75,8 @@ pub enum PointerCast {
75
75
/// that case, we have the pointer we need coming in, so there are no
76
76
/// autoderefs, and no autoref. Instead we just do the `Unsize` transformation.
77
77
/// 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]>`.
80
80
#[ derive( Clone , TyEncodable , TyDecodable , HashStable , TypeFoldable ) ]
81
81
pub struct Adjustment < ' tcx > {
82
82
pub kind : Adjust < ' tcx > ,
0 commit comments