html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![feature(custom_attribute)]
+#![cfg_attr(not(stage0), feature(nll))]
#![allow(unused_attributes)]
#![recursion_limit="256"]
use rustc::hir::map::{Node, NodeTraitItem, NodeImplItem};
use rustc::hir::def_id::{DefId, LOCAL_CRATE};
use rustc::middle::cstore::ExternCrate;
-use rustc::session::config::CrateType::CrateTypeExecutable;
+use rustc::session::config::CrateType;
use rustc::ty::{self, TyCtxt};
use rustc_typeck::hir_ty_to_ty;
result.push(ExternalCrateData {
// FIXME: change file_name field to PathBuf in rls-data
// https://github.com/nrc/rls-data/issues/7
- file_name: SpanUtils::make_path_string(&lo_loc.file.name),
+ file_name: self.span_utils.make_path_string(&lo_loc.file.name),
num: n.as_u32(),
id: GlobalCrateId {
name: self.tcx.crate_name(n).to_string(),
HirDef::SelfTy(..) |
HirDef::Label(..) |
HirDef::Macro(..) |
- HirDef::GlobalAsm(..) |
HirDef::ToolMod |
- HirDef::NonMacroAttr |
+ HirDef::NonMacroAttr(..) |
HirDef::Err => None,
}
}
let executable = sess.crate_types
.borrow()
.iter()
- .any(|ct| *ct == CrateTypeExecutable);
+ .any(|ct| *ct == CrateType::Executable);
let mut out_name = if executable {
"".to_owned()
} else {