貨物我有這樣的:板條箱出口,但 「使用」 拋出編譯錯誤
postgres = "0.11.7"
而在一個子模塊* .RS
extern crate postgres;
use postgres::{Connection, Error, FromSql, SslMode};
use postgres::Result as PgResult;
而且編譯錯誤:
error: unresolved import `postgres::Connection`. Did you mean `self::postgres`? [E0432]
unresolved import `postgres::Error`. Did you mean `self::postgres`? [E0432]
error: unresolved import `postgres::SslMode`. Did you mean `self::postgres`? [E0432]
和類似的。
你把'extern crate postgres;'放在'lib.rs'或'main.rs'中了嗎? –