// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::mem; struct Misc(T); fn check() { // suggest a where-clause, if needed mem::size_of::(); //~^ ERROR the size for value values of type mem::size_of::>(); //~^ ERROR the size for value values of type // ... even if T occurs as a type parameter >::from; //~^ ERROR `u64: std::convert::From` is not satisfied ::Item>>::from; //~^ ERROR `u64: std::convert::From<::Item>` is not satisfied // ... but not if there are inference variables as From>::from; //~^ ERROR `Misc<_>: std::convert::From` is not satisfied // ... and also not if the error is not related to the type mem::size_of::<[T]>(); //~^ ERROR the size for value values of type mem::size_of::<[&U]>(); //~^ ERROR the size for value values of type } fn main() { }