Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Compiling rust-phonebook v0.1.0 (file:///home/mkpankov/rust-phonebook.finished)
- src/main.rs:120:32: 122:69 error: the trait `for<'r, 'r, 'r> core::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>` is not implemented for the type `[closure@src/main.rs:121:36: 122:68 sdb_:alloc::arc::Arc<std::sync::mutex::Mutex<postgres::Connection>>]` [E0277]
- src/main.rs:120 router.get("/api/v1/records",
- src/main.rs:121 move |req: &mut Request|
- src/main.rs:122 handlers::get_records(sdb_, req));
- src/main.rs:120:32: 122:69 help: run `rustc --explain E0277` to see a detailed explanation
- src/main.rs:126:32: 128:68 error: the trait `for<'r, 'r, 'r> core::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>` is not implemented for the type `[closure@src/main.rs:127:36: 128:67 sdb_:alloc::arc::Arc<std::sync::mutex::Mutex<postgres::Connection>>]` [E0277]
- src/main.rs:126 router.get("/api/v1/records/:id",
- src/main.rs:127 move |req: &mut Request|
- src/main.rs:128 handlers::get_record(sdb_, req));
- src/main.rs:126:32: 128:68 help: run `rustc --explain E0277` to see a detailed explanation
- src/main.rs:132:32: 134:65 error: the trait `for<'r, 'r, 'r> core::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>` is not implemented for the type `[closure@src/main.rs:133:33: 134:64 sdb_:alloc::arc::Arc<std::sync::mutex::Mutex<postgres::Connection>>]` [E0277]
- src/main.rs:132 router.post("/api/v1/records",
- src/main.rs:133 move |req: &mut Request|
- src/main.rs:134 handlers::add_record(sdb_, req));
- src/main.rs:132:32: 134:65 help: run `rustc --explain E0277` to see a detailed explanation
- src/main.rs:138:32: 140:71 error: the trait `for<'r, 'r, 'r> core::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>` is not implemented for the type `[closure@src/main.rs:139:36: 140:70 sdb_:alloc::arc::Arc<std::sync::mutex::Mutex<postgres::Connection>>]` [E0277]
- src/main.rs:138 router.put("/api/v1/records/:id",
- src/main.rs:139 move |req: &mut Request|
- src/main.rs:140 handlers::update_record(sdb_, req));
- src/main.rs:138:32: 140:71 help: run `rustc --explain E0277` to see a detailed explanation
- src/main.rs:144:32: 146:74 error: the trait `for<'r, 'r, 'r> core::ops::Fn<(&'r mut iron::request::Request<'r, 'r>,)>` is not implemented for the type `[closure@src/main.rs:145:39: 146:73 sdb_:alloc::arc::Arc<std::sync::mutex::Mutex<postgres::Connection>>]` [E0277]
- src/main.rs:144 router.delete("/api/v1/records/:id",
- src/main.rs:145 move |req: &mut Request|
- src/main.rs:146 handlers::delete_record(sdb_, req));
- src/main.rs:144:32: 146:74 help: run `rustc --explain E0277` to see a detailed explanation
- src/main.rs:122:36: 122:68 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495]
- src/main.rs:122 handlers::get_records(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:122:36: 122:68 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the block at 122:35...
- src/main.rs:122 handlers::get_records(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:122:64: 122:67 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:122 handlers::get_records(sdb_, req));
- ^~~
- src/main.rs:122:36: 122:68 note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the block at 122:35...
- src/main.rs:122 handlers::get_records(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:122:64: 122:67 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:122 handlers::get_records(sdb_, req));
- ^~~
- src/main.rs:128:36: 128:67 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495]
- src/main.rs:128 handlers::get_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:128:36: 128:67 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the block at 128:35...
- src/main.rs:128 handlers::get_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:128:63: 128:66 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:128 handlers::get_record(sdb_, req));
- ^~~
- src/main.rs:128:36: 128:67 note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the block at 128:35...
- src/main.rs:128 handlers::get_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:128:63: 128:66 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:128 handlers::get_record(sdb_, req));
- ^~~
- src/main.rs:134:33: 134:64 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495]
- src/main.rs:134 handlers::add_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:134:33: 134:64 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the block at 134:32...
- src/main.rs:134 handlers::add_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:134:60: 134:63 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:134 handlers::add_record(sdb_, req));
- ^~~
- src/main.rs:134:33: 134:64 note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the block at 134:32...
- src/main.rs:134 handlers::add_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:134:60: 134:63 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:134 handlers::add_record(sdb_, req));
- ^~~
- src/main.rs:140:36: 140:70 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495]
- src/main.rs:140 handlers::update_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:140:36: 140:70 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the block at 140:35...
- src/main.rs:140 handlers::update_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:140:66: 140:69 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:140 handlers::update_record(sdb_, req));
- ^~~
- src/main.rs:140:36: 140:70 note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the block at 140:35...
- src/main.rs:140 handlers::update_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:140:66: 140:69 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:140 handlers::update_record(sdb_, req));
- ^~~
- src/main.rs:146:39: 146:73 error: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflicting requirements [E0495]
- src/main.rs:146 handlers::delete_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:146:39: 146:73 note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the block at 146:38...
- src/main.rs:146 handlers::delete_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:146:69: 146:72 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:146 handlers::delete_record(sdb_, req));
- ^~~
- src/main.rs:146:39: 146:73 note: but, the lifetime must be valid for the anonymous lifetime #3 defined on the block at 146:38...
- src/main.rs:146 handlers::delete_record(sdb_, req));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- src/main.rs:146:69: 146:72 note: ...so that expression is assignable (expected `&mut iron::request::Request<'_, '_>`, found `&mut iron::request::Request<'_, '_>`)
- src/main.rs:146 handlers::delete_record(sdb_, req));
- ^~~
- error: aborting due to 10 previous errors
- Could not compile `rust-phonebook`.
- To learn more, run the command again with --verbose.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement