canndrew / error_def

Rust syntax extension for generating error-handling boilerplate code.
GNU General Public License v2.0
18 stars 1 forks source link

Error: missing lifetime specifier in examples #2

Closed kc1212 closed 8 years ago

kc1212 commented 8 years ago

Running cargo test --verbose fails with the following error when using rustc 1.10.0-nightly (57ef01513 2016-05-23). I suspect some changes were made in the latest nightly but I didn't find any useful results after a quick search.

   Compiling error_def v0.3.7 (file:///home/kc1212/rustcode/error_def)
     Running `rustc examples/example.rs --crate-name example --crate-type bin -g --out-dir /home/kc1212/rustcode/error_def/target/debug/examples --emit=dep-info,link -L dependency=/home/kc1212/rustcode/error_def/target/debug -L dependency=/home/kc1212/rustcode/error_def/target/debug/deps --extern error_def=/home/kc1212/rustcode/error_def/target/debug/liberror_def.so`
examples/example.rs:1:1: 1:1 error: missing lifetime specifier [E0106]
examples/example.rs:1 #![feature(plugin)]
                      ^
examples/example.rs:7:1: 21:2 note: in this expansion of error_def! (defined in examples/example.rs)
examples/example.rs:1:1: 1:1 help: run `rustc --explain E0106` to see a detailed explanation
examples/example.rs:1:1: 1:1 help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
examples/example.rs:1:1: 1:1 help: consider giving it a 'static lifetime
examples/example.rs:1:1: 1:1 error: missing lifetime specifier [E0106]
examples/example.rs:1 #![feature(plugin)]
                      ^
examples/example.rs:7:1: 21:2 note: in this expansion of error_def! (defined in examples/example.rs)
examples/example.rs:1:1: 1:1 help: run `rustc --explain E0106` to see a detailed explanation
examples/example.rs:1:1: 1:1 help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
examples/example.rs:1:1: 1:1 help: consider giving it a 'static lifetime
error: aborting due to 2 previous errors
error: Could not compile `error_def`.

Caused by:
  Process didn't exit successfully: `rustc examples/example.rs --crate-name example --crate-type bin -g --out-dir /home/kc1212/rustcode/error_def/target/debug/examples --emit=dep-info,link -L dependency=/home/kc1212/rustcode/error_def/target/debug -L dependency=/home/kc1212/rustcode/error_def/target/debug/deps --extern error_def=/home/kc1212/rustcode/error_def/target/debug/liberror_def.so` (exit code: 101)
kc1212 commented 8 years ago

Works with rustc 1.10.0-nightly (e0fd34bba 2016-05-09)

canndrew commented 8 years ago

Thanks for the report. This seems to be working fine for me on the latest nightly, rustc 1.10.0-nightly (97e3a2401 2016-05-26). Are you still having issues?

kc1212 commented 8 years ago

Using a newer nightly fixed it, thanks!