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,37 +1,37 @@
use header::HttpDate;
header! {
#[doc="`If-Unmodified-Since` header, defined in"]
#[doc="[RFC7232](http://tools.ietf.org/html/rfc7232#section-3.4)"]
#[doc=""]
#[doc="The `If-Unmodified-Since` header field makes the request method"]
#[doc="conditional on the selected representation's last modification date"]
#[doc="being earlier than or equal to the date provided in the field-value."]
#[doc="This field accomplishes the same purpose as If-Match for cases where"]
#[doc="the user agent does not have an entity-tag for the representation."]
#[doc=""]
#[doc="# ABNF"]
#[doc="```plain"]
#[doc="If-Unmodified-Since = HTTP-date"]
#[doc="```"]
#[doc=""]
#[doc="# Example values"]
#[doc="* `Sat, 29 Oct 1994 19:43:31 GMT`"]
#[doc=""]
#[doc="# Example"]
#[doc="```"]
#[doc="# extern crate hyper;"]
#[doc="# extern crate time;"]
#[doc="# fn main() {"]
#[doc="// extern crate time;"]
#[doc=""]
#[doc="use hyper::header::{Headers, IfUnmodifiedSince, HttpDate};"]
#[doc="use time::{self, Duration};"]
#[doc=""]
#[doc="let mut headers = Headers::new();"]
#[doc="headers.set(IfUnmodifiedSince(HttpDate(time::now() - Duration::days(1))));"]
#[doc="# }"]
#[doc="```"]
/// `If-Unmodified-Since` header, defined in
/// [RFC7232](http://tools.ietf.org/html/rfc7232#section-3.4)
///
/// The `If-Unmodified-Since` header field makes the request method
/// conditional on the selected representation's last modification date
/// being earlier than or equal to the date provided in the field-value.
/// This field accomplishes the same purpose as If-Match for cases where
/// the user agent does not have an entity-tag for the representation.
///
/// # ABNF
/// ```plain
/// If-Unmodified-Since = HTTP-date
/// ```
///
/// # Example values
/// * `Sat, 29 Oct 1994 19:43:31 GMT`
///
/// # Example
/// ```
/// # extern crate hyper;
/// # extern crate time;
/// # fn main() {
/// // extern crate time;
///
/// use hyper::header::{Headers, IfUnmodifiedSince, HttpDate};
/// use time::{self, Duration};
///
/// let mut headers = Headers::new();
/// headers.set(IfUnmodifiedSince(HttpDate(time::now() - Duration::days(1))));
/// # }
/// ```
(IfUnmodifiedSince, "If-Unmodified-Since") => [HttpDate]
test_if_unmodified_since {