diff --git a/cranelift/codegen/meta/src/cdsl/ast.rs b/cranelift/codegen/meta/src/cdsl/ast.rs index e2e661de8b..e4eb202be3 100644 --- a/cranelift/codegen/meta/src/cdsl/ast.rs +++ b/cranelift/codegen/meta/src/cdsl/ast.rs @@ -390,10 +390,12 @@ impl VarPool { } } -/// Contains constants created in the AST that must be inserted into the true [ConstantPool] -/// (cranelift_codegen::ir::ConstantPool) when the legalizer code is generated. The constant data -/// is named in the order it is inserted; inserting data using [insert] -/// (cranelift_codegen_meta::cdsl::ast::insert) will avoid duplicates. +/// Contains constants created in the AST that must be inserted into the true [ConstantPool] when +/// the legalizer code is generated. The constant data is named in the order it is inserted; +/// inserting data using [insert] will avoid duplicates. +/// +/// [ConstantPool]: ../../../cranelift_codegen/ir/constant/struct.ConstantPool.html +/// [insert]: ConstPool::insert pub(crate) struct ConstPool { pool: Vec>, } diff --git a/cranelift/codegen/src/ir/constant.rs b/cranelift/codegen/src/ir/constant.rs index edd939f90d..2dc95544c8 100644 --- a/cranelift/codegen/src/ir/constant.rs +++ b/cranelift/codegen/src/ir/constant.rs @@ -21,8 +21,9 @@ use cranelift_entity::EntityRef; /// This type describes the actual constant data. Note that the bytes stored in this structure are /// expected to be in little-endian order; this is due to ease-of-use when interacting with -/// WebAssembly values, which are [little-endian by design] -/// (https://github.com/WebAssembly/design/blob/master/Portability.md). +/// WebAssembly values, which are [little-endian by design]. +/// +/// [little-endian by design]: https://github.com/WebAssembly/design/blob/master/Portability.md #[derive(Clone, Hash, Eq, PartialEq, Debug, Default)] pub struct ConstantData(Vec); @@ -116,8 +117,7 @@ impl fmt::Display for ConstantData { impl FromStr for ConstantData { type Err = &'static str; - /// Parse a hexadecimal string to `ConstantData`. This is the inverse of [ConstantData::fmt] - /// (cranelift_codegen::ir::ConstantData::fmt). + /// Parse a hexadecimal string to `ConstantData`. This is the inverse of `Display::fmt`. /// /// ``` /// use cranelift_codegen::ir::ConstantData;