about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2022-01-27 16:55:48 +0100
committerMichael Woerister <michaelwoerister@posteo>2022-01-27 16:55:48 +0100
commitd33e317a72548ad9fb1439fcd1cfa53d17aefd84 (patch)
tree5c6bdc25bd06cd0302a2591b23ac3395ea94332a /compiler/rustc_codegen_llvm/src
parent3c61d2e172becefe72a7468d2de0c67e69716163 (diff)
downloadrust-d33e317a72548ad9fb1439fcd1cfa53d17aefd84.tar.gz
rust-d33e317a72548ad9fb1439fcd1cfa53d17aefd84.zip
[debuginfo] Fix and unify handling of fat pointers in debuginfo: Change doc comment so it is not interpreted as doc-test.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
index b5d86aab880..dd9c83481af 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
@@ -572,21 +572,21 @@ fn dyn_type_metadata<'ll, 'tcx>(
 
 /// Create debuginfo for `[T]` and `str`. These are unsized.
 ///
-/// Note: We currently emit just emit the debuginfo for the element type here
-///       (i.e. `T` for slices and `u8` for `str`), so that we end up with
-///       `*const T` for the `data_ptr` field of the corresponding fat-pointer
-///       debuginfo of `&[T]`.
+/// NOTE: We currently emit just emit the debuginfo for the element type here
+/// (i.e. `T` for slices and `u8` for `str`), so that we end up with
+/// `*const T` for the `data_ptr` field of the corresponding fat-pointer
+/// debuginfo of `&[T]`.
 ///
-///       It would be preferable and more accurate if we emitted a DIArray of T
-///       without an upper bound instead. That is, LLVM already supports emitting
-///       debuginfo of arrays of unknown size. But GDB currently seems to end up
-///       in an infinite loop when confronted with such a type.
+/// It would be preferable and more accurate if we emitted a DIArray of T
+/// without an upper bound instead. That is, LLVM already supports emitting
+/// debuginfo of arrays of unknown size. But GDB currently seems to end up
+/// in an infinite loop when confronted with such a type.
 ///
-///       As a side effect of the current encoding every instance of a type like
-///       `struct Foo { unsized_field: [u8] }` will look like
-///       `struct Foo { unsized_field: u8 }` in debuginfo. If the length of the
-///       slice is zero, then accessing `unsized_field` in the debugger would
-///       result in an out-of-bounds access.
+/// As a side effect of the current encoding every instance of a type like
+/// `struct Foo { unsized_field: [u8] }` will look like
+/// `struct Foo { unsized_field: u8 }` in debuginfo. If the length of the
+/// slice is zero, then accessing `unsized_field` in the debugger would
+/// result in an out-of-bounds access.
 fn slice_type_metadata<'ll, 'tcx>(
     cx: &CodegenCx<'ll, 'tcx>,
     slice_type: Ty<'tcx>,