rust/tests/rustdoc-ui/issues/issue-105742.rs

67 lines
3.0 KiB
Rust
Raw Normal View History

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>) {
//~^ 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`
//~| 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,
//~^ expected 1 lifetime argument
2023-03-30 08:46:34 -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`
//~| missing generics for associated type `SVec::Item`
//~| missing generics for associated type `SVec::Item`
2023-10-31 08:58:03 -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,
//~^ expected 1 lifetime argument
//~| expected 1 generic argument
2023-03-30 08:46:34 -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`
//~| missing generics for associated type `SVec::Item`
//~| missing generics for associated type `SVec::Item`
2023-10-31 08:58:03 -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,
//~^ expected 1 lifetime argument
//~| expected 1 generic argument
2023-03-30 08:46:34 -05:00
//~| expected 1 lifetime 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`
//~| 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`
//~| missing generics for associated type `SVec::Item`
//~| missing generics for associated type `SVec::Item`
2023-10-31 08:58:03 -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-01-02 07:29:38 -06:00
> {
type Item<'a, T>;
fn len(&self) -> <Self as SVec>::Item;
//~^ 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
}