Skip to content

Commit 36d0812

Browse files
committed
Remove sanitizer_runtime attribute
1 parent 78e7eee commit 36d0812

File tree

13 files changed

+2
-43
lines changed

13 files changed

+2
-43
lines changed

src/doc/unstable-book/src/library-features/sanitizer-runtime-lib.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/librustc/query/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,10 +686,6 @@ rustc_queries! {
686686
fatal_cycle
687687
desc { "checking if the crate has_panic_handler" }
688688
}
689-
query is_sanitizer_runtime(_: CrateNum) -> bool {
690-
fatal_cycle
691-
desc { "query a crate is `#![sanitizer_runtime]`" }
692-
}
693689
query is_profiler_runtime(_: CrateNum) -> bool {
694690
fatal_cycle
695691
desc { "query a crate is `#![profiler_runtime]`" }

src/librustc_codegen_ssa/base.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,6 @@ impl CrateInfo {
723723
panic_runtime: None,
724724
compiler_builtins: None,
725725
profiler_runtime: None,
726-
sanitizer_runtime: None,
727726
is_no_builtins: Default::default(),
728727
native_libraries: Default::default(),
729728
used_libraries: tcx.native_libraries(LOCAL_CRATE),
@@ -759,9 +758,6 @@ impl CrateInfo {
759758
if tcx.is_profiler_runtime(cnum) {
760759
info.profiler_runtime = Some(cnum);
761760
}
762-
if tcx.is_sanitizer_runtime(cnum) {
763-
info.sanitizer_runtime = Some(cnum);
764-
}
765761
if tcx.is_no_builtins(cnum) {
766762
info.is_no_builtins.insert(cnum);
767763
}

src/librustc_codegen_ssa/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ pub struct CrateInfo {
122122
pub panic_runtime: Option<CrateNum>,
123123
pub compiler_builtins: Option<CrateNum>,
124124
pub profiler_runtime: Option<CrateNum>,
125-
pub sanitizer_runtime: Option<CrateNum>,
126125
pub is_no_builtins: FxHashSet<CrateNum>,
127126
pub native_libraries: FxHashMap<CrateNum, Lrc<Vec<NativeLibrary>>>,
128127
pub crate_name: FxHashMap<CrateNum, String>,

src/librustc_feature/active.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ declare_features! (
192192
/// Allows using the `unadjusted` ABI; perma-unstable.
193193
(active, abi_unadjusted, "1.16.0", None, None),
194194

195-
/// Allows identifying crates that contain sanitizer runtimes.
196-
(active, sanitizer_runtime, "1.17.0", None, None),
197-
198195
/// Used to identify crates that contain the profiler runtime.
199196
(active, profiler_runtime, "1.18.0", None, None),
200197

src/librustc_feature/builtin_attrs.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,6 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
409409
"the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate \
410410
which contains compiler-rt intrinsics and will never be stable",
411411
),
412-
gated!(
413-
sanitizer_runtime, Whitelisted, template!(Word),
414-
"the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime \
415-
of a sanitizer and will never be stable",
416-
),
417412
gated!(
418413
profiler_runtime, Whitelisted, template!(Word),
419414
"the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate \

src/librustc_feature/removed.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ declare_features! (
7474
(removed, pushpop_unsafe, "1.2.0", None, None, None),
7575
(removed, needs_allocator, "1.4.0", Some(27389), None,
7676
Some("subsumed by `#![feature(allocator_internals)]`")),
77+
/// Allows identifying crates that contain sanitizer runtimes.
78+
(removed, sanitizer_runtime, "1.17.0", None, None, None),
7779
(removed, proc_macro_mod, "1.27.0", Some(54727), None,
7880
Some("subsumed by `#![feature(proc_macro_hygiene)]`")),
7981
(removed, proc_macro_expr, "1.27.0", Some(54727), None,

src/librustc_metadata/rmeta/decoder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,10 +1587,6 @@ impl<'a, 'tcx> CrateMetadata {
15871587
self.root.panic_runtime
15881588
}
15891589

1590-
crate fn is_sanitizer_runtime(&self) -> bool {
1591-
self.root.sanitizer_runtime
1592-
}
1593-
15941590
crate fn is_profiler_runtime(&self) -> bool {
15951591
self.root.profiler_runtime
15961592
}

src/librustc_metadata/rmeta/decoder/cstore_impl.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ provide! { <'tcx> tcx, def_id, other, cdata,
161161
is_compiler_builtins => { cdata.root.compiler_builtins }
162162
has_global_allocator => { cdata.root.has_global_allocator }
163163
has_panic_handler => { cdata.root.has_panic_handler }
164-
is_sanitizer_runtime => { cdata.root.sanitizer_runtime }
165164
is_profiler_runtime => { cdata.root.profiler_runtime }
166165
panic_strategy => { cdata.root.panic_strategy }
167166
extern_crate => {

src/librustc_metadata/rmeta/encoder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ impl<'tcx> EncodeContext<'tcx> {
514514
no_builtins: attr::contains_name(&attrs, sym::no_builtins),
515515
panic_runtime: attr::contains_name(&attrs, sym::panic_runtime),
516516
profiler_runtime: attr::contains_name(&attrs, sym::profiler_runtime),
517-
sanitizer_runtime: attr::contains_name(&attrs, sym::sanitizer_runtime),
518517
symbol_mangling_version: tcx.sess.opts.debugging_opts.symbol_mangling_version,
519518

520519
crate_deps,

src/librustc_metadata/rmeta/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ crate struct CrateRoot<'tcx> {
209209
no_builtins: bool,
210210
panic_runtime: bool,
211211
profiler_runtime: bool,
212-
sanitizer_runtime: bool,
213212
symbol_mangling_version: SymbolManglingVersion,
214213
}
215214

src/test/ui/feature-gates/feature-gate-sanitizer-runtime.rs

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/test/ui/feature-gates/feature-gate-sanitizer-runtime.stderr

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)