]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl_trait_projections.stderr
Use assert_eq! in copy_from_slice
[rust.git] / src / test / ui / impl_trait_projections.stderr
1 error[E0667]: `impl Trait` is not allowed in path parameters
2   --> $DIR/impl_trait_projections.rs:21:51
3    |
4 LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
5    |                                                   ^^^^^^^^^^^^^
6
7 error[E0667]: `impl Trait` is not allowed in path parameters
8   --> $DIR/impl_trait_projections.rs:28:9
9    |
10 LL |     -> <impl Iterator as Iterator>::Item
11    |         ^^^^^^^^^^^^^
12
13 error[E0667]: `impl Trait` is not allowed in path parameters
14   --> $DIR/impl_trait_projections.rs:35:27
15    |
16 LL |     -> <::std::ops::Range<impl Debug> as Iterator>::Item
17    |                           ^^^^^^^^^^
18
19 error[E0667]: `impl Trait` is not allowed in path parameters
20   --> $DIR/impl_trait_projections.rs:43:29
21    |
22 LL |     -> <dyn Iterator<Item = impl Debug> as Iterator>::Item
23    |                             ^^^^^^^^^^
24
25 error[E0223]: ambiguous associated type
26   --> $DIR/impl_trait_projections.rs:21:50
27    |
28 LL | fn projection_is_disallowed(x: impl Iterator) -> <impl Iterator>::Item {
29    |                                                  ^^^^^^^^^^^^^^^^^^^^^ ambiguous associated type
30    |
31    = note: specify the type using the syntax `<impl std::iter::Iterator as Trait>::Item`
32
33 error[E0277]: the trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
34   --> $DIR/impl_trait_projections.rs:38:1
35    |
36 LL | / { //~ ERROR trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
37 LL | |     (1i32..100).next().unwrap() //~ ERROR mismatched types
38 LL | | }
39    | |_^ the trait `std::iter::Step` is not implemented for `impl std::fmt::Debug`
40    |
41    = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::Range<impl std::fmt::Debug>`
42
43 error[E0308]: mismatched types
44   --> $DIR/impl_trait_projections.rs:39:5
45    |
46 LL |     (1i32..100).next().unwrap() //~ ERROR mismatched types
47    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected anonymized type, found i32
48    |
49    = note: expected type `impl std::fmt::Debug`
50               found type `i32`
51
52 error[E0277]: the trait bound `impl std::fmt::Debug: std::iter::Step` is not satisfied
53   --> $DIR/impl_trait_projections.rs:35:8
54    |
55 LL |     -> <::std::ops::Range<impl Debug> as Iterator>::Item
56    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::iter::Step` is not implemented for `impl std::fmt::Debug`
57    |
58    = note: required because of the requirements on the impl of `std::iter::Iterator` for `std::ops::Range<impl std::fmt::Debug>`
59
60 error: aborting due to 8 previous errors
61
62 Some errors occurred: E0223, E0277, E0308, E0667.
63 For more information about an error, try `rustc --explain E0223`.