1
Fork 0

Rollup merge of #96086 - jsgf:remove-extern-location, r=davidtwco

Remove `--extern-location` and all associated code

`--extern-location` was an experiment to investigate the best way to
generate useful diagnostics for unused dependency warnings by enabling a
build system to identify the corresponding build config.

While I did successfully use this, I've since been convinced the
alternative `--json unused-externs` mechanism is the way to go, and
there's no point in having two mechanisms with basically the same
functionality.

This effectively reverts https://github.com/rust-lang/rust/pull/72603
This commit is contained in:
Dylan DPC 2022-04-19 14:43:17 +02:00 committed by GitHub
commit 5f10d1312d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 6 additions and 517 deletions

View file

@ -9,7 +9,6 @@ use rustc_ast::{AttrId, Attribute};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_error_messages::MultiSpan;
use rustc_hir::HirId;
use rustc_serialize::json::Json;
use rustc_span::edition::Edition;
use rustc_span::{sym, symbol::Ident, Span, Symbol};
use rustc_target::spec::abi::Abi;
@ -403,13 +402,6 @@ impl<HCX> ToStableHashKey<HCX> for LintId {
}
}
// Duplicated from rustc_session::config::ExternDepSpec to avoid cyclic dependency
#[derive(PartialEq, Debug)]
pub enum ExternDepSpec {
Json(Json),
Raw(String),
}
// This could be a closure, but then implementing derive trait
// becomes hacky (and it gets allocated).
#[derive(Debug)]
@ -428,7 +420,6 @@ pub enum BuiltinLintDiagnostics {
UnusedBuiltinAttribute { attr_name: Symbol, macro_name: String, invoc_span: Span },
PatternsInFnsWithoutBody(Span, Ident),
LegacyDeriveHelpers(Span),
ExternDepSpec(String, ExternDepSpec),
ProcMacroBackCompat(String),
OrPatternsBackCompat(Span, String),
ReservedPrefix(Span),