rwebserve icon indicating copy to clipboard operation
rwebserve copied to clipboard

Can't compile by Rust 0.6

Open zealotous opened this issue 11 years ago • 1 comments

Hi i'm try to compile rwebserve by Rust 0.6 on Debian Wheezy

Error message

rustc --out-dir bin -L bin src/rwebserve.rc src/configuration.rs:106:16: 106:21 error: obsolete syntax: colon-separated impl syntax src/configuration.rs:106 pub impl Body : ToStr ^~~~~ note: write impl Trait for Typesrc/configuration.rs:107:0: 107:1 error: obsolete syntax: visibility-qualified trait implementation src/configuration.rs:107 { ^ note:puborprivis meaningless for trait implementations, because theimpl...for...form defines overloads for methods that already exist; remove thepuborprivsrc/configuration.rs:108:1: 108:5 error: obsolete syntax: pure function src/configuration.rs:108 pure fn to_str() -> ~str ^~~~ note: removepuresrc/configuration.rs:149:31: 149:32 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:149 pub type ResponseHandler = fn~ (config: &Config, request: &Request, response: Response) -> Response; ^ note: Rather thanfn@, fn~, or fn&, write @fn, ~fn, and &fnrespectively src/configuration.rs:149:91: 149:99 error: obsolete syntax: bare function type src/configuration.rs:149 pub type ResponseHandler = fn~ (config: &Config, request: &Request, response: Response) -> Response; ^~~~~~~~ note: use&fnorextern fninstead src/configuration.rs:152:30: 152:31 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:152 pub type IsTemplateFile = fn~ (config: &Config, path: &str) -> bool; ^ src/configuration.rs:152:63: 152:67 error: obsolete syntax: bare function type src/configuration.rs:152 pub type IsTemplateFile = fn~ (config: &Config, path: &str) -> bool; ^~~~ src/configuration.rs:155:26: 155:27 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:155 pub type RsrcLoader = fn~ (path: &Path) -> result::Result<~[u8], ~str>; ^ src/configuration.rs:155:69: 155:70 error: obsolete syntax: bare function type src/configuration.rs:155 pub type RsrcLoader = fn~ (path: &Path) -> result::Result<~[u8], ~str>; ^ src/configuration.rs:158:26: 158:27 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:158 pub type RsrcExists = fn~ (path: &Path) -> bool; ^ src/configuration.rs:158:43: 158:47 error: obsolete syntax: bare function type src/configuration.rs:158 pub type RsrcExists = fn~ (path: &Path) -> bool; ^~~~ src/connection.rs:26:34: 26:41 error: expected,but foundrequest src/connection.rs:26 either::Left(option::Some(move request)) => ^~~~~~~ make: *** [lib] Error 101

zealotous avatar Jun 17 '13 14:06 zealotous

Unfortunately it will be a lot of work to get it to compile with 0.6. I took a stab at it, but I don;'t have as much time for rust as I did before.

-- Jesse

On Jun 17, 2013, at 7:31 AM, zealotous [email protected] wrote:

Hi i'm try to compile rwebserve by Rust 0.6 on Debian Wheezy

Error message

rustc --out-dir bin -L bin src/rwebserve.rc src/configuration.rs:106:16: 106:21 error: obsolete syntax: colon-separated impl syntax src/configuration.rs:106 pub impl Body : ToStr ^~~~~ note: write impl Trait for Type src/configuration.rs:107:0: 107:1 error: obsolete syntax: visibility-qualified trait implementation src/configuration.rs:107 { ^ note: pub or priv is meaningless for trait implementations, because the impl...for... form defines overloads for methods that already exist; remove the pub or priv src/configuration.rs:108:1: 108:5 error: obsolete syntax: pure function src/configuration.rs:108 pure fn to_str() -> ~str ^~~~ note: remove pure src/configuration.rs:149:31: 149:32 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:149 pub type ResponseHandler = fn~ (config: &Config, request: &Request, response: Response) -> Response; ^ note: Rather than fn@, fn~, or fn&, write @fn, ~fn, and &fn respectively src/configuration.rs:149:91: 149:99 error: obsolete syntax: bare function type src/configuration.rs:149 pub type ResponseHandler = fn~ (config: &Config, request: &Request, response: Response) -> Response; ^~~~~~~~ note: use &fn or extern fn instead src/configuration.rs:152:30: 152:31 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:152 pub type IsTemplateFile = fn~ (config: &Config, path: &str) -> bool; ^ src/configuration.rs:152:63: 152:67 error: obsolete syntax: bare function type src/configuration.rs:152 pub type IsTemplateFile = fn~ (config: &Config, path: &str) -> bool; ^~~~ src/configuration.rs:155:26: 155:27 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:155 pub type RsrcLoader = fn~ (path: &Path) -> result::Result<~[u8], ~str>; ^ src/configuration.rs:155:69: 155:70 error: obsolete syntax: bare function type src/configuration.rs:155 pub type RsrcLoader = fn~ (path: &Path) -> result::Result<~[u8], ~str>; ^ src/configuration.rs:158:26: 158:27 error: obsolete syntax: fn sigil in postfix position src/configuration.rs:158 pub type RsrcExists = fn~ (path: &Path) -> bool; ^ src/configuration.rs:158:43: 158:47 error: obsolete syntax: bare function type src/configuration.rs:158 pub type RsrcExists = fn~ (path: &Path) -> bool; ^~~~ src/connection.rs:26:34: 26:41 error: expected , but found request src/connection.rs:26 either::Left(option::Some(move request)) => ^~~~~~~ make: *** [lib] Error 101

— Reply to this email directly or view it on GitHub.

jesse99 avatar Jun 18 '13 00:06 jesse99