@@ -46,7 +46,7 @@ fn do_typecheck(cx: &mut Check) {
46
46
match api {
47
47
Api :: Struct ( strct) => check_api_struct ( cx, strct) ,
48
48
Api :: Enum ( enm) => check_api_enum ( cx, enm) ,
49
- Api :: CxxType ( ty ) | Api :: RustType ( ty ) => check_api_type ( cx, ty ) ,
49
+ Api :: CxxType ( ety ) | Api :: RustType ( ety ) => check_api_type ( cx, ety ) ,
50
50
Api :: CxxFunction ( efn) | Api :: RustFunction ( efn) => check_api_fn ( cx, efn) ,
51
51
_ => { }
52
52
}
@@ -207,10 +207,10 @@ fn check_api_enum(cx: &mut Check, enm: &Enum) {
207
207
}
208
208
}
209
209
210
- fn check_api_type ( cx : & mut Check , ty : & ExternType ) {
211
- check_reserved_name ( cx, & ty . ident ) ;
210
+ fn check_api_type ( cx : & mut Check , ety : & ExternType ) {
211
+ check_reserved_name ( cx, & ety . ident ) ;
212
212
213
- if let Some ( reason) = cx. types . required_trivial . get ( & ty . ident ) {
213
+ if let Some ( reason) = cx. types . required_trivial . get ( & ety . ident ) {
214
214
let what = match reason {
215
215
TrivialReason :: StructField ( strct) => format ! ( "a field of `{}`" , strct. ident) ,
216
216
TrivialReason :: FunctionArgument ( efn) => format ! ( "an argument of `{}`" , efn. ident) ,
@@ -220,7 +220,7 @@ fn check_api_type(cx: &mut Check, ty: &ExternType) {
220
220
"needs a cxx::ExternType impl in order to be used as {}" ,
221
221
what,
222
222
) ;
223
- cx. error ( ty , msg) ;
223
+ cx. error ( ety , msg) ;
224
224
}
225
225
}
226
226
0 commit comments