mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Attach comments to ast::Impl
This commit is contained in:
parent
3da52d2e93
commit
4b5b54279a
4 changed files with 30 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue