@@ -71,7 +71,7 @@ fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
71
71
let def_id = trait_ref. def_id ;
72
72
let mut report = None ;
73
73
ty:: each_attr ( infcx. tcx , def_id, |item| {
74
- if item. check_name ( "on_unimplemented " ) {
74
+ if item. check_name ( "rustc_on_unimplemented " ) {
75
75
let err_sp = if item. meta ( ) . span == DUMMY_SP {
76
76
span
77
77
} else {
@@ -99,7 +99,8 @@ fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
99
99
None => {
100
100
infcx. tcx . sess
101
101
. span_err ( err_sp,
102
- format ! ( "the #[on_unimplemented] attribute on \
102
+ format ! ( "the #[rustc_on_unimplemented] \
103
+ attribute on \
103
104
trait definition for {} refers to \
104
105
non-existent type parameter {}",
105
106
trait_str, s)
@@ -111,10 +112,12 @@ fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
111
112
_ => {
112
113
infcx. tcx . sess
113
114
. span_err ( err_sp,
114
- format ! ( "the #[on_unimplemented] attribute on \
115
+ format ! ( "the #[rustc_on_unimplemented] \
116
+ attribute on \
115
117
trait definition for {} must have named \
116
118
format arguments, \
117
- eg `#[on_unimplemented = \" foo {{T}}\" ]`",
119
+ eg `#[rustc_on_unimplemented = \
120
+ \" foo {{T}}\" ]`",
118
121
trait_str) . as_slice ( ) ) ;
119
122
errored = true ;
120
123
None
@@ -128,9 +131,9 @@ fn report_on_unimplemented<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
128
131
}
129
132
} else {
130
133
infcx. tcx . sess . span_err ( err_sp,
131
- format ! ( "the #[on_unimplemented ] attribute on \
134
+ format ! ( "the #[rustc_on_unimplemented ] attribute on \
132
135
trait definition for {} must have a value, \
133
- eg `#[on_unimplemented = \" foo\" ]`",
136
+ eg `#[rustc_on_unimplemented = \" foo\" ]`",
134
137
trait_str) . as_slice ( ) ) ;
135
138
}
136
139
false
@@ -173,7 +176,7 @@ pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
173
176
"the trait `{}` is not implemented for the type `{}`" ,
174
177
trait_ref. user_string( infcx. tcx) ,
175
178
trait_ref. self_ty( ) . user_string( infcx. tcx) ) . as_slice ( ) ) ;
176
- // Check if it has a custom "#[on_unimplemented ]" error message,
179
+ // Check if it has a custom "#[rustc_on_unimplemented ]" error message,
177
180
// report with that message if it does
178
181
let custom_note = report_on_unimplemented ( infcx, & * trait_ref. 0 ,
179
182
obligation. cause . span ) ;
0 commit comments