2015-08-07 09:59:28 -05:00
|
|
|
// Test that we give suitable error messages when the user attempts to
|
|
|
|
// impl a trait `Trait` for its own object type.
|
|
|
|
|
|
|
|
// If the trait is not object-safe, we give a more tailored message
|
|
|
|
// because we're such schnuckels:
|
2015-12-15 03:31:58 -06:00
|
|
|
trait NotObjectSafe { fn eq(&self, other: Self); }
|
2019-05-28 13:46:13 -05:00
|
|
|
impl NotObjectSafe for dyn NotObjectSafe { }
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0038
|
2015-08-07 09:59:28 -05:00
|
|
|
|
|
|
|
fn main() { }
|