style(headers): use regular doc-comments inside macros

A bug (rust-lang/rust#23812) in rustc prevented the use of normal
comments inside macros but this has been fixed.
This commit is contained in:
Pyfisch
2015-10-27 19:19:05 +01:00
parent d16ef6d9d4
commit 4c756a9304
33 changed files with 1209 additions and 1209 deletions

View File

@@ -1,50 +1,50 @@
use unicase::UniCase;
header! {
#[doc="`Vary` header, defined in [RFC7231](https://tools.ietf.org/html/rfc7231#section-7.1.4)"]
#[doc=""]
#[doc="The \"Vary\" header field in a response describes what parts of a"]
#[doc="request message, aside from the method, Host header field, and"]
#[doc="request target, might influence the origin server's process for"]
#[doc="selecting and representing this response. The value consists of"]
#[doc="either a single asterisk (\"*\") or a list of header field names"]
#[doc="(case-insensitive)."]
#[doc=""]
#[doc="# ABNF"]
#[doc="```plain"]
#[doc="Vary = \"*\" / 1#field-name"]
#[doc="```"]
#[doc=""]
#[doc="# Example values"]
#[doc="* `accept-encoding, accept-language`"]
#[doc=""]
#[doc="# Example"]
#[doc="```"]
#[doc="use hyper::header::{Headers, Vary};"]
#[doc=""]
#[doc="let mut headers = Headers::new();"]
#[doc="headers.set(Vary::Any);"]
#[doc="```"]
#[doc=""]
#[doc="# Example"]
#[doc="```"]
#[doc="# extern crate hyper;"]
#[doc="# extern crate unicase;"]
#[doc="# fn main() {"]
#[doc="// extern crate unicase;"]
#[doc=""]
#[doc="use hyper::header::{Headers, Vary};"]
#[doc="use unicase::UniCase;"]
#[doc=""]
#[doc="let mut headers = Headers::new();"]
#[doc="headers.set("]
#[doc=" Vary::Items(vec!["]
#[doc=" UniCase(\"accept-encoding\".to_owned()),"]
#[doc=" UniCase(\"accept-language\".to_owned()),"]
#[doc=" ])"]
#[doc=");"]
#[doc="# }"]
#[doc="```"]
/// `Vary` header, defined in [RFC7231](https://tools.ietf.org/html/rfc7231#section-7.1.4)
///
/// The "Vary" header field in a response describes what parts of a
/// request message, aside from the method, Host header field, and
/// request target, might influence the origin server's process for
/// selecting and representing this response. The value consists of
/// either a single asterisk ("*") or a list of header field names
/// (case-insensitive).
///
/// # ABNF
/// ```plain
/// Vary = "*" / 1#field-name
/// ```
///
/// # Example values
/// * `accept-encoding, accept-language`
///
/// # Example
/// ```
/// use hyper::header::{Headers, Vary};
///
/// let mut headers = Headers::new();
/// headers.set(Vary::Any);
/// ```
///
/// # Example
/// ```
/// # extern crate hyper;
/// # extern crate unicase;
/// # fn main() {
/// // extern crate unicase;
///
/// use hyper::header::{Headers, Vary};
/// use unicase::UniCase;
///
/// let mut headers = Headers::new();
/// headers.set(
/// Vary::Items(vec![
/// UniCase("accept-encoding".to_owned()),
/// UniCase("accept-language".to_owned()),
/// ])
/// );
/// # }
/// ```
(Vary, "Vary") => {Any / (UniCase<String>)+}
test_vary {