Attach comments to ast::Impl

This commit is contained in:
Lukas Wirth 2021-05-15 17:23:20 +02:00
parent 3da52d2e93
commit 4b5b54279a
4 changed files with 30 additions and 6 deletions

View file

@ -524,6 +524,11 @@ fn main() {
fn test_highlight_doc_comment() {
check_highlighting(
r#"
//! This is a module to test doc injection.
//! ```
//! fn test() {}
//! ```
/// ```
/// let _ = "early doctests should not go boom";
/// ```
@ -531,6 +536,13 @@ struct Foo {
bar: bool,
}
/// This is an impl with a code block.
///
/// ```
/// fn foo() {
///
/// }
/// ```
impl Foo {
/// ```
/// let _ = "Call me