Skip to content

Commit

Permalink
Chore: Fix some typos (Probably only part 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet committed Sep 16, 2023
1 parent 66c6483 commit 97469a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion marker_api/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ impl<'ast> AstContext<'ast> {
/// ```
///
/// This will create the same help message as in example 2, but it will be faster
/// if the lint is enabled. The emitted message would look like this:
/// if the lint is allowed. The emitted message would look like this:
/// ```text
/// warning: <lint message>
/// --> path/file.rs:1:1
Expand Down
10 changes: 5 additions & 5 deletions marker_api/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl<'ast> DiagnosticBuilder<'ast> {
}
}

/// This function sets the main message of this diagnostic message.
/// This function sets the main message of the created diagnostic.
///
/// From rustc a lint emission would look like this:
/// ```text
Expand All @@ -66,8 +66,8 @@ impl<'ast> DiagnosticBuilder<'ast> {
self
}

/// This function sets the main [`Span`] of this diagnostic message.
/// [`AstContext::emit_lint`] will by default use the span of the given
/// This function sets the main [`Span`] of the created diagnostic.
/// [`AstContext::emit_lint`] will by default use the [`Span`] of the given
/// [`EmissionNode`].
///
/// From rustc a lint emission would look like this:
Expand Down Expand Up @@ -267,7 +267,7 @@ impl<'ast> DiagnosticBuilder<'ast> {
let span = self
.span
.as_ref()
.expect("always Some, if `DiagnosticBuilder::emit_lint` is true");
.expect("always `Some`, if `DiagnosticBuilder::emit_lint` is true");
let diag = Diagnostic {
lint: self.lint,
msg: self.msg.as_str().into(),
Expand Down Expand Up @@ -311,7 +311,7 @@ pub trait EmissionNode<'ast>: Debug + Copy {
/// [`DiagnosticBuilder::set_main_span`].
///
/// The [`AstContext`] can be used to fetch the [`Span`], if this is implemented on
/// a id.
/// an id.
fn emission_span(&self, _cx: &AstContext<'ast>) -> Option<Span<'ast>>;
}

Expand Down

0 comments on commit 97469a6

Please sign in to comment.