Debian Codegraph @

src/doc_comment.rs

raw symbols SCIP
1 use synrust-analyzer cargo syn 2.0.119 crate/::Attributerust-analyzer cargo syn 2.0.119 attr/Attribute#;
2
3 /// Doc-comment, implementing `quote::ToTokens`.
4 ///
5 /// # Examples
6 ///
7 /// Will expand to something like the following (depending on inner value):
8 ///
9 /// ```rust,ignore
10 /// # #[macro_use]
11 /// # extern crate quote;
12 /// # extern crate syn;
13 /// # extern crate derive_builder_core;
14 /// # use derive_builder_core::doc_comment_from;
15 /// # fn main() {
16 /// # let doc_comment = doc_comment_from("foo".to_string());
17 /// #
18 /// # assert_eq!(quote!(#doc_comment).to_string(), quote!(
19 /// #[doc = "foo"]
20 /// # ).to_string());
21 /// # }
22 /// ```
23 pub fn doc_comment_fromrust-analyzer cargo derive_builder_core 0.20.2 doc_comment/doc_comment_from().(s: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) -> Attributerust-analyzer cargo syn 2.0.119 attr/Attribute# {
24 parse_quoterust-analyzer cargo syn 2.0.119 parse_quote/parse_quote!!(#[doc=#s])
25 }