Skip to content

Commit

Permalink
Add regression test for rust-lang#105742
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 2, 2023
1 parent 1a94322 commit a167435
Show file tree
Hide file tree
Showing 2 changed files with 425 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/test/rustdoc-ui/issue-105742.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// compile-flags: -Znormalize-docs

use std::ops::Index;

pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
let _ = s;
}

pub trait SVec: Index<
<Self as SVec>::Item,
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
//~^^^^ ERROR
Output = <Index<<Self as SVec>::Item,
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
//~^^^^ ERROR
Output = <Self as SVec>::Item> as SVec>::Item,
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
//~^^^^ ERROR
//~^^^^^ ERROR
//~^^^^^^ ERROR
//~^^^^^^^ ERROR
//~^^^^^^^^ ERROR
> {
type Item<'a, T>;

fn len(&self) -> <Self as SVec>::Item;
//~^ ERROR
//~^^ ERROR
//~^^^ ERROR
//~^^^^ ERROR
}
Loading

0 comments on commit a167435

Please sign in to comment.