diff options
| author | bors <bors@rust-lang.org> | 2020-05-19 08:08:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-05-19 08:08:48 +0000 |
| commit | 914adf04af1c1a984707f778da3d04590c03d144 (patch) | |
| tree | cf43672b28ea604bd6b54ca7712e0001b17c5e2c /src/test/ui/const-generics/array-impls | |
| parent | 5943351d0eb878c1cb5af42b9e85e101d8c58ed7 (diff) | |
| parent | 22efd959109b9a231edbc81a8bc818eaa5763e78 (diff) | |
| download | rust-914adf04af1c1a984707f778da3d04590c03d144.tar.gz rust-914adf04af1c1a984707f778da3d04590c03d144.zip | |
Auto merge of #71447 - cuviper:unsized_cow, r=dtolnay
impl From<Cow> for Box, Rc, and Arc These forward `Borrowed`/`Owned` values to existing `From` impls. - `Box<T>` is a fundamental type, so it would be a breaking change to add a blanket impl. Therefore, `From<Cow>` is only implemented for `[T]`, `str`, `CStr`, `OsStr`, and `Path`. - For `Rc<T>` and `Arc<T>`, `From<Cow>` is implemented for everything that implements `From` the borrowed and owned types separately.
Diffstat (limited to 'src/test/ui/const-generics/array-impls')
| -rw-r--r-- | src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr index bd26c08a8e5..ce1c9ae551e 100644 --- a/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr +++ b/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr @@ -18,7 +18,7 @@ LL | let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice); <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>> <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>> <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>> - and 16 others + and 21 others = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>` = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>` @@ -38,11 +38,11 @@ LL | let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>` | = help: the following implementations were found: + <std::rc::Rc<B> as std::convert::From<std::borrow::Cow<'a, B>>> <std::rc::Rc<T> as std::convert::From<T>> <std::rc::Rc<T> as std::convert::From<std::boxed::Box<T>>> <std::rc::Rc<[T]> as std::convert::From<&[T]>> - <std::rc::Rc<[T]> as std::convert::From<std::vec::Vec<T>>> - and 8 others + and 9 others = note: required because of the requirements on the impl of `std::convert::Into<std::rc::Rc<[i32; 33]>>` for `std::rc::Rc<[i32]>` = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>` @@ -62,11 +62,11 @@ LL | let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>` | = help: the following implementations were found: + <std::sync::Arc<B> as std::convert::From<std::borrow::Cow<'a, B>>> <std::sync::Arc<T> as std::convert::From<T>> <std::sync::Arc<T> as std::convert::From<std::boxed::Box<T>>> <std::sync::Arc<[T]> as std::convert::From<&[T]>> - <std::sync::Arc<[T]> as std::convert::From<std::vec::Vec<T>>> - and 8 others + and 9 others = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[i32; 33]>>` for `std::sync::Arc<[i32]>` = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>` |
