Skip to content

Commit a099b19

Browse files
authored
Fix broken links in README and cargo doc warnings (#912)
1 parent e860907 commit a099b19

File tree

10 files changed

+19
-18
lines changed

10 files changed

+19
-18
lines changed

.github/scripts/ci-doc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# If the output path is changed in this script, we need to update rustdoc.yml as well.
55

66
# deny warnings for rustdoc
7-
export RUSTFLAGS="-D warnings"
7+
export RUSTDOCFLAGS="-D warnings"
88

99
# Check cargo doc
1010
# We document public and private items for MMTk developers (GC implementers).
@@ -22,6 +22,6 @@ if ! cat $project_root/src/plan/mod.rs | grep -q "pub mod mygc;"; then
2222
fi
2323
cargo build
2424

25-
# Install mdbook using the stable toolchain (mdbook uses scoped-tls which requires rust 1.59.0)
25+
# Install mdbook using the stable toolchain
2626
cargo +stable install mdbook
2727
mdbook build $project_root/docs/userguide

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ example of how to make a PGO build.
6464
MMTk does not run standalone. You would need to integrate MMTk with a language implementation.
6565
You can either try out one of the VM bindings we have been working on, or implement your own binding in your VM for MMTk.
6666
You can also implement your own GC algorithm in MMTk, and run it with supported VMs.
67-
You can find up-to-date full API documentation for mmtk-core [here](https://docs.mmtk.io/api).
67+
You can find up-to-date full API documentation for mmtk-core [here](https://docs.mmtk.io/api/mmtk).
6868

6969
### Try out our current bindings
7070

@@ -86,7 +86,7 @@ MMTk provides a bi-directional interface with the language VM.
8686
To integrate MMTk with your language implementation, you need to provide an implementation of `VMBinding`, and
8787
you can optionally call MMTk's API for your needs.
8888

89-
For more information, you can refer to our [porting guide](https://docs.mmtk.io/userguide/prefix.html) for VM implementors.
89+
For more information, you can refer to our [porting guide](https://docs.mmtk.io/portingguide/prefix.html) for VM implementors.
9090

9191
### Implement your GC
9292

src/policy/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
/// descendants) may have the same policy (eg there could be numerous
88
/// instances of CopySpace, each with different roles). Spaces are
99
/// defined in terms of a unique region of virtual memory, so no two
10-
/// space instances ever share any virtual memory.<p>
10+
/// space instances ever share any virtual memory.
11+
///
1112
/// In addition to tracking virtual memory use and the mapping to
12-
/// policy, spaces also manage memory consumption (<i>used</i> virtual
13+
/// policy, spaces also manage memory consumption (*used* virtual
1314
/// memory).
1415
pub mod space;
1516

src/util/address.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ impl Address {
149149
/// creates a null Address (0)
150150
/// # Safety
151151
/// It is unsafe and the user needs to be aware that they are creating an invalid address.
152-
/// The zero address should only be used as unininitialized or sentinel values in performance critical code (where you dont want to use Option<Address>).
152+
/// The zero address should only be used as unininitialized or sentinel values in performance critical code (where you dont want to use `Option<Address>`).
153153
pub const unsafe fn zero() -> Address {
154154
Address(0)
155155
}
156156

157157
/// creates an Address of (usize::MAX)
158158
/// # Safety
159159
/// It is unsafe and the user needs to be aware that they are creating an invalid address.
160-
/// The max address should only be used as unininitialized or sentinel values in performance critical code (where you dont want to use Option<Address>).
160+
/// The max address should only be used as unininitialized or sentinel values in performance critical code (where you dont want to use `Option<Address>`).
161161
pub unsafe fn max() -> Address {
162162
use std::usize;
163163
Address(usize::MAX)

src/util/erase_vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! However, in some cases, using generic types is not allowed. For example, in an object-safe trait,
44
//! the methods cannot be generic, thus the method's parameters cannot be generic types.
55
//!
6-
//! This module defines macros that can be used to create a special ref type that erases the <VM> type parameter.
6+
//! This module defines macros that can be used to create a special ref type that erases the `<VM>` type parameter.
77
//! For example, we create a type `TErasedRef` for `&T<VM>`. `TErasedRef` has no type parameter, and
88
//! can be used in places where a type parameter is undesired. The type `TErasedRef` can be cast back to `&T<VM>`
99
//! when we supply a type parameter `<VM>`. This works under the assumption that

src/util/heap/layout/mmapper.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ pub trait Mmapper: Sync {
3838

3939
/// Ensure that a range of pages is mmapped (or equivalent). If the
4040
/// pages are not yet mapped, demand-zero map them. Note that mapping
41-
/// occurs at chunk granularity, not page granularity.<p>
41+
/// occurs at chunk granularity, not page granularity.
4242
///
43-
/// Argumetns:
44-
/// `start`: The start of the range to be mapped.
45-
/// `pages`: The size of the range to be mapped, in pages
43+
/// Arguments:
44+
/// * `start`: The start of the range to be mapped.
45+
/// * `pages`: The size of the range to be mapped, in pages
4646
// NOTE: There is a monotonicity assumption so that only updates require lock
4747
// acquisition.
4848
// TODO: Fix the above to support unmapping.

src/util/heap/layout/vm_layout_constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub const LOG_ADDRESS_SPACE: usize = 47;
1414
pub const LOG_ADDRESS_SPACE: usize = 32;
1515
/**
1616
* log_2 of the coarsest unit of address space allocation.
17-
* <p>
17+
*
1818
* In the 32-bit VM layout, this determines the granularity of
1919
* allocation in a discontigouous space. In the 64-bit layout,
2020
* this determines the growth factor of the large contiguous spaces

src/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub(crate) mod analysis;
3535
/// Logging edges to check duplicated edges in GC.
3636
#[cfg(feature = "extreme_assertions")]
3737
pub(crate) mod edge_logger;
38-
/// Non-generic refs to generic types of <VM>.
38+
/// Non-generic refs to generic types of `<VM>`.
3939
pub(crate) mod erase_vm;
4040
/// Finalization implementation.
4141
pub(crate) mod finalizable_processor;

src/util/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ impl NurserySize {
394394
}
395395
}
396396

397-
/// Returns a NurserySize or String containing error. Expects nursery size to be formatted as
398-
/// "<NurseryKind>:<size in bytes>". For example, "Fixed:8192" creates a Fixed nursery of size
397+
/// Returns a [`NurserySize`] or [`String`] containing error. Expects nursery size to be formatted as
398+
/// `<NurseryKind>:<size in bytes>`. For example, `Fixed:8192` creates a [`NurseryKind::Fixed`] nursery of size
399399
/// 8192 bytes.
400400
pub fn parse(s: &str) -> Result<NurserySize, String> {
401401
let ns: Vec<&str> = s.split(':').collect();

src/vm/scanning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub trait Scanning<VM: VMBinding> {
202202
/// scan them while enumerating, but cannot scan stacks individually when given
203203
/// the references of threads.
204204
/// In that case, it can leave this method empty, and deal with stack
205-
/// roots in [`Collection::scan_vm_specific_roots`]. However, in that case, MMTk
205+
/// roots in [`Scanning::scan_vm_specific_roots`]. However, in that case, MMTk
206206
/// does not know those roots are stack roots, and cannot perform any possible
207207
/// optimization for the stack roots.
208208
///

0 commit comments

Comments
 (0)