Skip to content

Commit c2f8071

Browse files
committed
Use wide pointers consistenly across the compiler
1 parent f7c8928 commit c2f8071

File tree

36 files changed

+92
-92
lines changed

36 files changed

+92
-92
lines changed

compiler/rustc_codegen_cranelift/example/std_example.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ fn main() {
168168

169169
foo(I64X2([0, 0]));
170170

171-
transmute_fat_pointer();
171+
transmute_wide_pointer();
172172

173173
rust_call_abi();
174174

@@ -192,7 +192,7 @@ type TwoPtrs = i64;
192192
#[cfg(target_pointer_width = "64")]
193193
type TwoPtrs = i128;
194194

195-
fn transmute_fat_pointer() -> TwoPtrs {
195+
fn transmute_wide_pointer() -> TwoPtrs {
196196
unsafe { transmute::<_, TwoPtrs>("true !") }
197197
}
198198

compiler/rustc_codegen_cranelift/src/debuginfo/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl DebugContext {
139139

140140
pointer_type_id
141141
} else {
142-
// FIXME implement debuginfo for fat pointers
142+
// FIXME implement debuginfo for wide pointers
143143
self.placeholder_for_type(tcx, type_dbg, ptr_type)
144144
}
145145
}

compiler/rustc_codegen_gcc/src/intrinsic/simd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
478478
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
479479
bx.tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), ty)
480480
});
481-
require!(metadata.is_unit(), InvalidMonomorphization::CastFatPointer {
481+
require!(metadata.is_unit(), InvalidMonomorphization::CastWidePointer {
482482
span,
483483
name,
484484
ty: in_elem
@@ -493,7 +493,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
493493
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
494494
bx.tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), ty)
495495
});
496-
require!(metadata.is_unit(), InvalidMonomorphization::CastFatPointer {
496+
require!(metadata.is_unit(), InvalidMonomorphization::CastWidePointer {
497497
span,
498498
name,
499499
ty: out_elem

compiler/rustc_codegen_gcc/src/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
207207
// layout.
208208
if let Abi::Scalar(ref scalar) = self.abi {
209209
// Use a different cache for scalars because pointers to DSTs
210-
// can be either fat or thin (data pointers of fat pointers).
210+
// can be either fat or thin (data pointers of wide pointers).
211211
if let Some(&ty) = cx.scalar_types.borrow().get(&self.ty) {
212212
return ty;
213213
}

compiler/rustc_codegen_llvm/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
77
use rustc_codegen_ssa::traits::*;
88
use rustc_middle::ty::Ty;
99
use rustc_middle::ty::layout::LayoutOf;
10-
pub(crate) use rustc_middle::ty::layout::{FAT_PTR_ADDR, FAT_PTR_EXTRA};
10+
pub(crate) use rustc_middle::ty::layout::{WIDE_PTR_ADDR, WIDE_PTR_EXTRA};
1111
use rustc_middle::{bug, ty};
1212
use rustc_session::config;
1313
pub(crate) use rustc_target::abi::call::*;

compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use super::utils::{
3434
};
3535
use crate::common::CodegenCx;
3636
use crate::debuginfo::metadata::type_map::build_type_with_children;
37-
use crate::debuginfo::utils::{FatPtrKind, fat_pointer_kind};
37+
use crate::debuginfo::utils::{WidePtrKind, wide_pointer_kind};
3838
use crate::llvm::debuginfo::{
3939
DIDescriptor, DIFile, DIFlags, DILexicalBlock, DIScope, DIType, DebugEmissionKind,
4040
DebugNameTableKind,
@@ -174,7 +174,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
174174
let data_layout = &cx.tcx.data_layout;
175175
let ptr_type_debuginfo_name = compute_debuginfo_type_name(cx.tcx, ptr_type, true);
176176

177-
match fat_pointer_kind(cx, pointee_type) {
177+
match wide_pointer_kind(cx, pointee_type) {
178178
None => {
179179
// This is a thin pointer. Create a regular pointer type and give it the correct name.
180180
assert_eq!(
@@ -197,7 +197,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
197197

198198
DINodeCreationResult { di_node, already_stored_in_typemap: false }
199199
}
200-
Some(fat_pointer_kind) => {
200+
Some(wide_pointer_kind) => {
201201
type_map::build_type_with_children(
202202
cx,
203203
type_map::stub(
@@ -210,7 +210,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
210210
DIFlags::FlagZero,
211211
),
212212
|cx, owner| {
213-
// FIXME: If this fat pointer is a `Box` then we don't want to use its
213+
// FIXME: If this wide pointer is a `Box` then we don't want to use its
214214
// type layout and instead use the layout of the raw pointer inside
215215
// of it.
216216
// The proper way to handle this is to not treat Box as a pointer
@@ -227,16 +227,16 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
227227
};
228228

229229
let layout = cx.layout_of(layout_type);
230-
let addr_field = layout.field(cx, abi::FAT_PTR_ADDR);
231-
let extra_field = layout.field(cx, abi::FAT_PTR_EXTRA);
230+
let addr_field = layout.field(cx, abi::WIDE_PTR_ADDR);
231+
let extra_field = layout.field(cx, abi::WIDE_PTR_EXTRA);
232232

233-
let (addr_field_name, extra_field_name) = match fat_pointer_kind {
234-
FatPtrKind::Dyn => ("pointer", "vtable"),
235-
FatPtrKind::Slice => ("data_ptr", "length"),
233+
let (addr_field_name, extra_field_name) = match wide_pointer_kind {
234+
WidePtrKind::Dyn => ("pointer", "vtable"),
235+
WidePtrKind::Slice => ("data_ptr", "length"),
236236
};
237237

238-
assert_eq!(abi::FAT_PTR_ADDR, 0);
239-
assert_eq!(abi::FAT_PTR_EXTRA, 1);
238+
assert_eq!(abi::WIDE_PTR_ADDR, 0);
239+
assert_eq!(abi::WIDE_PTR_EXTRA, 1);
240240

241241
// The data pointer type is a regular, thin pointer, regardless of whether this
242242
// is a slice or a trait object.
@@ -258,7 +258,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
258258
owner,
259259
addr_field_name,
260260
(addr_field.size, addr_field.align.abi),
261-
layout.fields.offset(abi::FAT_PTR_ADDR),
261+
layout.fields.offset(abi::WIDE_PTR_ADDR),
262262
DIFlags::FlagZero,
263263
data_ptr_type_di_node,
264264
),
@@ -267,7 +267,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
267267
owner,
268268
extra_field_name,
269269
(extra_field.size, extra_field.align.abi),
270-
layout.fields.offset(abi::FAT_PTR_EXTRA),
270+
layout.fields.offset(abi::WIDE_PTR_EXTRA),
271271
DIFlags::FlagZero,
272272
type_di_node(cx, extra_field.ty),
273273
),

compiler/rustc_codegen_llvm/src/debuginfo/utils.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ pub(crate) fn get_namespace_for_item<'ll>(cx: &CodegenCx<'ll, '_>, def_id: DefId
4949
}
5050

5151
#[derive(Debug, PartialEq, Eq)]
52-
pub(crate) enum FatPtrKind {
52+
pub(crate) enum WidePtrKind {
5353
Slice,
5454
Dyn,
5555
}
5656

5757
/// Determines if `pointee_ty` is slice-like or trait-object-like, i.e.
58-
/// if the second field of the fat pointer is a length or a vtable-pointer.
59-
/// If `pointee_ty` does not require a fat pointer (because it is Sized) then
58+
/// if the second field of the wide pointer is a length or a vtable-pointer.
59+
/// If `pointee_ty` does not require a wide pointer (because it is Sized) then
6060
/// the function returns `None`.
61-
pub(crate) fn fat_pointer_kind<'ll, 'tcx>(
61+
pub(crate) fn wide_pointer_kind<'ll, 'tcx>(
6262
cx: &CodegenCx<'ll, 'tcx>,
6363
pointee_ty: Ty<'tcx>,
64-
) -> Option<FatPtrKind> {
64+
) -> Option<WidePtrKind> {
6565
let pointee_tail_ty = cx.tcx.struct_tail_for_codegen(pointee_ty, cx.param_env());
6666
let layout = cx.layout_of(pointee_tail_ty);
6767
trace!(
68-
"fat_pointer_kind: {:?} has layout {:?} (is_unsized? {})",
68+
"wide_pointer_kind: {:?} has layout {:?} (is_unsized? {})",
6969
pointee_tail_ty,
7070
layout,
7171
layout.is_unsized()
@@ -76,8 +76,8 @@ pub(crate) fn fat_pointer_kind<'ll, 'tcx>(
7676
}
7777

7878
match *pointee_tail_ty.kind() {
79-
ty::Str | ty::Slice(_) => Some(FatPtrKind::Slice),
80-
ty::Dynamic(..) => Some(FatPtrKind::Dyn),
79+
ty::Str | ty::Slice(_) => Some(WidePtrKind::Slice),
80+
ty::Dynamic(..) => Some(WidePtrKind::Dyn),
8181
ty::Foreign(_) => {
8282
// Assert that pointers to foreign types really are thin:
8383
assert_eq!(
@@ -90,7 +90,7 @@ pub(crate) fn fat_pointer_kind<'ll, 'tcx>(
9090
// For all other pointee types we should already have returned None
9191
// at the beginning of the function.
9292
panic!(
93-
"fat_pointer_kind() - Encountered unexpected `pointee_tail_ty`: {pointee_tail_ty:?}"
93+
"wide_pointer_kind() - Encountered unexpected `pointee_tail_ty`: {pointee_tail_ty:?}"
9494
)
9595
}
9696
}

compiler/rustc_codegen_llvm/src/intrinsic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2185,7 +2185,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
21852185
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
21862186
bx.tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), ty)
21872187
});
2188-
require!(metadata.is_unit(), InvalidMonomorphization::CastFatPointer {
2188+
require!(metadata.is_unit(), InvalidMonomorphization::CastWidePointer {
21892189
span,
21902190
name,
21912191
ty: in_elem
@@ -2200,7 +2200,7 @@ fn generic_simd_intrinsic<'ll, 'tcx>(
22002200
let metadata = p_ty.ptr_metadata_ty(bx.tcx, |ty| {
22012201
bx.tcx.normalize_erasing_regions(ty::ParamEnv::reveal_all(), ty)
22022202
});
2203-
require!(metadata.is_unit(), InvalidMonomorphization::CastFatPointer {
2203+
require!(metadata.is_unit(), InvalidMonomorphization::CastWidePointer {
22042204
span,
22052205
name,
22062206
ty: out_elem

compiler/rustc_codegen_llvm/src/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyAndLayout<'tcx> {
199199
// layout.
200200
if let Abi::Scalar(scalar) = self.abi {
201201
// Use a different cache for scalars because pointers to DSTs
202-
// can be either fat or thin (data pointers of fat pointers).
202+
// can be either fat or thin (data pointers of wide pointers).
203203
if let Some(&llty) = cx.scalar_lltypes.borrow().get(&self.ty) {
204204
return llty;
205205
}

compiler/rustc_codegen_ssa/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ codegen_ssa_invalid_monomorphization_basic_integer_type = invalid monomorphizati
8282
8383
codegen_ssa_invalid_monomorphization_cannot_return = invalid monomorphization of `{$name}` intrinsic: cannot return `{$ret_ty}`, expected `u{$expected_int_bits}` or `[u8; {$expected_bytes}]`
8484
85-
codegen_ssa_invalid_monomorphization_cast_fat_pointer = invalid monomorphization of `{$name}` intrinsic: cannot cast fat pointer `{$ty}`
85+
codegen_ssa_invalid_monomorphization_cast_wide_pointer = invalid monomorphization of `{$name}` intrinsic: cannot cast wide pointer `{$ty}`
8686
8787
codegen_ssa_invalid_monomorphization_expected_element_type = invalid monomorphization of `{$name}` intrinsic: expected element type `{$expected_element}` of second argument `{$second_arg}` to be a pointer to the element type `{$in_elem}` of the first argument `{$in_ty}`, found `{$expected_element}` != `{$mutability} {$in_elem}`
8888

compiler/rustc_codegen_ssa/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,8 @@ pub enum InvalidMonomorphization<'tcx> {
916916
ret_ty: Ty<'tcx>,
917917
},
918918

919-
#[diag(codegen_ssa_invalid_monomorphization_cast_fat_pointer, code = E0511)]
920-
CastFatPointer {
919+
#[diag(codegen_ssa_invalid_monomorphization_cast_wide_pointer, code = E0511)]
920+
CastWidePointer {
921921
#[primary_span]
922922
span: Span,
923923
name: Symbol,

compiler/rustc_codegen_ssa/src/mir/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
133133
enum LocalRef<'tcx, V> {
134134
Place(PlaceRef<'tcx, V>),
135135
/// `UnsizedPlace(p)`: `p` itself is a thin pointer (indirect place).
136-
/// `*p` is the fat pointer that references the actual unsized place.
136+
/// `*p` is the wide pointer that references the actual unsized place.
137137
/// Every time it is initialized, we have to reallocate the place
138-
/// and update the fat pointer. That's the reason why it is indirect.
138+
/// and update the wide pointer. That's the reason why it is indirect.
139139
UnsizedPlace(PlaceRef<'tcx, V>),
140140
/// The backend [`OperandValue`] has already been generated.
141141
Operand(OperandRef<'tcx, V>),
@@ -429,7 +429,7 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
429429
// Unsized indirect qrguments
430430
PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } => {
431431
// As the storage for the indirect argument lives during
432-
// the whole function call, we just copy the fat pointer.
432+
// the whole function call, we just copy the wide pointer.
433433
let llarg = bx.get_param(llarg_idx);
434434
llarg_idx += 1;
435435
let llextra = bx.get_param(llarg_idx);

compiler/rustc_codegen_ssa/src/mir/operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum OperandValue<V> {
4141
/// The backend value in this variant must be the *immediate* backend type,
4242
/// as returned by [`LayoutTypeCodegenMethods::immediate_backend_type`].
4343
Immediate(V),
44-
/// A pair of immediate LLVM values. Used by fat pointers too.
44+
/// A pair of immediate LLVM values. Used by wide pointers too.
4545
///
4646
/// An `OperandValue` *must* be this variant for any type for which
4747
/// [`LayoutTypeCodegenMethods::is_backend_scalar_pair`] returns `true`.

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
3838
ref source,
3939
_,
4040
) => {
41-
// The destination necessarily contains a fat pointer, so if
42-
// it's a scalar pair, it's a fat pointer or newtype thereof.
41+
// The destination necessarily contains a wide pointer, so if
42+
// it's a scalar pair, it's a wide pointer or newtype thereof.
4343
if bx.cx().is_backend_scalar_pair(dest.layout) {
44-
// Into-coerce of a thin pointer to a fat pointer -- just
44+
// Into-coerce of a thin pointer to a wide pointer -- just
4545
// use the operand path.
4646
let temp = self.codegen_rvalue_operand(bx, rvalue);
4747
temp.val.store(bx, dest);

compiler/rustc_const_eval/src/interpret/cast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
206206
assert!(cast_to.ty.is_unsafe_ptr());
207207
// Handle casting any ptr to raw ptr (might be a fat ptr).
208208
if cast_to.size == src.layout.size {
209-
// Thin or fat pointer that just has the ptr kind of target type changed.
209+
// Thin or wide pointer that just has the ptr kind of target type changed.
210210
return interp_ok(ImmTy::from_immediate(**src, cast_to));
211211
} else {
212212
// Casting the metadata away from a fat ptr.

compiler/rustc_error_codes/src/error_codes/E0607.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A cast between a thin and a fat pointer was attempted.
1+
A cast between a thin and a wide pointer was attempted.
22

33
Erroneous code example:
44

@@ -7,18 +7,18 @@ let v = core::ptr::null::<u8>();
77
v as *const [u8];
88
```
99

10-
First: what are thin and fat pointers?
10+
First: what are thin and wide pointers?
1111

1212
Thin pointers are "simple" pointers: they are purely a reference to a memory
1313
address.
1414

15-
Fat pointers are pointers referencing Dynamically Sized Types (also called
15+
Wide pointers are pointers referencing Dynamically Sized Types (also called
1616
DSTs). DSTs don't have a statically known size, therefore they can only exist
1717
behind some kind of pointer that contains additional information. For example,
1818
slices and trait objects are DSTs. In the case of slices, the additional
19-
information the fat pointer holds is their size.
19+
information the wide pointer holds is their size.
2020

21-
To fix this error, don't try to cast directly between thin and fat pointers.
21+
To fix this error, don't try to cast directly between thin and wide pointers.
2222

2323
For more information about type casts, take a look at the section of the
2424
[The Rust Reference][1] on type cast expressions.

compiler/rustc_hir_analysis/src/coherence/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub(crate) fn coerce_unsized_info<'tcx>(
424424
// Here `U = [i32; 3]` and `V = [i32]`. At runtime,
425425
// when this coercion occurs, we would be changing the
426426
// field `ptr` from a thin pointer of type `*mut [i32;
427-
// 3]` to a fat pointer of type `*mut [i32]` (with
427+
// 3]` to a wide pointer of type `*mut [i32]` (with
428428
// extra data `3`). **The purpose of this check is to
429429
// make sure that we know how to do this conversion.**
430430
//

compiler/rustc_hir_typeck/messages.ftl

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ hir_typeck_cannot_cast_to_bool = cannot cast `{$expr_ty}` as `bool`
2323
2424
hir_typeck_cast_enum_drop = cannot cast enum `{$expr_ty}` into integer `{$cast_ty}` because it implements `Drop`
2525
26-
hir_typeck_cast_thin_pointer_to_fat_pointer = cannot cast thin pointer `{$expr_ty}` to fat pointer `{$cast_ty}`
26+
hir_typeck_cast_thin_pointer_to_wide_pointer = cannot cast thin pointer `{$expr_ty}` to wide pointer `{$cast_ty}`
2727
.teach_help = Thin pointers are "simple" pointers: they are purely a reference to a
2828
memory address.
2929
30-
Fat pointers are pointers referencing "Dynamically Sized Types" (also
30+
Wide pointers are pointers referencing "Dynamically Sized Types" (also
3131
called DST). DST don't have a statically known size, therefore they can
3232
only exist behind some kind of pointers that contain additional
3333
information. Slices and trait objects are DSTs. In the case of slices,
34-
the additional information the fat pointer holds is their size.
34+
the additional information the wide pointer holds is their size.
3535
36-
To fix this error, don't try to cast directly between thin and fat
36+
To fix this error, don't try to cast directly between thin and wide
3737
pointers.
3838
3939
For more information about casts, take a look at The Book:

compiler/rustc_hir_typeck/src/cast.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub(crate) struct CastCheck<'tcx> {
6666
}
6767

6868
/// The kind of pointer and associated metadata (thin, length or vtable) - we
69-
/// only allow casts between fat pointers if their metadata have the same
69+
/// only allow casts between wide pointers if their metadata have the same
7070
/// kind.
7171
#[derive(Debug, Copy, Clone, PartialEq, Eq, TypeVisitable, TypeFoldable)]
7272
enum PointerKind<'tcx> {
@@ -545,7 +545,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
545545
err.emit();
546546
}
547547
CastError::SizedUnsizedCast => {
548-
fcx.dcx().emit_err(errors::CastThinPointerToFatPointer {
548+
fcx.dcx().emit_err(errors::CastThinPointerToWidePointer {
549549
span: self.span,
550550
expr_ty: self.expr_ty,
551551
cast_ty: fcx.ty_to_string(self.cast_ty),
@@ -861,7 +861,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
861861
return Ok(CastKind::PtrPtrCast);
862862
}
863863

864-
// We can't cast to fat pointer if source pointer kind is unknown
864+
// We can't cast to wide pointer if source pointer kind is unknown
865865
let Some(src_kind) = src_kind else {
866866
return Err(CastError::UnknownCastPtrKind);
867867
};

compiler/rustc_hir_typeck/src/errors.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ pub(crate) struct ReplaceWithName {
699699
}
700700

701701
#[derive(Diagnostic)]
702-
#[diag(hir_typeck_cast_thin_pointer_to_fat_pointer, code = E0607)]
703-
pub(crate) struct CastThinPointerToFatPointer<'tcx> {
702+
#[diag(hir_typeck_cast_thin_pointer_to_wide_pointer, code = E0607)]
703+
pub(crate) struct CastThinPointerToWidePointer<'tcx> {
704704
#[primary_span]
705705
pub span: Span,
706706
pub expr_ty: Ty<'tcx>,

compiler/rustc_hir_typeck/src/expectation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl<'a, 'tcx> Expectation<'tcx> {
5555
/// be checked higher up, as is the case with `&expr` and `box expr`), but
5656
/// is useful in determining the concrete type.
5757
///
58-
/// The primary use case is where the expected type is a fat pointer,
58+
/// The primary use case is where the expected type is a wide pointer,
5959
/// like `&[isize]`. For example, consider the following statement:
6060
///
6161
/// let x: &[isize] = &[1, 2, 3];

0 commit comments

Comments
 (0)