Skip to content

Commit

Permalink
Fix some intra-doc-links (and some others)
Browse files Browse the repository at this point in the history
  • Loading branch information
robojumper authored and udoprog committed Jan 16, 2021
1 parent 7f9ca95 commit 2afd726
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/rune-languageserver/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ fn span_to_lsp_range(source: &runestick::Source, span: Span) -> Option<lsp::Rang
/// Translate the given lsp::Position, which is in UTF-16 because Microsoft.
///
/// Please go complain here:
/// https://github.com/microsoft/language-server-protocol/issues/376
/// <https://github.com/microsoft/language-server-protocol/issues/376>
fn rope_utf16_position(rope: &Rope, position: lsp::Position) -> Result<usize> {
let line = rope.line(position.line as usize);

Expand Down
3 changes: 1 addition & 2 deletions crates/rune-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
//!
//! Macros for Rune.
//!
//! This is part of the [Rune language].
//! [Rune Language]: https://rune-rs.github.io
//! This is part of the [Rune Language](https://rune-rs.github.io).

extern crate proc_macro;

Expand Down
4 changes: 4 additions & 0 deletions crates/rune-modules/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
//! [time]: https://docs.rs/rune-modules/0/rune_modules/time/
//! [toml]: https://docs.rs/rune-modules/0/rune_modules/toml/

// Note: The above links to docs.rs are needed because cargo-readme does not
// support intra-doc links (yet):
// https://github.com/livioribeiro/cargo-readme/issues/55

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

Expand Down
2 changes: 1 addition & 1 deletion crates/rune/src/ast/lit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Lit {
/// a later stage as an expression is being parsed.
///
/// These include:
/// * Object literals that start with a path (handled in [ast::Expr::parse_ident_start]).
/// * Object literals that start with a path (handled in [ast::Expr::parse_with_meta_path]).
/// * Tuple literals that start with a path (handled in [ast::Expr::parse_open_paren]).
pub(crate) fn peek_in_expr(p: &mut Peeker<'_>) -> bool {
match p.nth(0) {
Expand Down
4 changes: 2 additions & 2 deletions crates/rune/src/compiling/unit_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl UnitBuilder {
}

/// Insert a static string and return its associated slot that can later be
/// looked up through [lookup_string][Self::lookup_string].
/// looked up through [lookup_string][Unit::lookup_string].
///
/// Only uses up space if the static string is unique.
pub(crate) fn new_static_string(
Expand Down Expand Up @@ -163,7 +163,7 @@ impl UnitBuilder {
}

/// Insert a static byte string and return its associated slot that can
/// later be looked up through [lookup_bytes][Self::lookup_bytes].
/// later be looked up through [lookup_bytes][Unit::lookup_bytes].
///
/// Only uses up space if the static byte string is unique.
pub(crate) fn new_static_bytes(
Expand Down
3 changes: 1 addition & 2 deletions crates/rune/src/ir/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Intermediate representation of Rune that can be evaluated in constant
//! contexts.
//!
//! This is part of the [Rune Language].
//! [Rune Language]: https://rune-rs.github.io
//! This is part of the [Rune Language](https://rune-rs.github.io).

mod eval;
mod ir_compiler;
Expand Down
2 changes: 1 addition & 1 deletion crates/rune/src/load/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub use self::sources::Sources;

/// Error raised when we failed to load sources.
///
/// Look at the passed in [Errors] instance for details.
/// Look at the passed in [Diagnostics] instance for details.
#[derive(Debug, Error)]
#[error("failed to load sources (see `errors` for details)")]
pub struct LoadSourcesError;
Expand Down
2 changes: 1 addition & 1 deletion crates/rune/src/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,7 @@ pub(crate) struct QueryConstFn {
pub(crate) ir_fn: ir::IrFn,
}

/// The result of calling [Query::find_named].
/// The result of calling [Query::convert_path].
#[derive(Debug)]
pub struct Named {
/// If the resolved value is local.
Expand Down
3 changes: 1 addition & 2 deletions crates/runestick-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
//! Macros for Runestick, a stack-based virtual machine for the Rust programming
//! language.
//!
//! This is part of the [Rune language].
//! [Rune Language]: https://rune-rs.github.io
//! This is part of the [Rune Language](https://rune-rs.github.io).

extern crate proc_macro;

Expand Down
6 changes: 3 additions & 3 deletions crates/runestick/src/env.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//! Thread-local access to the current context.
//!
//! This provides access to functions to call specific protocol functions, like:
//! * [into_iter]
//! * [string_debug]
//! * [into_type_name]
//! * [super::Value::into_iter]
//! * [super::Value::string_debug]
//! * [super::Value::into_type_name]
//!
//! See the corresponding function for documentation.

Expand Down
2 changes: 1 addition & 1 deletion crates/runestick/src/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ where
/// The trait for interacting with an iterator.
///
/// This has a blanket implementation, and is primarily used to restrict the
/// arguments that can be used in [Iterator::from_iterator].
/// arguments that can be used in [Iterator::from].
pub trait IteratorTrait: 'static {
/// Size hint of the iterator.
fn size_hint(&self) -> (usize, Option<usize>);
Expand Down
3 changes: 1 addition & 2 deletions crates/runestick/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
//!
//! A stack-based virtual machine for the Rust programming language.
//!
//! This is the driver for the [Rune language].
//! [Rune Language]: https://rune-rs.github.io
//! This is the driver for the [Rune Language](https://rune-rs.github.io).

#![deny(missing_docs)]
#![allow(clippy::enum_variant_names, clippy::too_many_arguments)]
Expand Down

0 comments on commit 2afd726

Please sign in to comment.