rust/tests/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs
2023-01-11 09:32:08 +00:00

9 lines
239 B
Rust

// 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() {
}