]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_llvm/attributes.rs
Clarify some methods around instance instantiation via comments and clearer names.
[rust.git] / src / librustc_codegen_llvm / attributes.rs
index a7826282314eb553bcf30a2f2e8cdd9fcb779b90..fc1b365cf90ce57cfbeaf1a54a3d8ea83e0df4c8 100644 (file)
@@ -2,7 +2,6 @@
 
 use std::ffi::CString;
 
-use rustc::hir::def_id::{DefId, LOCAL_CRATE};
 use rustc::middle::codegen_fn_attrs::CodegenFnAttrFlags;
 use rustc::session::config::{OptLevel, Sanitizer};
 use rustc::session::Session;
@@ -13,6 +12,7 @@
 use rustc_data_structures::const_cstr;
 use rustc_data_structures::fx::FxHashMap;
 use rustc_data_structures::small_c_str::SmallCStr;
+use rustc_hir::def_id::{DefId, LOCAL_CRATE};
 use rustc_target::abi::call::Conv;
 use rustc_target::spec::PanicStrategy;
 
@@ -246,7 +246,7 @@ pub fn from_fn_attrs(
     }
 
     // FIXME(eddyb) consolidate these two `inline` calls (and avoid overwrites).
-    if instance.def.is_inline(cx.tcx) {
+    if instance.def.requires_inline(cx.tcx) {
         inline(cx, llfn, attributes::InlineAttr::Hint);
     }