From badde74100a6e55989811255cf2571fa030832db Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Tue, 20 May 2014 12:12:44 -0700 Subject: [PATCH 1/3] Add slice::MutableCloneableVector to the prelude Every other trait in slice is in the prelude, so it makes sense to provide MutableCloneableVector as well. --- src/libstd/prelude.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index e39d8d34447a4..bd367293db8e3 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -76,10 +76,10 @@ pub use to_str::{ToStr, IntoStr}; pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4}; pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8}; pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12}; -pub use slice::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCloneableVector}; -pub use slice::{OwnedVector}; -pub use slice::{MutableVector, MutableTotalOrdVector, MutableVectorAllocating}; -pub use slice::{Vector, VectorVector, CloneableVector, ImmutableVector}; +pub use slice::{CloneableVector, ImmutableCloneableVector, MutableCloneableVector}; +pub use slice::{ImmutableVector, MutableVector}; +pub use slice::{ImmutableEqVector, ImmutableTotalOrdVector, MutableTotalOrdVector}; +pub use slice::{Vector, VectorVector, OwnedVector, MutableVectorAllocating}; pub use strbuf::StrBuf; pub use vec::Vec; From 229338d6ac6b9252ecdb923ffc1ec0d71e3145d5 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Tue, 20 May 2014 13:24:16 -0700 Subject: [PATCH 2/3] Update rust.vim for the latest prelude/keywords --- src/etc/vim/syntax/rust.vim | 41 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 765096933d1c1..c9ad39a83dc95 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -21,14 +21,13 @@ syn match rustFail "\ Date: Tue, 20 May 2014 14:11:07 -0700 Subject: [PATCH 3/3] vim: Handle box expressions specially Attempt to highlight the placement expression in a `box (expr) foo` expression. Also treat GC as a keyword within the placement expression. This doesn't work correctly for arbitrary expressions. Notably, this makes no attempt at balancing delimiters. I believe handling that will require rewriting the syntax rules to add a region for every pair of delimiters. That may be a desirable thing to do in the end, because we can then rewrite our indent rules based on the syntax and get rid of cindent(), but for the time being, we'll just live with the limitation. --- src/etc/vim/syntax/rust.vim | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index c9ad39a83dc95..29e597589d202 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -18,27 +18,38 @@ syn keyword rustOperator as syn match rustAssert "\