summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-03-30 15:14:33 +0800
committerJohn Hodge <tpg@mutabah.net>2018-03-30 15:17:17 +0800
commit522c918b3c687b6c056ad129ad167ab4b36381ee (patch)
tree6bb697daf25c18ac8cbfc0b280090f4197bc65b2 /src
parent20354a7ce66167150c046d3745b02f2501d2f5b3 (diff)
downloadmrust-522c918b3c687b6c056ad129ad167ab4b36381ee.tar.gz
HIR From AST - inline(never)
Diffstat (limited to 'src')
-rw-r--r--src/hir/from_ast.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 760339fe..99408020 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -1206,8 +1206,12 @@ namespace {
bool force_emit = false;
if( const auto* a = attrs.get("inline") )
{
- (void)a;
- force_emit = true;
+ if( a->has_sub_items() && ::std::any_of(a->items().begin(), a->items().end(), [](const auto& v){ return v.name() == "never"; }) ) {
+ // Inline(never)
+ }
+ else {
+ force_emit = true;
+ }
}
::HIR::Linkage linkage;