]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_codegen_llvm/callee.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / librustc_codegen_llvm / callee.rs
index 04d92142266ee03dec42516620484f3d5a984cf0..9db5c40c8e362df1e74dcd166332b2cae8107ad5 100644 (file)
@@ -12,8 +12,8 @@ use crate::value::Value;
 use log::debug;
 use rustc_codegen_ssa::traits::*;
 
-use rustc::ty::layout::{FnAbiExt, HasTyCtxt};
-use rustc::ty::{Instance, TypeFoldable};
+use rustc_middle::ty::layout::{FnAbiExt, HasTyCtxt};
+use rustc_middle::ty::{Instance, TypeFoldable};
 
 /// Codegens a reference to a fn/method item, monomorphizing and
 /// inlining as it goes.
@@ -29,7 +29,7 @@ pub fn get_fn(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> &'ll Value
 
     assert!(!instance.substs.needs_infer());
     assert!(!instance.substs.has_escaping_bound_vars());
-    assert!(!instance.substs.has_param_types());
+    assert!(!instance.substs.has_param_types_or_consts());
 
     if let Some(&llfn) = cx.instances.borrow().get(&instance) {
         return llfn;
@@ -78,7 +78,7 @@ pub fn get_fn(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> &'ll Value
         let llfn = cx.declare_fn(&sym, &fn_abi);
         debug!("get_fn: not casting pointer!");
 
-        attributes::from_fn_attrs(cx, llfn, instance, &fn_abi);
+        attributes::from_fn_attrs(cx, llfn, instance);
 
         let instance_def_id = instance.def_id();