rust/src/test/ui/suggestions/issue-85945-check-where-clause-before-suggesting-unsized.rs

9 lines
238 B
Rust
Raw Normal View History

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