2023-01-02 07:29:38 -06:00
|
|
|
// compile-flags: -Znormalize-docs
|
|
|
|
use std::ops::Index;
|
|
|
|
|
|
|
|
pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
|
2023-03-20 08:14:06 -05:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| expected 1 generic argument
|
|
|
|
//~| the trait `SVec` cannot be made into an object
|
|
|
|
//~| `SVec` cannot be made into an object
|
2023-03-30 08:46:34 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-03-20 08:14:06 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 07:29:38 -06:00
|
|
|
let _ = s;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub trait SVec: Index<
|
|
|
|
<Self as SVec>::Item,
|
2023-03-20 08:14:06 -05:00
|
|
|
//~^ expected 1 lifetime argument
|
2023-03-30 08:46:34 -05:00
|
|
|
//~| expected 1 generic argument
|
2023-03-20 08:14:06 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-04-18 19:13:53 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 07:29:38 -06:00
|
|
|
Output = <Index<<Self as SVec>::Item,
|
2023-03-20 08:14:06 -05:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| expected 1 generic argument
|
2023-03-30 08:46:34 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-03-20 08:14:06 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-04-18 19:13:53 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 07:29:38 -06:00
|
|
|
Output = <Self as SVec>::Item> as SVec>::Item,
|
2023-03-20 08:14:06 -05:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| expected 1 generic argument
|
2023-03-30 08:46:34 -05:00
|
|
|
//~| expected 1 lifetime argument
|
2023-03-20 08:14:06 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-04-18 19:13:53 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-03-20 08:14:06 -05:00
|
|
|
//~| expected 1 generic argument
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-04-18 19:13:53 -05:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 07:29:38 -06:00
|
|
|
> {
|
|
|
|
type Item<'a, T>;
|
|
|
|
|
|
|
|
fn len(&self) -> <Self as SVec>::Item;
|
2023-03-20 08:14:06 -05:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| expected 1 generic argument
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 07:29:38 -06:00
|
|
|
}
|