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
1 change: 0 additions & 1 deletion compiler/rustc_hir_analysis/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,6 @@ fn check_type_alias_type_params_are_used<'tcx>(tcx: TyCtxt<'tcx>, def_id: LocalD
let ty = tcx.type_of(def_id).instantiate_identity();
if ty.references_error() {
// If there is already another error, do not emit an error for not using a type parameter.
assert!(tcx.dcx().has_errors().is_some());
return;
}

Expand Down
5 changes: 0 additions & 5 deletions tests/crashes/135341.rs

This file was deleted.

4 changes: 4 additions & 0 deletions tests/ui/wf/ice-hir-wf-issue-135341.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type A<T> = B;
type B = _; //~ ERROR the placeholder `_` is not allowed within types on item signatures for type aliases

fn main() {}
9 changes: 9 additions & 0 deletions tests/ui/wf/ice-hir-wf-issue-135341.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
--> $DIR/ice-hir-wf-issue-135341.rs:2:10
|
LL | type B = _;
| ^ not allowed in type signatures

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0121`.
Loading