diff --git a/configure b/configure index 472ffec4..489e52c8 100755 --- a/configure +++ b/configure @@ -25,5 +25,3 @@ git submodule update --init sed -e "s|%PREFIX%|$PREFIX|" \ -e "s|%CONFIGURE_ARGS%|$CONFIGURE_ARGS|" \ < Makefile.in > Makefile - -touch config.stamp diff --git a/src/lib.rs b/src/lib.rs index 4de99e5e..487929e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,14 +55,14 @@ fn main() { ``` */ -#[crate_id="github.com/sfackler/rust-postgres#postgres:0.0"]; -#[crate_type="rlib"]; -#[crate_type="dylib"]; -#[doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")]; +#![crate_id="github.com/sfackler/rust-postgres#postgres:0.0"] +#![crate_type="rlib"] +#![crate_type="dylib"] +#![doc(html_root_url="http://www.rust-ci.org/sfackler/rust-postgres/doc")] -#[warn(missing_doc)]; +#![warn(missing_doc)] -#[feature(macro_rules, struct_variant, phase)]; +#![feature(macro_rules, struct_variant, phase)] extern crate collections; extern crate openssl; @@ -386,7 +386,7 @@ impl Writer for InternalStream { struct InnerPostgresConnection { stream: BufferedStream, next_stmt_id: uint, - notice_handler: ~PostgresNoticeHandler, + notice_handler: ~PostgresNoticeHandler:Send, notifications: RingBuf, cancel_data: PostgresCancelData, unknown_types: HashMap, @@ -436,7 +436,7 @@ impl InnerPostgresConnection { let mut conn = InnerPostgresConnection { stream: BufferedStream::new(stream), next_stmt_id: 0, - notice_handler: ~DefaultNoticeHandler as ~PostgresNoticeHandler, + notice_handler: ~DefaultNoticeHandler, notifications: RingBuf::new(), cancel_data: PostgresCancelData { process_id: 0, secret_key: 0 }, unknown_types: HashMap::new(), @@ -551,8 +551,8 @@ impl InnerPostgresConnection { } } - fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler) - -> ~PostgresNoticeHandler { + fn set_notice_handler(&mut self, handler: ~PostgresNoticeHandler:Send) + -> ~PostgresNoticeHandler:Send { mem::replace(&mut self.notice_handler, handler) } @@ -728,8 +728,8 @@ impl PostgresConnection { } /// Sets the notice handler for the connection, returning the old handler. - pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler) - -> ~PostgresNoticeHandler { + pub fn set_notice_handler(&self, handler: ~PostgresNoticeHandler:Send) + -> ~PostgresNoticeHandler:Send { self.conn.borrow_mut().set_notice_handler(handler) } diff --git a/src/test.rs b/src/test.rs index 5926c3ef..189e6cac 100644 --- a/src/test.rs +++ b/src/test.rs @@ -769,7 +769,7 @@ fn test_custom_notice_handler() { } let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost?client_min_messages=NOTICE", &NoSsl)); - conn.set_notice_handler(~Handler as ~PostgresNoticeHandler); + conn.set_notice_handler(~Handler); or_fail!(conn.execute("CREATE FUNCTION pg_temp.note() RETURNS INT AS $$ BEGIN RAISE NOTICE 'note'; diff --git a/src/types/mod.rs b/src/types/mod.rs index 2fe639ba..a1da14a4 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -1,5 +1,5 @@ //! Traits dealing with Postgres data types -#[macro_escape]; +#![macro_escape] use collections::HashMap; use uuid::Uuid; @@ -73,12 +73,12 @@ static RANGE_LOWER_INCLUSIVE: i8 = 0b0000_0010; static RANGE_EMPTY: i8 = 0b0000_0001; macro_rules! make_postgres_type( - ($($doc:attr $oid:ident => $variant:ident $(member $member:ident)*),+) => ( + ($(#[$doc:meta] $oid:ident => $variant:ident $(member $member:ident)*),+) => ( /// A Postgres type #[deriving(Eq, Clone, Show)] pub enum PostgresType { $( - $doc + #[$doc] $variant, )+ /// An unknown type @@ -504,14 +504,6 @@ impl FromSql for HashMap<~str, Option<~str>> { ret.map(|ok| ok.unwrap()) } } -macro_rules! or_fail( - ($e:expr) => ( - match $e { - Ok(ok) => ok, - Err(err) => fail!("{}", err) - } - ) -) /// A trait for types that can be converted into Postgres values pub trait ToSql { diff --git a/src/types/range.rs b/src/types/range.rs index e51eeaa9..9bf7aa1e 100644 --- a/src/types/range.rs +++ b/src/types/range.rs @@ -1,5 +1,5 @@ //! Types dealing with ranges of values -#[macro_escape]; +#![macro_escape] use std::fmt; use std::i32; diff --git a/submodules/rust-openssl b/submodules/rust-openssl index 761901d0..bf2dadd7 160000 --- a/submodules/rust-openssl +++ b/submodules/rust-openssl @@ -1 +1 @@ -Subproject commit 761901d0e409304450a49d784bae989d125c68b2 +Subproject commit bf2dadd7fba702c9706a457523e049d36ed8f10b diff --git a/submodules/rust-phf b/submodules/rust-phf index 84aa16d1..ab0ea827 160000 --- a/submodules/rust-phf +++ b/submodules/rust-phf @@ -1 +1 @@ -Subproject commit 84aa16d16bdccaafd4246cd00fc92533c00c7551 +Subproject commit ab0ea8271d87768519ef066f80f2d7981c558a17