diff options
| author | Ivan Petkov <ivanppetkov@gmail.com> | 2015-02-28 23:24:05 -0800 |
|---|---|---|
| committer | Ivan Petkov <ivanppetkov@gmail.com> | 2015-03-02 15:35:48 -0800 |
| commit | 2b03718618d66e7e672663230be1ee857d3fb89a (patch) | |
| tree | a038f2dabb79bf8248a85f6c607b5e83c23f2a99 /src/libcollections | |
| parent | 2ca6eaedae9ec4bff2a63f81f473aba653e46ac5 (diff) | |
| download | rust-2b03718618d66e7e672663230be1ee857d3fb89a.tar.gz rust-2b03718618d66e7e672663230be1ee857d3fb89a.zip | |
Enable recursion for visit_ty in lint visitor
* The lint visitor's visit_ty method did not recurse, and had a reference to the now closed #10894 * The newly enabled recursion has only affected the `deprectated` lint which now detects uses of deprecated items in trait impls and function return types * Renamed some references to `CowString` and `CowVec` to `Cow<str>` and `Cow<[T]>`, respectively, which appear outside of the crate which defines them * Replaced a few instances of `InvariantType<T>` with `PhantomData<Cell<T>>` * Disabled the `deprecated` lint in several places that reference/implement traits on deprecated items which will get cleaned up in the future * Disabled the `exceeding_bitshifts` lint for compile-fail/huge-array-simple test so it doesn't shadow the expected error on 32bit systems * Unfortunately, this means that if a library declares `#![deny(deprecated)]` and marks anything as deprecated, it will have to disable the lint for any uses of said item, e.g. any impl the now deprecated item For any library that denies deprecated items but has deprecated items of its own, this is a [breaking-change]
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/str.rs | 1 | ||||
| -rw-r--r-- | src/libcollections/vec.rs | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 86fcac3e4b8..599b92d05dd 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -756,6 +756,7 @@ pub trait StrExt: Index<RangeFull, Output = str> { /// ``` #[unstable(feature = "collections")] #[deprecated(since = "1.0.0", reason = "use `split()` with a `&str`")] + #[allow(deprecated) /* for SplitStr */] fn split_str<'a, P: Pattern<'a>>(&'a self, pat: P) -> SplitStr<'a, P> { core_str::StrExt::split_str(&self[..], pat) } diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 805e4623396..a4d39974c70 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -1499,9 +1499,9 @@ impl<T> Extend<T> for Vec<T> { __impl_slice_eq1! { Vec<A>, Vec<B> } __impl_slice_eq2! { Vec<A>, &'b [B] } __impl_slice_eq2! { Vec<A>, &'b mut [B] } -__impl_slice_eq2! { CowVec<'a, A>, &'b [B], Clone } -__impl_slice_eq2! { CowVec<'a, A>, &'b mut [B], Clone } -__impl_slice_eq2! { CowVec<'a, A>, Vec<B>, Clone } +__impl_slice_eq2! { Cow<'a, [A]>, &'b [B], Clone } +__impl_slice_eq2! { Cow<'a, [A]>, &'b mut [B], Clone } +__impl_slice_eq2! { Cow<'a, [A]>, Vec<B>, Clone } macro_rules! array_impls { ($($N: expr)+) => { @@ -1510,9 +1510,9 @@ macro_rules! array_impls { __impl_slice_eq2! { Vec<A>, [B; $N] } __impl_slice_eq2! { Vec<A>, &'b [B; $N] } // __impl_slice_eq2! { Vec<A>, &'b mut [B; $N] } - // __impl_slice_eq2! { CowVec<'a, A>, [B; $N], Clone } - // __impl_slice_eq2! { CowVec<'a, A>, &'b [B; $N], Clone } - // __impl_slice_eq2! { CowVec<'a, A>, &'b mut [B; $N], Clone } + // __impl_slice_eq2! { Cow<'a, [A]>, [B; $N], Clone } + // __impl_slice_eq2! { Cow<'a, [A]>, &'b [B; $N], Clone } + // __impl_slice_eq2! { Cow<'a, [A]>, &'b mut [B; $N], Clone } )+ } } |
