Merge #9984
9984: Fix typos “a”→“an” r=Veykril a=steffahn See rust-lang/rust#88230 Co-authored-by: Frank Steffahn <frank.steffahn@stu.uni-kiel.de>
This commit is contained in:
commit
c6baf3dcf8
@ -203,7 +203,7 @@ pub fn ancestors_at_offset_with_macros(
|
|||||||
self.imp.ancestors_at_offset_with_macros(node, offset)
|
self.imp.ancestors_at_offset_with_macros(node, offset)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find a AstNode by offset inside SyntaxNode, if it is inside *Macrofile*,
|
/// Find an AstNode by offset inside SyntaxNode, if it is inside *Macrofile*,
|
||||||
/// search up until it is of the target AstNode type
|
/// search up until it is of the target AstNode type
|
||||||
pub fn find_node_at_offset_with_macros<N: AstNode>(
|
pub fn find_node_at_offset_with_macros<N: AstNode>(
|
||||||
&self,
|
&self,
|
||||||
@ -213,7 +213,7 @@ pub fn find_node_at_offset_with_macros<N: AstNode>(
|
|||||||
self.imp.ancestors_at_offset_with_macros(node, offset).find_map(N::cast)
|
self.imp.ancestors_at_offset_with_macros(node, offset).find_map(N::cast)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Find a AstNode by offset inside SyntaxNode, if it is inside *MacroCall*,
|
/// Find an AstNode by offset inside SyntaxNode, if it is inside *MacroCall*,
|
||||||
/// descend it and find again
|
/// descend it and find again
|
||||||
pub fn find_node_at_offset_with_descend<N: AstNode>(
|
pub fn find_node_at_offset_with_descend<N: AstNode>(
|
||||||
&self,
|
&self,
|
||||||
|
@ -280,7 +280,7 @@ fn validate_match(
|
|||||||
for arm in arms {
|
for arm in arms {
|
||||||
if let Some(pat_ty) = infer.type_of_pat.get(arm.pat) {
|
if let Some(pat_ty) = infer.type_of_pat.get(arm.pat) {
|
||||||
// We only include patterns whose type matches the type
|
// We only include patterns whose type matches the type
|
||||||
// of the match expression. If we had a InvalidMatchArmPattern
|
// of the match expression. If we had an InvalidMatchArmPattern
|
||||||
// diagnostic or similar we could raise that in an else
|
// diagnostic or similar we could raise that in an else
|
||||||
// block here.
|
// block here.
|
||||||
//
|
//
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! Completion for associated items in a trait implementation.
|
//! Completion for associated items in a trait implementation.
|
||||||
//!
|
//!
|
||||||
//! This module adds the completion items related to implementing associated
|
//! This module adds the completion items related to implementing associated
|
||||||
//! items within a `impl Trait for Struct` block. The current context node
|
//! items within an `impl Trait for Struct` block. The current context node
|
||||||
//! must be within either a `FN`, `TYPE_ALIAS`, or `CONST` node
|
//! must be within either a `FN`, `TYPE_ALIAS`, or `CONST` node
|
||||||
//! and an direct child of an `IMPL`.
|
//! and an direct child of an `IMPL`.
|
||||||
//!
|
//!
|
||||||
|
@ -98,7 +98,7 @@ pub fn assert(path: PathBuf) -> AbsPathBuf {
|
|||||||
.unwrap_or_else(|path| panic!("expected absolute path, got {}", path.display()))
|
.unwrap_or_else(|path| panic!("expected absolute path, got {}", path.display()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Coerces to a `AbsPath` slice.
|
/// Coerces to an `AbsPath` slice.
|
||||||
///
|
///
|
||||||
/// Equivalent of [`PathBuf::as_path`] for `AbsPathBuf`.
|
/// Equivalent of [`PathBuf::as_path`] for `AbsPathBuf`.
|
||||||
pub fn as_path(&self) -> &AbsPath {
|
pub fn as_path(&self) -> &AbsPath {
|
||||||
|
Loading…
Reference in New Issue
Block a user