2015-08-07 14:59:28 +00:00
|
|
|
// Test that we give suitable error messages when the user attempts to
|
|
|
|
// impl a trait `Trait` for its own object type.
|
|
|
|
|
2024-10-09 21:31:01 +00:00
|
|
|
// If the trait is dyn-incompatible, we give a more tailored message
|
2015-08-07 14:59:28 +00:00
|
|
|
// because we're such schnuckels:
|
2024-10-09 21:31:01 +00:00
|
|
|
trait DynIncompatible { fn eq(&self, other: Self); }
|
|
|
|
impl DynIncompatible for dyn DynIncompatible { }
|
2019-10-26 15:28:02 +00:00
|
|
|
//~^ ERROR E0038
|
2023-10-25 10:49:24 +00:00
|
|
|
//~| ERROR E0046
|
2015-08-07 14:59:28 +00:00
|
|
|
|
|
|
|
fn main() { }
|