Skip to content

Commit 1d3edc5

Browse files
committed
Rust update: Switched to the new inner macro syntax, with a quick fix for the headers_mod macro
1 parent 83cd488 commit 1d3edc5

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

src/codegen/branchify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[macro_escape];
1+
#![macro_escape]
22

33
use std::str::Chars;
44
use std::io::IoResult;

src/codegen/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#[crate_id = "codegen"];
1+
#![crate_id = "codegen"]
22

3-
#[feature(macro_rules)];
3+
#![feature(macro_rules)]
44

55
extern crate collections;
66

src/examples/client/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[crate_id = "client"];
1+
#![crate_id = "client"]
22

33
extern crate http;
44
use http::client::RequestWriter;

src/examples/server/apache_fake/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! configuration. Potentially useful for a smidgeon of performance comparison, though naturally
33
//! Apache is doing a lot more than this does.
44
5-
#[crate_id = "apache_fake"];
5+
#![crate_id = "apache_fake"]
66

77
extern crate time;
88
extern crate http;

src/examples/server/hello_world/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! A very simple HTTP server which responds with the plain text "Hello, World!" to every request.
22
3-
#[crate_id = "hello_world"];
3+
#![crate_id = "hello_world"]
44

55
extern crate time;
66
extern crate http;

src/examples/server/info/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! A not-quite-trivial HTTP server which responds to requests by showing the request and response
22
//! headers and any other information it has.
33
4-
#[crate_id = "info"];
4+
#![crate_id = "info"]
55

66
extern crate time;
77
extern crate http;

src/examples/server/request_uri/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! This demonstrates some handling of the RequestURI, which has several possibilities and for which
55
//! the correct values depend on the method.
66
7-
#[crate_id = "request_uri"];
7+
#![crate_id = "request_uri"]
88

99
extern crate time;
1010
extern crate http;

src/http/headers/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ mod test {
853853
854854
macro_rules! headers_mod {
855855
{
856-
$attr:attr
856+
#[$attr:meta]
857857
// Not using this because of a "local ambiguity" bug
858858
//$($attrs:attr)*
859859
pub mod $mod_name:ident;
@@ -869,9 +869,9 @@ macro_rules! headers_mod {
869869
} => {
870870
pub mod $mod_name {
871871
//$($attrs;)*
872-
$attr;
872+
#[$attr]
873873
874-
#[allow(unused_imports)];
874+
#[allow(unused_imports)]
875875
use std::vec::Vec;
876876
use std::io::IoResult;
877877
use time;

src/http/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#[crate_id = "http#0.1-pre"];
1+
#![crate_id = "http#0.1-pre"]
22

3-
#[comment = "Rust HTTP server"];
4-
#[license = "MIT/ASL2"];
5-
#[crate_type = "dylib"];
6-
#[crate_type = "rlib"];
3+
#![comment = "Rust HTTP server"]
4+
#![license = "MIT/ASL2"]
5+
#![crate_type = "dylib"]
6+
#![crate_type = "rlib"]
77

8-
#[doc(html_root_url = "http://www.rust-ci.org/chris-morgan/rust-http/doc/")];
8+
#![doc(html_root_url = "http://www.rust-ci.org/chris-morgan/rust-http/doc/")]
99

10-
#[deny(non_camel_case_types)];
10+
#![deny(non_camel_case_types)]
1111
//#[deny(missing_doc)];
1212

13-
#[feature(macro_rules)];
14-
#[feature(phase)];
15-
#[macro_escape];
13+
#![feature(macro_rules)]
14+
#![feature(phase)]
15+
#![macro_escape]
1616

1717
#[phase(syntax, link)] extern crate log;
1818
extern crate url;

0 commit comments

Comments
 (0)