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,27 +1,27 @@
|
||||
use method::Method;
|
||||
|
||||
header! {
|
||||
#[doc="`Access-Control-Request-Method` header, part of"]
|
||||
#[doc="[CORS](http://www.w3.org/TR/cors/#access-control-request-method-request-header)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Access-Control-Request-Method` header indicates which method will be"]
|
||||
#[doc="used in the actual request as part of the preflight request."]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `GET`"]
|
||||
#[doc=""]
|
||||
#[doc="# Examples"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, AccessControlRequestMethod};"]
|
||||
#[doc="use hyper::method::Method;"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set(AccessControlRequestMethod(Method::Get));"]
|
||||
#[doc="```"]
|
||||
/// `Access-Control-Request-Method` header, part of
|
||||
/// [CORS](http://www.w3.org/TR/cors/#access-control-request-method-request-header)
|
||||
///
|
||||
/// The `Access-Control-Request-Method` header indicates which method will be
|
||||
/// used in the actual request as part of the preflight request.
|
||||
/// # ABNF
|
||||
/// ```plain
|
||||
/// Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method
|
||||
/// ```
|
||||
///
|
||||
/// # Example values
|
||||
/// * `GET`
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, AccessControlRequestMethod};
|
||||
/// use hyper::method::Method;
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(AccessControlRequestMethod(Method::Get));
|
||||
/// ```
|
||||
(AccessControlRequestMethod, "Access-Control-Request-Method") => [Method]
|
||||
|
||||
test_access_control_request_method {
|
||||
|
||||
Reference in New Issue
Block a user