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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
2.5 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-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-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-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
}