2015-08-07 10:59:28 -04: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 04:31:58 -05:00
|
|
|
trait NotObjectSafe { fn eq(&self, other: Self); }
|
2019-05-28 14:46:13 -04:00
|
|
|
impl NotObjectSafe for dyn NotObjectSafe { }
|
2019-10-26 17:28:02 +02:00
|
|
|
//~^ ERROR E0038
|
2015-08-07 10:59:28 -04:00
|
|
|
|
|
|
|
fn main() { }
|