1
Fork 0

Rollup merge of #76641 - nox:pointee-random-stuff, r=eddyb

Some cleanup changes and commenting

r? @nikomatsakis
Cc @eddyb
This commit is contained in:
Ralf Jung 2020-09-16 08:25:00 +02:00 committed by GitHub
commit 0bcc96dd3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 22 deletions

View file

@ -1512,12 +1512,7 @@ impl<'a, 'tcx> InferCtxtPrivExt<'tcx> for InferCtxt<'a, 'tcx> {
// avoid inundating the user with unnecessary errors, but we now
// check upstream for type errors and don't add the obligations to
// begin with in those cases.
if self
.tcx
.lang_items()
.sized_trait()
.map_or(false, |sized_id| sized_id == trait_ref.def_id())
{
if self.tcx.lang_items().sized_trait() == Some(trait_ref.def_id()) {
self.need_type_info_err(body_id, span, self_ty, ErrorCode::E0282).emit();
return;
}