2023-01-02 14:29:38 +01: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 14:14:06 +01: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 15:46:34 +02:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-03-20 14:14:06 +01:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 14:29:38 +01:00
|
|
|
let _ = s;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub trait SVec: Index<
|
|
|
|
<Self as SVec>::Item,
|
2023-03-20 14:14:06 +01:00
|
|
|
//~^ expected 1 lifetime argument
|
2023-03-30 15:46:34 +02:00
|
|
|
//~| expected 1 generic argument
|
2023-03-20 14:14:06 +01: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-01-02 14:29:38 +01:00
|
|
|
Output = <Index<<Self as SVec>::Item,
|
2023-03-20 14:14:06 +01:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| expected 1 generic argument
|
2023-03-30 15:46:34 +02:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-03-20 14:14:06 +01:00
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
|
|
|
//~| missing generics for associated type `SVec::Item`
|
2023-01-02 14:29:38 +01:00
|
|
|
Output = <Self as SVec>::Item> as SVec>::Item,
|
2023-03-20 14:14:06 +01:00
|
|
|
//~^ expected 1 lifetime argument
|
|
|
|
//~| expected 1 generic argument
|
2023-03-30 15:46:34 +02:00
|
|
|
//~| expected 1 lifetime argument
|
2023-03-20 14:14:06 +01: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`
|
|
|
|
//~| 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-01-02 14:29:38 +01:00
|
|
|
> {
|
|
|
|
type Item<'a, T>;
|
|
|
|
|
|
|
|
fn len(&self) -> <Self as SVec>::Item;
|
2023-03-20 14:14:06 +01: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 14:29:38 +01:00
|
|
|
}
|