2018-12-29 00:11:13 +01:00
|
|
|
// revisions: old re
|
|
|
|
|
|
|
|
#![cfg_attr(re, feature(re_rebalance_coherence))]
|
2015-01-27 01:07:31 +01:00
|
|
|
#![feature(optin_builtin_traits)]
|
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
auto trait MySafeTrait {}
|
2015-01-27 01:07:31 +01:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
struct Foo;
|
2015-03-11 18:53:55 -05:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
unsafe impl MySafeTrait for Foo {}
|
2018-12-29 00:11:13 +01:00
|
|
|
//[old]~^ ERROR implementing the trait `MySafeTrait` is not unsafe
|
|
|
|
//[re]~^^ ERROR E0199
|
2015-03-11 18:53:55 -05:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
unsafe auto trait MyUnsafeTrait {}
|
2015-03-11 18:53:55 -05:00
|
|
|
|
2017-12-03 10:56:53 -02:00
|
|
|
impl MyUnsafeTrait for Foo {}
|
2018-12-29 00:11:13 +01:00
|
|
|
//[old]~^ ERROR the trait `MyUnsafeTrait` requires an `unsafe impl` declaration
|
|
|
|
//[re]~^^ ERROR E0200
|
2015-03-11 18:53:55 -05:00
|
|
|
|
2015-01-27 01:07:31 +01:00
|
|
|
fn main() {}
|