Auto merge of #87250 - robojumper:87199-sized-relaxation, r=nikomatsakis

Fix implicit Sized relaxation when attempting to relax other, unsupported trait

Fixes #87199.

Do note that this bug fix causes code like the `ref_arg::<[i32]>(&[5]);` line in the test case in combination with an affected function to no longer compile.
This commit is contained in:
bors
2021-07-22 05:02:50 +00:00
3 changed files with 57 additions and 0 deletions
+1
View File
@@ -838,6 +838,7 @@ pub fn is_unsized(&self, ast_bounds: &[hir::GenericBound<'_>], span: Span) -> bo
this does nothing because the given bound is not \
a default; only `?Sized` is supported",
);
return false;
}
}
}