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,45 +1,45 @@
|
||||
use method::Method;
|
||||
|
||||
header! {
|
||||
#[doc="`Access-Control-Allow-Methods` header, part of"]
|
||||
#[doc="[CORS](http://www.w3.org/TR/cors/#access-control-allow-methods-response-header)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Access-Control-Allow-Methods` header indicates, as part of the"]
|
||||
#[doc="response to a preflight request, which methods can be used during the"]
|
||||
#[doc="actual request."]
|
||||
#[doc=""]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Access-Control-Allow-Methods: \"Access-Control-Allow-Methods\" \":\" #Method"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `PUT, DELETE, XMODIFY`"]
|
||||
#[doc=""]
|
||||
#[doc="# Examples"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, AccessControlAllowMethods};"]
|
||||
#[doc="use hyper::method::Method;"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set("]
|
||||
#[doc=" AccessControlAllowMethods(vec![Method::Get])"]
|
||||
#[doc=");"]
|
||||
#[doc="```"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, AccessControlAllowMethods};"]
|
||||
#[doc="use hyper::method::Method;"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set("]
|
||||
#[doc=" AccessControlAllowMethods(vec!["]
|
||||
#[doc=" Method::Get,"]
|
||||
#[doc=" Method::Post,"]
|
||||
#[doc=" Method::Patch,"]
|
||||
#[doc=" Method::Extension(\"COPY\".to_owned()),"]
|
||||
#[doc=" ])"]
|
||||
#[doc=");"]
|
||||
#[doc="```"]
|
||||
/// `Access-Control-Allow-Methods` header, part of
|
||||
/// [CORS](http://www.w3.org/TR/cors/#access-control-allow-methods-response-header)
|
||||
///
|
||||
/// The `Access-Control-Allow-Methods` header indicates, as part of the
|
||||
/// response to a preflight request, which methods can be used during the
|
||||
/// actual request.
|
||||
///
|
||||
/// # ABNF
|
||||
/// ```plain
|
||||
/// Access-Control-Allow-Methods: "Access-Control-Allow-Methods" ":" #Method
|
||||
/// ```
|
||||
///
|
||||
/// # Example values
|
||||
/// * `PUT, DELETE, XMODIFY`
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, AccessControlAllowMethods};
|
||||
/// use hyper::method::Method;
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(
|
||||
/// AccessControlAllowMethods(vec![Method::Get])
|
||||
/// );
|
||||
/// ```
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, AccessControlAllowMethods};
|
||||
/// use hyper::method::Method;
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(
|
||||
/// AccessControlAllowMethods(vec![
|
||||
/// Method::Get,
|
||||
/// Method::Post,
|
||||
/// Method::Patch,
|
||||
/// Method::Extension("COPY".to_owned()),
|
||||
/// ])
|
||||
/// );
|
||||
/// ```
|
||||
(AccessControlAllowMethods, "Access-Control-Allow-Methods") => (Method)*
|
||||
|
||||
test_access_control_allow_methods {
|
||||
|
||||
Reference in New Issue
Block a user