diff options
Diffstat (limited to 'tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs')
-rw-r--r-- | tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs b/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs new file mode 100644 index 000000000..1a36f6e8e --- /dev/null +++ b/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs @@ -0,0 +1,8 @@ +// Regression test for #85945: Don't suggest `?Sized` bound if an explicit +// `Sized` bound is already in a `where` clause. +fn foo<T>(_: &T) where T: Sized {} +fn bar() { foo(""); } +//~^ ERROR the size for values of type + +pub fn main() { +} |