From 4e7226ddcace71fcd0f4ecb1658aaeac95f38fa1 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Wed, 28 Aug 2019 09:18:43 -0700 Subject: [PATCH] Fix documentation warnings in ConstantPool --- cranelift/codegen/src/ir/constant.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cranelift/codegen/src/ir/constant.rs b/cranelift/codegen/src/ir/constant.rs index c44dcd3379..50e93df1ab 100644 --- a/cranelift/codegen/src/ir/constant.rs +++ b/cranelift/codegen/src/ir/constant.rs @@ -19,8 +19,9 @@ pub type ConstantOffset = u32; /// Inner type for storing data and offset together in the constant pool. The offset is optional /// because it must be set relative to the function code size (i.e. constants are emitted after the /// function body); because the function is not yet compiled when constants are inserted, -/// [set_offset](ir::ConstantPool::set_offset) must be called once a constant's offset from the -/// beginning of the function is known (see [relaxation.rs](binemit::relaxation)). +/// [`set_offset`](crate::ir::ConstantPool::set_offset) must be called once a constant's +/// offset from the beginning of the function is known (see +/// [`relaxation.rs`](crate::binemit::relaxation)). #[derive(Clone)] pub struct ConstantPoolEntry { data: ConstantData, @@ -43,8 +44,9 @@ impl ConstantPoolEntry { } } -/// Maintains the mapping between a constant handle (i.e. [Constant](ir::entities::Constant)) and -/// its constant data (i.e. [ConstantData](ir::constant::ConstantData)). +/// Maintains the mapping between a constant handle (i.e. +/// [`Constant`](crate::ir::Constant)) and its constant data (i.e. +/// [`ConstantData`](crate::ir::ConstantData)). #[derive(Clone)] pub struct ConstantPool { /// This mapping maintains the insertion order as long as Constants are created with sequentially increasing integers.