/* * MRustC - Rust Compiler * - By John Hodge (Mutabah/thePowersGang) * * synexts/lang_item.cpp * - Binds language items to #[lang_item] tagged items */ #include #include "../common.hpp" #include "../ast/ast.hpp" #include "../ast/crate.hpp" void handle_lang_item(AST::Crate& crate, const AST::Path& path, const ::std::string& name, AST::eItemType type) { if(name == "phantom_fn") { crate.m_lang_item_PhantomFn = AST::Path(path); crate.m_lang_item_PhantomFn.nodes().back().args() = { TypeRef("A"), TypeRef("B") }; } else if( name == "send" ) { // Don't care, Send is fully library in mrustc } else if( name == "sync" ) { // Don't care, Sync is fully library in mrustc } else if( name == "sized" ) { DEBUG("Bind 'sized' to " << path); } else if( name == "copy" ) { DEBUG("Bind 'copy' to " << path); } // ops traits else if( name == "drop" ) { DEBUG("Bind '"<