Skip to content

Commit

Permalink
Update rust-lang#83739 with type of the item specified
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Jun 21, 2021
1 parent 9b6c7ff commit e66f241
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion compiler/rustc_typeck/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,15 @@ fn convert_item(tcx: TyCtxt<'_>, item_id: hir::ItemId) {
if let hir::TyKind::TraitObject(..) = ty.kind {
let mut visitor = PlaceholderHirTyCollector::default();
visitor.visit_item(it);
placeholder_type_error(tcx, None, &[], visitor.0, false, None);
placeholder_type_error(
tcx,
None,
&[],
visitor.0,
false,
None,
it.kind.descr(),
);
}
}
_ => (),
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/typeck/issue-75889.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0121]: the type placeholder `_` is not allowed within types on item signatures
error[E0121]: the type placeholder `_` is not allowed within types on item signatures for constant items
--> $DIR/issue-75889.rs:3:24
|
LL | const FOO: dyn Fn() -> _ = "";
| ^ not allowed in type signatures

error[E0121]: the type placeholder `_` is not allowed within types on item signatures
error[E0121]: the type placeholder `_` is not allowed within types on item signatures for static items
--> $DIR/issue-75889.rs:4:25
|
LL | static BOO: dyn Fn() -> _ = "";
Expand Down

0 comments on commit e66f241

Please sign in to comment.