Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1853,7 +1853,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
ty::Placeholder(..) => panic!("Placeholder"),
ty::GeneratorWitness(..) => panic!("GeneratorWitness"),
ty::Infer(..) => panic!("Infer"),
ty::Error(_) => panic!("Error"),
ty::Error(_) => rustc_errors::FatalError.raise(),
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/test/rustdoc-ui/issue-105334.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
impl Vec< br##"*.."## > {}
//~^ ERROR
9 changes: 9 additions & 0 deletions src/test/rustdoc-ui/issue-105334.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0747]: constant provided when a type was expected
--> $DIR/issue-105334.rs:1:11
|
LL | impl Vec< br##"*.."## > {}
| ^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0747`.
4 changes: 4 additions & 0 deletions src/test/rustdoc-ui/issue-105737.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
impl Vec<lol> {}
//~^ ERROR

pub fn lol() {}
12 changes: 12 additions & 0 deletions src/test/rustdoc-ui/issue-105737.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
error[E0747]: constant provided when a type was expected
--> $DIR/issue-105737.rs:1:10
|
LL | impl Vec<lol> {}
| ^^^
|
= help: `lol` is a function item, not a type
= help: function item types cannot be named directly

error: aborting due to previous error

For more information about this error, try `rustc --explain E0747`.
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