diff options
| author | bors <bors@rust-lang.org> | 2019-05-22 08:22:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-05-22 08:22:17 +0000 |
| commit | 37ff5d388f8c004ca248adb635f1cc84d347eda0 (patch) | |
| tree | 460137db1b121095313303ae6c78f2698bd15159 /src/liballoc | |
| parent | 1cc822c261f5c94a41eb725755fdda7ca6efbda2 (diff) | |
| parent | ce2ee305f9165c037ecddddb5792588a15ff6c37 (diff) | |
| download | rust-37ff5d388f8c004ca248adb635f1cc84d347eda0.tar.gz rust-37ff5d388f8c004ca248adb635f1cc84d347eda0.zip | |
Auto merge of #59445 - alexreg:ban-multi-trait-objects-via-aliases, r=oli-obk
Ban multi-trait objects via trait aliases Obviously, multi-trait objects are not normally supported, so they should not be supported via trait aliases. This has been factored out from the previous PR https://github.com/rust-lang/rust/pull/55994 (see point 1). r? @Centril CC @nikomatsakis ------------------ ### RELNOTES: We now allow `dyn Send + fmt::Debug` with equivalent semantics to `dyn fmt::Debug + Send`. That is, the order of the mentioned traits does not matter wrt. principal/not-principal traits. This is a small change that might deserve a mention in the blog post because it is a language change but most likely not. See https://github.com/rust-lang/rust/blob/ce2ee305f9165c037ecddddb5792588a15ff6c37/src/test/ui/traits/wf-trait-object-reverse-order.rs. // @Centril
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/slice.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 6eac8487401..8768f1ff081 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -123,12 +123,12 @@ pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut}; //////////////////////////////////////////////////////////////////////////////// // HACK(japaric) needed for the implementation of `vec!` macro during testing -// NB see the hack module in this file for more details +// N.B., see the `hack` module in this file for more details. #[cfg(test)] pub use hack::into_vec; // HACK(japaric) needed for the implementation of `Vec::clone` during testing -// NB see the hack module in this file for more details +// N.B., see the `hack` module in this file for more details. #[cfg(test)] pub use hack::to_vec; @@ -376,7 +376,7 @@ impl<T> [T] { pub fn to_vec(&self) -> Vec<T> where T: Clone { - // NB see hack module in this file + // N.B., see the `hack` module in this file for more details. hack::to_vec(self) } @@ -397,7 +397,7 @@ impl<T> [T] { #[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn into_vec(self: Box<Self>) -> Vec<T> { - // NB see hack module in this file + // N.B., see the `hack` module in this file for more details. hack::into_vec(self) } |
