Skip to content

Commit

Permalink
misc: fix up intra doc links (make use of rfc 1946)
Browse files Browse the repository at this point in the history
rrbutani committed Oct 9, 2019

Verified

This commit was signed with the committer’s verified signature.
Kubuxu Jakub Sztandera
1 parent 5f71438 commit 6fc4e6b
Showing 12 changed files with 27 additions and 20 deletions.
10 changes: 5 additions & 5 deletions src/control.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! The [`Control` trait](trait.Control.html) and friends.
//! The [`Control` trait](crate::control::Control) and friends.
//!
//! Unlike the [`Peripherals` trait](../peripherals/trait.Peripherals.html) and
//! the [`Memory` trait](../memory/trait.Memory.html), there is no shim
//! implementation of Control; instead the 'shim' is an instruction level
//! simulator that lives in the [interp module](../interp).
//! Unlike the [`Peripherals` trait](crate::peripherals::Peripherals) and the
//! [`Memory` trait](crate::memory::Memory), there is no shim implementation of
//! Control; instead the 'shim' is an instruction level simulator that lives in
//! the [interp module](crate::interp).
use super::error::Error;
use super::{Addr, Word};
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(stmt_expr_attributes)]
#![feature(trace_macros)]

// TODO: forbid
#![warn(
bad_style,
@@ -27,6 +28,7 @@
// TODO: deny
#![warn(
missing_debug_implementations,
intra_doc_link_resolution_failure,
missing_docs,
unsafe_code,
trivial_casts,
@@ -36,11 +38,12 @@
unused_qualifications,
unused_results
)]

// Mark the crate as no_std if the `no_std` feature is enabled.
#![cfg_attr(feature = "no_std", no_std)]

#[cfg(feature = "shims")]
mod shims;
pub mod shims;

// Can't have `no_std` and `shims` enabled!
#[cfg(all(feature = "no_std", feature = "shims"))]
2 changes: 1 addition & 1 deletion src/peripherals/adc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! [`Adc` trait](trait.Adc.html) and associated types.
//! [`Adc` trait](Adc) and associated types.
use crate::peripheral_trait;

2 changes: 1 addition & 1 deletion src/peripherals/clock.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! [`Clock` trait](trait.Clock.html).
//! [`Clock` trait](Clock).
use crate::Word;

2 changes: 1 addition & 1 deletion src/peripherals/gpio.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! [`Gpio` trait](trait.Gpio.html) and friends.
//! [`Gpio` trait](Gpio) and friends.
use core::convert::TryFrom;

2 changes: 1 addition & 1 deletion src/peripherals/input.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! [`Input` device trait](trait.Input.html) and related things.
//! [`Input` device trait](Input) and related things.
pub trait Input {}
4 changes: 2 additions & 2 deletions src/peripherals/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Peripherals! The [`Peripherals` supertrait](trait.Peripherals.html) and the
//! rest of the peripheral and device traits.
//! Peripherals! The [`Peripherals` supertrait](Peripherals) and the rest of the
//! peripheral and device traits.
pub mod adc;
pub mod clock;
2 changes: 1 addition & 1 deletion src/peripherals/output.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
//! [`Output` device trait](trait.Output.html) and friends.
//! [`Output` device trait](Output) and friends.
pub trait Output {}
2 changes: 1 addition & 1 deletion src/peripherals/pwm.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! [`Pwm` trait](trait.Pwm.html) and helpers.
//! [`Pwm` trait](Pwm) and helpers.
// TODO: Switch to enum for pins
// TODO: Add Errors
2 changes: 1 addition & 1 deletion src/peripherals/timers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! [`Timers` trait](trait.Timers.html) and related types.
//! [`Timers` trait](Timers) and related types.
use crate::Word;

9 changes: 6 additions & 3 deletions src/shims/memory.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
//! An extremely naive, terrible [`Memory` trait](../memory/trait.Memory.html)
//! implementation called [`MemoryShim`](struct.MemoryShim.html).
//! An extremely naive, terrible [`Memory` trait](crate::memory::Memory)
//! implementation called [`MemoryShim`](memory::MemoryShim).
/// Naive [`Memory` trait](../memory/trait.Memory.html) implementation.
use crate::{Addr, Word};
use crate::memory::{Memory, MemoryMiscError};

/// Naive [`Memory` trait](crate::memory::Memory) implementation.
///
/// Only good for hosted platforms since we just go and use 128 KiB of stack
/// space.
5 changes: 3 additions & 2 deletions src/shims/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
//! Shims for the various [peripheral](../peripheral) traits and for the
//! [`Memory` trait](../memory/trait.Memory.html).
//! Shims for the various [peripheral](crate::peripherals) traits and for the
//! [`Memory` trait](crate::memory::Memory).
// Peripherals:
mod gpio;

// Devices:

// Memory:
mod memory;

0 comments on commit 6fc4e6b

Please sign in to comment.