|
1 | 1 | // compile-flags: -Znormalize-docs |
2 | | - |
3 | 2 | use std::ops::Index; |
4 | 3 |
|
5 | 4 | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) { |
| 5 | + //~^ expected 1 lifetime argument |
| 6 | + //~| expected 1 generic argument |
| 7 | + //~| the trait `SVec` cannot be made into an object |
| 8 | + //~| `SVec` cannot be made into an object |
| 9 | + //~| missing generics for associated type `SVec::Item` |
| 10 | + //~| missing generics for associated type `SVec::Item` |
6 | 11 | let _ = s; |
7 | 12 | } |
8 | 13 |
|
9 | 14 | pub trait SVec: Index< |
10 | 15 | <Self as SVec>::Item, |
| 16 | + //~^ expected 1 lifetime argument |
| 17 | + //~| expected 1 generic argument |
| 18 | + //~| missing generics for associated type `SVec::Item` |
| 19 | + //~| missing generics for associated type `SVec::Item` |
| 20 | + //~| missing generics for associated type `SVec::Item` |
| 21 | + //~| missing generics for associated type `SVec::Item` |
11 | 22 | Output = <Index<<Self as SVec>::Item, |
| 23 | + //~^ expected 1 lifetime argument |
| 24 | + //~| expected 1 generic argument |
| 25 | + //~| missing generics for associated type `SVec::Item` |
| 26 | + //~| missing generics for associated type `SVec::Item` |
| 27 | + //~| missing generics for associated type `SVec::Item` |
| 28 | + //~| missing generics for associated type `SVec::Item` |
12 | 29 | Output = <Self as SVec>::Item> as SVec>::Item, |
| 30 | + //~^ expected 1 lifetime argument |
| 31 | + //~| expected 1 generic argument |
| 32 | + //~| expected 1 lifetime argument |
| 33 | + //~| missing generics for associated type `SVec::Item` |
| 34 | + //~| missing generics for associated type `SVec::Item` |
| 35 | + //~| missing generics for associated type `SVec::Item` |
| 36 | + //~| missing generics for associated type `SVec::Item` |
| 37 | + //~| expected 1 generic argument |
| 38 | + //~| missing generics for associated type `SVec::Item` |
| 39 | + //~| missing generics for associated type `SVec::Item` |
| 40 | + //~| missing generics for associated type `SVec::Item` |
| 41 | + //~| missing generics for associated type `SVec::Item` |
13 | 42 | > { |
14 | 43 | type Item<'a, T>; |
15 | 44 |
|
16 | 45 | fn len(&self) -> <Self as SVec>::Item; |
17 | | - //~^ ERROR |
18 | | - //~^^ ERROR |
| 46 | + //~^ expected 1 lifetime argument |
| 47 | + //~| missing generics for associated type `SVec::Item` |
| 48 | + //~| expected 1 generic argument |
| 49 | + //~| missing generics for associated type `SVec::Item` |
19 | 50 | } |
0 commit comments