Prefer doc comments over //
-comments in compiler
This commit is contained in:
parent
0e9eee6811
commit
1d42936b18
83 changed files with 400 additions and 387 deletions
|
@ -111,8 +111,8 @@ impl<CTX: rustc_span::HashStableContext> HashStable<CTX> for Path {
|
|||
}
|
||||
|
||||
impl Path {
|
||||
// Convert a span and an identifier to the corresponding
|
||||
// one-segment path.
|
||||
/// Convert a span and an identifier to the corresponding
|
||||
/// one-segment path.
|
||||
pub fn from_ident(ident: Ident) -> Path {
|
||||
Path { segments: thin_vec![PathSegment::from_ident(ident)], span: ident.span, tokens: None }
|
||||
}
|
||||
|
@ -1283,7 +1283,7 @@ impl Expr {
|
|||
)
|
||||
}
|
||||
|
||||
// To a first-order approximation, is this a pattern
|
||||
/// To a first-order approximation, is this a pattern?
|
||||
pub fn is_approximately_pattern(&self) -> bool {
|
||||
match &self.peel_parens().kind {
|
||||
ExprKind::Box(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue