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.
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;
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();