mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Convert comment to rustdoc in placement.rs (#6665)
This commit is contained in:
parent
1811312722
commit
8228429a70
1 changed files with 17 additions and 16 deletions
|
@ -227,6 +227,7 @@ fn handle_enclosed_comment<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Handle an end-of-line comment around a body.
|
||||||
fn handle_end_of_line_comment_around_body<'a>(
|
fn handle_end_of_line_comment_around_body<'a>(
|
||||||
comment: DecoratedComment<'a>,
|
comment: DecoratedComment<'a>,
|
||||||
locator: &Locator,
|
locator: &Locator,
|
||||||
|
@ -1326,22 +1327,22 @@ fn handle_with_comment<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle comments inside comprehensions, e.g.
|
/// Handle comments inside comprehensions, e.g.
|
||||||
//
|
///
|
||||||
// ```python
|
/// ```python
|
||||||
// [
|
/// [
|
||||||
// a
|
/// a
|
||||||
// for # dangling on the comprehension
|
/// for # dangling on the comprehension
|
||||||
// b
|
/// b
|
||||||
// # dangling on the comprehension
|
/// # dangling on the comprehension
|
||||||
// in # dangling on comprehension.iter
|
/// in # dangling on comprehension.iter
|
||||||
// # leading on the iter
|
/// # leading on the iter
|
||||||
// c
|
/// c
|
||||||
// # dangling on comprehension.if.n
|
/// # dangling on comprehension.if.n
|
||||||
// if # dangling on comprehension.if.n
|
/// if # dangling on comprehension.if.n
|
||||||
// d
|
/// d
|
||||||
// ]
|
/// ]
|
||||||
// ```
|
/// ```
|
||||||
fn handle_comprehension_comment<'a>(
|
fn handle_comprehension_comment<'a>(
|
||||||
comment: DecoratedComment<'a>,
|
comment: DecoratedComment<'a>,
|
||||||
comprehension: &'a Comprehension,
|
comprehension: &'a Comprehension,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue