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:
@@ -1,34 +1,34 @@
|
||||
header! {
|
||||
#[doc="`Location` header, defined in"]
|
||||
#[doc="[RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Location` header field is used in some responses to refer to a"]
|
||||
#[doc="specific resource in relation to the response. The type of"]
|
||||
#[doc="relationship is defined by the combination of request method and"]
|
||||
#[doc="status code semantics."]
|
||||
#[doc=""]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Location = URI-reference"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `/People.html#tim`"]
|
||||
#[doc="* `http://www.example.net/index.html`"]
|
||||
#[doc=""]
|
||||
#[doc="# Examples"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Location};"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(Location(\"/People.html#tim\".to_owned()));"]
|
||||
#[doc="```"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Location};"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(Location(\"http://www.example.com/index.html\".to_owned()));"]
|
||||
#[doc="```"]
|
||||
/// `Location` header, defined in
|
||||
/// [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)
|
||||
///
|
||||
/// The `Location` header field is used in some responses to refer to a
|
||||
/// specific resource in relation to the response. The type of
|
||||
/// relationship is defined by the combination of request method and
|
||||
/// status code semantics.
|
||||
///
|
||||
/// # ABNF
|
||||
/// ```plain
|
||||
/// Location = URI-reference
|
||||
/// ```
|
||||
///
|
||||
/// # Example values
|
||||
/// * `/People.html#tim`
|
||||
/// * `http://www.example.net/index.html`
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, Location};
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(Location("/People.html#tim".to_owned()));
|
||||
/// ```
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, Location};
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(Location("http://www.example.com/index.html".to_owned()));
|
||||
/// ```
|
||||
// TODO: Use URL
|
||||
(Location, "Location") => [String]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user