summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-12-22 21:07:47 +0800
committerJohn Hodge <tpg@mutabah.net>2018-12-22 21:07:47 +0800
commite842fbbc375907b13b69d0f53de6dc3149804c13 (patch)
tree9deb82dabf9289d077316c6f9aa237cfaaa6fa4a /src/hir/from_ast.cpp
parent48c0451b76c6f91ee467d8cac0e0c7fd475c8b46 (diff)
downloadmrust-e842fbbc375907b13b69d0f53de6dc3149804c13.tar.gz
Lang items for 1.29 (allocator traits removed, need to do magic)
Diffstat (limited to 'src/hir/from_ast.cpp')
-rw-r--r--src/hir/from_ast.cpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 40c872fa..1079e981 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1932,25 +1932,28 @@ public:
}
};
// Check for existing defintions of lang items before adding magic ones
- if( rv.m_lang_items.count("boxed_trait") == 0 )
+ if( TARGETVER_1_19 )
{
- rv.m_lang_items.insert(::std::make_pair( ::std::string("boxed_trait"), H::resolve_path(rv, false, {"ops", "Boxed"}) ));
- }
- if( rv.m_lang_items.count("placer_trait") == 0 )
- {
- rv.m_lang_items.insert(::std::make_pair( ::std::string("placer_trait"), H::resolve_path(rv, false, {"ops", "Placer"}) ));
- }
- if( rv.m_lang_items.count("place_trait") == 0 )
- {
- rv.m_lang_items.insert(::std::make_pair( ::std::string("place_trait"), H::resolve_path(rv, false, {"ops", "Place"}) ));
- }
- if( rv.m_lang_items.count("box_place_trait") == 0 )
- {
- rv.m_lang_items.insert(::std::make_pair( ::std::string("box_place_trait"), H::resolve_path(rv, false, {"ops", "BoxPlace"}) ));
- }
- if( rv.m_lang_items.count("in_place_trait") == 0 )
- {
- rv.m_lang_items.insert(::std::make_pair( ::std::string("in_place_trait"), H::resolve_path(rv, false, {"ops", "InPlace"}) ));
+ if( rv.m_lang_items.count("boxed_trait") == 0 )
+ {
+ rv.m_lang_items.insert(::std::make_pair( ::std::string("boxed_trait"), H::resolve_path(rv, false, {"ops", "Boxed"}) ));
+ }
+ if( rv.m_lang_items.count("placer_trait") == 0 )
+ {
+ rv.m_lang_items.insert(::std::make_pair( ::std::string("placer_trait"), H::resolve_path(rv, false, {"ops", "Placer"}) ));
+ }
+ if( rv.m_lang_items.count("place_trait") == 0 )
+ {
+ rv.m_lang_items.insert(::std::make_pair( ::std::string("place_trait"), H::resolve_path(rv, false, {"ops", "Place"}) ));
+ }
+ if( rv.m_lang_items.count("box_place_trait") == 0 )
+ {
+ rv.m_lang_items.insert(::std::make_pair( ::std::string("box_place_trait"), H::resolve_path(rv, false, {"ops", "BoxPlace"}) ));
+ }
+ if( rv.m_lang_items.count("in_place_trait") == 0 )
+ {
+ rv.m_lang_items.insert(::std::make_pair( ::std::string("in_place_trait"), H::resolve_path(rv, false, {"ops", "InPlace"}) ));
+ }
}
}