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,47 +1,47 @@
|
||||
use method::Method;
|
||||
|
||||
header! {
|
||||
#[doc="`Allow` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.1)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Allow` header field lists the set of methods advertised as"]
|
||||
#[doc="supported by the target resource. The purpose of this field is"]
|
||||
#[doc="strictly to inform the recipient of valid request methods associated"]
|
||||
#[doc="with the resource."]
|
||||
#[doc=""]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Allow = #method"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `GET, HEAD, PUT`"]
|
||||
#[doc="* `OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr`"]
|
||||
#[doc="* ``"]
|
||||
#[doc=""]
|
||||
#[doc="# Examples"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Allow};"]
|
||||
#[doc="use hyper::method::Method;"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set("]
|
||||
#[doc=" Allow(vec![Method::Get])"]
|
||||
#[doc=");"]
|
||||
#[doc="```"]
|
||||
#[doc="```"]
|
||||
#[doc="use hyper::header::{Headers, Allow};"]
|
||||
#[doc="use hyper::method::Method;"]
|
||||
#[doc=""]
|
||||
#[doc="let mut headers = Headers::new();"]
|
||||
#[doc="headers.set("]
|
||||
#[doc=" Allow(vec!["]
|
||||
#[doc=" Method::Get,"]
|
||||
#[doc=" Method::Post,"]
|
||||
#[doc=" Method::Patch,"]
|
||||
#[doc=" Method::Extension(\"COPY\".to_owned()),"]
|
||||
#[doc=" ])"]
|
||||
#[doc=");"]
|
||||
#[doc="```"]
|
||||
/// `Allow` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.1)
|
||||
///
|
||||
/// The `Allow` header field lists the set of methods advertised as
|
||||
/// supported by the target resource. The purpose of this field is
|
||||
/// strictly to inform the recipient of valid request methods associated
|
||||
/// with the resource.
|
||||
///
|
||||
/// # ABNF
|
||||
/// ```plain
|
||||
/// Allow = #method
|
||||
/// ```
|
||||
///
|
||||
/// # Example values
|
||||
/// * `GET, HEAD, PUT`
|
||||
/// * `OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr`
|
||||
/// * ``
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, Allow};
|
||||
/// use hyper::method::Method;
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(
|
||||
/// Allow(vec![Method::Get])
|
||||
/// );
|
||||
/// ```
|
||||
/// ```
|
||||
/// use hyper::header::{Headers, Allow};
|
||||
/// use hyper::method::Method;
|
||||
///
|
||||
/// let mut headers = Headers::new();
|
||||
/// headers.set(
|
||||
/// Allow(vec![
|
||||
/// Method::Get,
|
||||
/// Method::Post,
|
||||
/// Method::Patch,
|
||||
/// Method::Extension("COPY".to_owned()),
|
||||
/// ])
|
||||
/// );
|
||||
/// ```
|
||||
(Allow, "Allow") => (Method)*
|
||||
|
||||
test_allow {
|
||||
|
||||
Reference in New Issue
Block a user