|
23 | 23 | use driver::session::Session; |
24 | 24 | use metadata::csearch::each_lang_item; |
25 | 25 | use metadata::cstore::iter_crate_data; |
26 | | -use middle::ty::{BuiltinBound, BoundFreeze, BoundSend, BoundSized}; |
| 26 | +use middle::ty::{BuiltinBound, BoundFreeze, BoundPod, BoundSend, BoundSized}; |
27 | 27 | use syntax::ast; |
28 | 28 | use syntax::ast_util::local_def; |
29 | 29 | use syntax::attr::AttrMetaMethods; |
@@ -83,6 +83,8 @@ impl LanguageItems { |
83 | 83 | Some(BoundSend) |
84 | 84 | } else if Some(id) == self.sized_trait() { |
85 | 85 | Some(BoundSized) |
| 86 | + } else if Some(id) == self.pod_trait() { |
| 87 | + Some(BoundPod) |
86 | 88 | } else { |
87 | 89 | None |
88 | 90 | } |
@@ -206,56 +208,58 @@ pub fn collect_language_items(crate: &ast::Crate, |
206 | 208 | } |
207 | 209 |
|
208 | 210 | lets_do_this! { |
209 | | - There are 41 lang items. |
| 211 | + There are 42 lang items. |
210 | 212 |
|
211 | 213 | // ID, Variant name, Name, Method name; |
212 | 214 | 0, FreezeTraitLangItem, "freeze", freeze_trait; |
213 | 215 | 1, SendTraitLangItem, "send", send_trait; |
214 | 216 | 2, SizedTraitLangItem, "sized", sized_trait; |
215 | | - |
216 | | - 3, DropTraitLangItem, "drop", drop_trait; |
217 | | - |
218 | | - 4, AddTraitLangItem, "add", add_trait; |
219 | | - 5, SubTraitLangItem, "sub", sub_trait; |
220 | | - 6, MulTraitLangItem, "mul", mul_trait; |
221 | | - 7, DivTraitLangItem, "div", div_trait; |
222 | | - 8, RemTraitLangItem, "rem", rem_trait; |
223 | | - 9, NegTraitLangItem, "neg", neg_trait; |
224 | | - 10, NotTraitLangItem, "not", not_trait; |
225 | | - 11, BitXorTraitLangItem, "bitxor", bitxor_trait; |
226 | | - 12, BitAndTraitLangItem, "bitand", bitand_trait; |
227 | | - 13, BitOrTraitLangItem, "bitor", bitor_trait; |
228 | | - 14, ShlTraitLangItem, "shl", shl_trait; |
229 | | - 15, ShrTraitLangItem, "shr", shr_trait; |
230 | | - 16, IndexTraitLangItem, "index", index_trait; |
231 | | - |
232 | | - 17, EqTraitLangItem, "eq", eq_trait; |
233 | | - 18, OrdTraitLangItem, "ord", ord_trait; |
234 | | - |
235 | | - 19, StrEqFnLangItem, "str_eq", str_eq_fn; |
236 | | - 20, UniqStrEqFnLangItem, "uniq_str_eq", uniq_str_eq_fn; |
237 | | - 21, FailFnLangItem, "fail_", fail_fn; |
238 | | - 22, FailBoundsCheckFnLangItem, "fail_bounds_check", fail_bounds_check_fn; |
239 | | - 23, ExchangeMallocFnLangItem, "exchange_malloc", exchange_malloc_fn; |
240 | | - 24, ClosureExchangeMallocFnLangItem, "closure_exchange_malloc", closure_exchange_malloc_fn; |
241 | | - 25, ExchangeFreeFnLangItem, "exchange_free", exchange_free_fn; |
242 | | - 26, MallocFnLangItem, "malloc", malloc_fn; |
243 | | - 27, FreeFnLangItem, "free", free_fn; |
244 | | - 28, BorrowAsImmFnLangItem, "borrow_as_imm", borrow_as_imm_fn; |
245 | | - 29, BorrowAsMutFnLangItem, "borrow_as_mut", borrow_as_mut_fn; |
246 | | - 30, ReturnToMutFnLangItem, "return_to_mut", return_to_mut_fn; |
247 | | - 31, CheckNotBorrowedFnLangItem, "check_not_borrowed", check_not_borrowed_fn; |
248 | | - 32, StrDupUniqFnLangItem, "strdup_uniq", strdup_uniq_fn; |
249 | | - 33, RecordBorrowFnLangItem, "record_borrow", record_borrow_fn; |
250 | | - 34, UnrecordBorrowFnLangItem, "unrecord_borrow", unrecord_borrow_fn; |
251 | | - |
252 | | - 35, StartFnLangItem, "start", start_fn; |
253 | | - |
254 | | - 36, TyDescStructLangItem, "ty_desc", ty_desc; |
255 | | - 37, TyVisitorTraitLangItem, "ty_visitor", ty_visitor; |
256 | | - 38, OpaqueStructLangItem, "opaque", opaque; |
257 | | - |
258 | | - 39, EventLoopFactoryLangItem, "event_loop_factory", event_loop_factory; |
259 | | - |
260 | | - 40, TypeIdLangItem, "type_id", type_id; |
| 217 | + 3, PodTraitLangItem, "pod", pod_trait; |
| 218 | + |
| 219 | + 4, DropTraitLangItem, "drop", drop_trait; |
| 220 | + |
| 221 | + 5, AddTraitLangItem, "add", add_trait; |
| 222 | + 6, SubTraitLangItem, "sub", sub_trait; |
| 223 | + 7, MulTraitLangItem, "mul", mul_trait; |
| 224 | + 8, DivTraitLangItem, "div", div_trait; |
| 225 | + 9, RemTraitLangItem, "rem", rem_trait; |
| 226 | + 10, NegTraitLangItem, "neg", neg_trait; |
| 227 | + 11, NotTraitLangItem, "not", not_trait; |
| 228 | + 12, BitXorTraitLangItem, "bitxor", bitxor_trait; |
| 229 | + 13, BitAndTraitLangItem, "bitand", bitand_trait; |
| 230 | + 14, BitOrTraitLangItem, "bitor", bitor_trait; |
| 231 | + 15, ShlTraitLangItem, "shl", shl_trait; |
| 232 | + 16, ShrTraitLangItem, "shr", shr_trait; |
| 233 | + 17, IndexTraitLangItem, "index", index_trait; |
| 234 | + |
| 235 | + 18, EqTraitLangItem, "eq", eq_trait; |
| 236 | + 19, OrdTraitLangItem, "ord", ord_trait; |
| 237 | + |
| 238 | + 20, StrEqFnLangItem, "str_eq", str_eq_fn; |
| 239 | + 21, UniqStrEqFnLangItem, "uniq_str_eq", uniq_str_eq_fn; |
| 240 | + 22, FailFnLangItem, "fail_", fail_fn; |
| 241 | + 23, FailBoundsCheckFnLangItem, "fail_bounds_check", fail_bounds_check_fn; |
| 242 | + 24, ExchangeMallocFnLangItem, "exchange_malloc", exchange_malloc_fn; |
| 243 | + 25, ClosureExchangeMallocFnLangItem, "closure_exchange_malloc", closure_exchange_malloc_fn; |
| 244 | + 26, ExchangeFreeFnLangItem, "exchange_free", exchange_free_fn; |
| 245 | + 27, MallocFnLangItem, "malloc", malloc_fn; |
| 246 | + 28, FreeFnLangItem, "free", free_fn; |
| 247 | + 29, BorrowAsImmFnLangItem, "borrow_as_imm", borrow_as_imm_fn; |
| 248 | + 30, BorrowAsMutFnLangItem, "borrow_as_mut", borrow_as_mut_fn; |
| 249 | + 31, ReturnToMutFnLangItem, "return_to_mut", return_to_mut_fn; |
| 250 | + 32, CheckNotBorrowedFnLangItem, "check_not_borrowed", check_not_borrowed_fn; |
| 251 | + 33, StrDupUniqFnLangItem, "strdup_uniq", strdup_uniq_fn; |
| 252 | + 34, RecordBorrowFnLangItem, "record_borrow", record_borrow_fn; |
| 253 | + 35, UnrecordBorrowFnLangItem, "unrecord_borrow", unrecord_borrow_fn; |
| 254 | + |
| 255 | + 36, StartFnLangItem, "start", start_fn; |
| 256 | + |
| 257 | + 37, TyDescStructLangItem, "ty_desc", ty_desc; |
| 258 | + 38, TyVisitorTraitLangItem, "ty_visitor", ty_visitor; |
| 259 | + 39, OpaqueStructLangItem, "opaque", opaque; |
| 260 | + |
| 261 | + 40, EventLoopFactoryLangItem, "event_loop_factory", event_loop_factory; |
| 262 | + |
| 263 | + 41, TypeIdLangItem, "type_id", type_id; |
261 | 264 | } |
| 265 | + |
0 commit comments