]> git.proxmox.com Git - rustc.git/blame - src/test/ui/on-unimplemented/on-trait.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / on-unimplemented / on-trait.stderr
CommitLineData
041b39d2 1error[E0277]: the trait bound `std::option::Option<std::vec::Vec<u8>>: MyFromIterator<&u8>` is not satisfied
0731742a 2 --> $DIR/on-trait.rs:28:30
041b39d2 3 |
e1599b0c 4LL | fn collect<A, I: Iterator<Item=A>, B: MyFromIterator<A>>(it: I) -> B {
ba9703b0 5 | ----------------- required by this bound in `collect`
e1599b0c 6...
0531ce1d 7LL | let y: Option<Vec<u8>> = collect(x.iter()); // this should give approximately the same error for x.iter().collect()
041b39d2
XL
8 | ^^^^^^^ a collection of type `std::option::Option<std::vec::Vec<u8>>` cannot be built from an iterator over elements of type `&u8`
9 |
10 = help: the trait `MyFromIterator<&u8>` is not implemented for `std::option::Option<std::vec::Vec<u8>>`
041b39d2
XL
11
12error[E0277]: the trait bound `std::string::String: Bar::Foo<u8, _, u32>` is not satisfied
0731742a 13 --> $DIR/on-trait.rs:31:21
041b39d2 14 |
e1599b0c 15LL | fn foobar<U: Clone, T: Foo<u8, U, u32>>() -> T {
ba9703b0 16 | --------------- required by this bound in `foobar`
e1599b0c 17...
532ac7d7 18LL | let x: String = foobar();
041b39d2
XL
19 | ^^^^^^ test error `std::string::String` with `u8` `_` `u32` in `Bar::Foo`
20 |
21 = help: the trait `Bar::Foo<u8, _, u32>` is not implemented for `std::string::String`
041b39d2
XL
22
23error: aborting due to 2 previous errors
24
0531ce1d 25For more information about this error, try `rustc --explain E0277`.