rwebserve
rwebserve copied to clipboard
Can't compile by Rust 0.6
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:
pubor
privis meaningless for trait implementations, because the
impl...for...form defines overloads for methods that already exist; remove the
pubor
privsrc/configuration.rs:108:1: 108:5 error: obsolete syntax: pure function src/configuration.rs:108 pure fn to_str() -> ~str ^~~~ note: remove
puresrc/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
&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
&fnor
extern 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 found
request src/connection.rs:26 either::Left(option::Some(move request)) => ^~~~~~~ make: *** [lib] Error 101
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
orpriv
is meaningless for trait implementations, because theimpl...for...
form defines overloads for methods that already exist; remove thepub
orpriv
src/configuration.rs:108:1: 108:5 error: obsolete syntax: pure function src/configuration.rs:108 pure fn to_str() -> ~str ^~~~ note: removepure
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 thanfn@
,fn~
, orfn&
, 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
orextern 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 foundrequest
src/connection.rs:26 either::Left(option::Some(move request)) => ^~~~~~~ make: *** [lib] Error 101— Reply to this email directly or view it on GitHub.