Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rustdoc ICE on bad typedef with mismatching types #106366

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add regression test for #105742
  • Loading branch information
GuillaumeGomez committed Jan 2, 2023
commit a167435b76c1070fa0290e27f7756c9bb5b6548b
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