Lines Matching refs:ident
5 error, ident, trivial, Api, Array, Enum, ExternFn, ExternType, Impl, Lang, Lifetimes,
43 ident::check_all(cx, cx.apis); in do_typecheck()
47 Type::Ident(ident) => check_type_ident(cx, ident), in do_typecheck()
83 let ident = &name.rust; in check_type_ident() localVariable
84 if Atom::from(ident).is_none() in check_type_ident()
85 && !cx.types.structs.contains_key(ident) in check_type_ident()
86 && !cx.types.enums.contains_key(ident) in check_type_ident()
87 && !cx.types.cxx.contains(ident) in check_type_ident()
88 && !cx.types.rust.contains(ident) in check_type_ident()
90 let msg = format!("unsupported type: {}", ident); in check_type_ident()
91 cx.error(ident, msg); in check_type_ident()
96 if let Type::Ident(ident) = &ptr.inner { in check_type_box()
97 if cx.types.cxx.contains(&ident.rust) in check_type_box()
98 && !cx.types.aliases.contains_key(&ident.rust) in check_type_box()
99 && !cx.types.structs.contains_key(&ident.rust) in check_type_box()
100 && !cx.types.enums.contains_key(&ident.rust) in check_type_box()
105 if Atom::from(&ident.rust).is_none() { in check_type_box()
115 Type::Ident(ident) => { in check_type_rust_vec()
116 if cx.types.cxx.contains(&ident.rust) in check_type_rust_vec()
117 && !cx.types.aliases.contains_key(&ident.rust) in check_type_rust_vec()
118 && !cx.types.structs.contains_key(&ident.rust) in check_type_rust_vec()
119 && !cx.types.enums.contains_key(&ident.rust) in check_type_rust_vec()
125 match Atom::from(&ident.rust) { in check_type_rust_vec()
140 if let Type::Ident(ident) = &ptr.inner { in check_type_unique_ptr()
141 if cx.types.rust.contains(&ident.rust) { in check_type_unique_ptr()
146 match Atom::from(&ident.rust) { in check_type_unique_ptr()
158 if let Type::Ident(ident) = &ptr.inner { in check_type_shared_ptr()
159 if cx.types.rust.contains(&ident.rust) { in check_type_shared_ptr()
164 match Atom::from(&ident.rust) { in check_type_shared_ptr()
179 if let Type::Ident(ident) = &ptr.inner { in check_type_weak_ptr()
180 if cx.types.rust.contains(&ident.rust) { in check_type_weak_ptr()
185 match Atom::from(&ident.rust) { in check_type_weak_ptr()
200 if let Type::Ident(ident) = &ptr.inner { in check_type_cxx_vector()
201 if cx.types.rust.contains(&ident.rust) { in check_type_cxx_vector()
209 match Atom::from(&ident.rust) { in check_type_cxx_vector()
224 Type::Ident(ident) if ident.rust == CxxString || is_opaque_cxx(cx, &ident.rust) => { in check_type_ref()
225 Some(ident.rust.to_string()) in check_type_ref()
268 Type::Ident(ident) => { in check_type_slice_ref()
269 cx.types.rust.contains(&ident.rust) || cx.types.aliases.contains_key(&ident.rust) in check_type_slice_ref()
277 if let Type::Ident(ident) = &ty.inner { in check_type_slice_ref()
278 if is_opaque_cxx(cx, &ident.rust) { in check_type_slice_ref()
570 Type::Ident(ident) if Atom::from(&ident.rust).is_none() => { in check_mut_return_restriction()
571 match self.cx.types.try_resolve(ident) { in check_mut_return_restriction()
598 fn check_reserved_name(cx: &mut Check, ident: &Ident) { in check_reserved_name()
599 if ident == "Box" in check_reserved_name()
600 || ident == "UniquePtr" in check_reserved_name()
601 || ident == "SharedPtr" in check_reserved_name()
602 || ident == "WeakPtr" in check_reserved_name()
603 || ident == "Vec" in check_reserved_name()
604 || ident == "CxxVector" in check_reserved_name()
605 || ident == "str" in check_reserved_name()
606 || Atom::from(ident).is_some() in check_reserved_name()
608 cx.error(ident, "reserved name"); in check_reserved_name()
613 if lifetime.ident == "static" { in check_reserved_lifetime()
639 Type::Ident(ident) => { in is_unsized()
640 let ident = &ident.rust; in is_unsized() localVariable
641 ident == CxxString || is_opaque_cxx(cx, ident) || cx.types.rust.contains(ident) in is_unsized()
700 Type::Ident(ident) => { in describe()
701 if cx.types.structs.contains_key(&ident.rust) { in describe()
703 } else if cx.types.enums.contains_key(&ident.rust) { in describe()
705 } else if cx.types.aliases.contains_key(&ident.rust) { in describe()
707 } else if cx.types.cxx.contains(&ident.rust) { in describe()
709 } else if cx.types.rust.contains(&ident.rust) { in describe()
711 } else if Atom::from(&ident.rust) == Some(CxxString) { in describe()
713 } else if Atom::from(&ident.rust) == Some(Char) { in describe()
716 ident.rust.to_string() in describe()