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.
|
|
|
|
|
2018-12-29 00:11:13 +01:00
|
|
|
// revisions: old re
|
|
|
|
|
|
|
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
|
|
|
|
2015-08-07 10:59:28 -04:00
|
|
|
// 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); }
|
2018-12-29 00:11:13 +01:00
|
|
|
impl NotObjectSafe for NotObjectSafe { }
|
|
|
|
//[old]~^ ERROR E0038
|
|
|
|
//[re]~^^ ERROR E0038
|
2015-08-07 10:59:28 -04:00
|
|
|
|
|
|
|
fn main() { }
|