pub fn filestem(&self) -> String {
format!("{}{}", self.out_filestem, self.extra)
}
-
- pub fn contains_path(&self, input_path: &PathBuf) -> bool {
- let input_path = input_path.canonicalize().ok();
- if input_path.is_none() {
- return false
- }
- match self.single_output_file {
- Some(ref output_path) => output_path.canonicalize().ok() == input_path,
- None => {
- for k in self.outputs.keys() {
- let output_path = self.path(k.to_owned());
- if output_path.canonicalize().ok() == input_path {
- return true;
- }
- }
- false
- }
- }
- }
}
pub fn host_triple() -> &'static str {
"treat all errors that occur as bugs"),
external_macro_backtrace: bool = (false, parse_bool, [UNTRACKED],
"show macro backtraces even for non-local macros"),
+ teach: bool = (false, parse_bool, [TRACKED],
+ "show extended diagnostic help"),
continue_parse_after_error: bool = (false, parse_bool, [TRACKED],
"attempt to recover from parse errors (experimental)"),
incremental: Option<String> = (None, parse_opt_string, [UNTRACKED],
dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED],
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
themselves"),
+ approximate_suggestions: bool = (false, parse_bool, [UNTRACKED],
+ "include machine-applicability of suggestions in JSON output"),
unpretty: Option<String> = (None, parse_unpretty, [UNTRACKED],
"Present the input source, unstable (and less-pretty) variants;
valid types are any of the types for `--pretty`, as well as:
sp.struct_fatal(&format!("Error loading target specification: {}", e))
.help("Use `--print target-list` for a list of built-in targets")
.emit();
- panic!(FatalError);
+ FatalError.raise();
}
};
"16" => (ast::IntTy::I16, ast::UintTy::U16),
"32" => (ast::IntTy::I32, ast::UintTy::U32),
"64" => (ast::IntTy::I64, ast::UintTy::U64),
- w => panic!(sp.fatal(&format!("target specification was invalid: \
- unrecognized target-pointer-width {}", w))),
+ w => sp.fatal(&format!("target specification was invalid: \
+ unrecognized target-pointer-width {}", w)).raise(),
};
Config {
let mut debugging_opts = build_debugging_options(matches, error_format);
if !debugging_opts.unstable_options && error_format == ErrorOutputType::Json(true) {
- early_error(ErrorOutputType::Json(false),
- "--error-format=pretty-json is unstable");
+ early_error(ErrorOutputType::Json(false), "--error-format=pretty-json is unstable");
}
let mut output_types = BTreeMap::new();