-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #17153 - Veykril:doc-comment-desugaring, r=Veykril
fix: Fix doc comment desugaring for proc-macros Fixes #16259
- Loading branch information
Showing
14 changed files
with
228 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,3 +186,33 @@ fn#0:[email protected]#0# foo#0:[email protected]#0#(#0:[email protected]#0#�:[email protected]#0#self#0:[email protected]# | |
}#0:[email protected]#0#"#]], | ||
); | ||
} | ||
|
||
#[test] | ||
fn attribute_macro_doc_desugaring() { | ||
check( | ||
r#" | ||
//- proc_macros: identity | ||
#[proc_macros::identity] | ||
/// doc string \n with newline | ||
/** | ||
MultiLines Doc | ||
MultiLines Doc | ||
*/ | ||
#[doc = "doc attr"] | ||
struct S; | ||
"#, | ||
expect![[r##" | ||
#[proc_macros::identity] | ||
/// doc string \n with newline | ||
/** | ||
MultiLines Doc | ||
MultiLines Doc | ||
*/ | ||
#[doc = "doc attr"] | ||
struct S; | ||
#[doc = " doc string \\n with newline"] | ||
#[doc = "\n MultiLines Doc\n MultiLines Doc\n"] | ||
#[doc = "doc attr"] struct S;"##]], | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.