Skip to content

Commit 3ce0413

Browse files
committed
Unrolled build for #161931 in rollup 162028
Rollup merge of #161931 - JonathanBrouwer:revert-test-entry-point, r=mejrs Revert "Add rustc_test_entrypoint_marker" Reverts #158854 because it caused two beta regressions Revert required some minor solving of conflicts We can think about re-landing it after Fixes #161920 Fixes #161917 cc: @Nadrieril @N1ark @aDotInTheVoid @jdonszelmann
2 parents 9085017 + 9b70ab0 commit 3ce0413

15 files changed

Lines changed: 94 additions & 115 deletions

File tree

compiler/rustc_attr_ir/src/data_structures.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,6 @@ pub enum AttributeKind {
14201420
/// Represents `#[rustc_strict_coherence]`.
14211421
RustcStrictCoherence(Span),
14221422

1423-
/// Represents `#[rustc_test_entrypoint_marker]`
1424-
RustcTestEntrypointMarker,
1425-
14261423
/// Represents `#[rustc_test_marker]`
14271424
RustcTestMarker(Symbol),
14281425

compiler/rustc_attr_ir/src/encode_cross_crate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ impl AttributeKind {
191191
RustcSpecializationTrait => No,
192192
RustcStdInternalSymbol => No,
193193
RustcStrictCoherence(..) => Yes,
194-
RustcTestEntrypointMarker => No,
195194
RustcTestMarker(..) => No,
196195
RustcThenThisWouldNeed(..) => No,
197196
RustcTrivialFieldReads => Yes,

compiler/rustc_attr_parsing/src/attributes/test_attrs.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,3 @@ impl SingleAttributeParser for RustcTestMarkerParser {
214214
Some(AttributeKind::RustcTestMarker(value_str))
215215
}
216216
}
217-
218-
pub(crate) struct RustcTestEntrypointMarkerParser;
219-
220-
impl NoArgsAttributeParser for RustcTestEntrypointMarkerParser {
221-
const PATH: &[Symbol] = &[sym::rustc_test_entrypoint_marker];
222-
const ALLOWED_TARGETS: AllowedTargets<'_> =
223-
AllowedTargets::AllowList(&[Allow(Target::Fn), Allow(Target::Closure)]);
224-
const ON_DUPLICATE: OnDuplicate = OnDuplicate::Warn;
225-
const STABILITY: AttributeStability = unstable!(rustc_attrs);
226-
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcTestEntrypointMarker;
227-
}

compiler/rustc_attr_parsing/src/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ attribute_parsers!(
353353
Single<WithoutArgs<RustcSpecializationTraitParser>>,
354354
Single<WithoutArgs<RustcStdInternalSymbolParser>>,
355355
Single<WithoutArgs<RustcStrictCoherenceParser>>,
356-
Single<WithoutArgs<RustcTestEntrypointMarkerParser>>,
357356
Single<WithoutArgs<RustcTrivialFieldReadsParser>>,
358357
Single<WithoutArgs<SplatParser>>,
359358
Single<WithoutArgs<ThreadLocalParser>>,

compiler/rustc_builtin_macros/src/test.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ use crate::util::{check_builtin_macro_attribute, warn_on_duplicate_attribute};
2323
///
2424
/// We mark item with an inert attribute "rustc_test_marker" which the test generation
2525
/// logic will pick up on.
26-
///
27-
/// The test function also gains a `#[rustc_test_entrypoint_marker]` attribute for tools to pick up
28-
/// on. This behavior is *unstable*.
2926
pub(crate) fn expand_test_case(
3027
ecx: &mut ExtCtxt<'_>,
3128
attr_sp: Span,
@@ -380,12 +377,6 @@ pub(crate) fn expand_test_or_bench(
380377
let test_extern =
381378
cx.item(sp, ast::AttrVec::new(), ast::ItemKind::ExternCrate(None, test_ident));
382379

383-
let item = {
384-
let mut item = item;
385-
item.attrs.push(cx.attr_word(sym::rustc_test_entrypoint_marker, attr_sp));
386-
item
387-
};
388-
389380
debug!("synthetic test item:\n{}\n", pprust::item_to_string(&test_const));
390381

391382
if is_stmt {

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ pub static BUILTIN_ATTRIBUTES: &[Symbol] = &[
362362
sym::prelude_import,
363363
sym::rustc_paren_sugar,
364364
sym::rustc_inherit_overflow_checks,
365-
sym::rustc_test_entrypoint_marker,
366365
sym::rustc_test_marker,
367366
sym::rustc_allow_lifetime_dependent_specialization,
368367
sym::rustc_specialization_trait,

compiler/rustc_passes/src/check_attr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
399399
AttributeKind::RustcSpecializationTrait => (),
400400
AttributeKind::RustcStdInternalSymbol => (),
401401
AttributeKind::RustcStrictCoherence(..) => (),
402-
AttributeKind::RustcTestEntrypointMarker => (),
403402
AttributeKind::RustcTestMarker(..) => (),
404403
AttributeKind::RustcThenThisWouldNeed(..) => (),
405404
AttributeKind::RustcTrivialFieldReads => (),

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,6 @@ symbols! {
18801880
rustc_splat,
18811881
rustc_std_internal_symbol,
18821882
rustc_strict_coherence,
1883-
rustc_test_entrypoint_marker,
18841883
rustc_test_marker,
18851884
rustc_then_this_would_need,
18861885
rustc_trivial_field_reads,

tests/pretty/tests-are-sorted.pp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
testfn: test::StaticTestFn(#[coverage(off)] ||
3131
test::assert_test_result(m_test())),
3232
};
33-
#[rustc_test_entrypoint_marker]
3433
fn m_test() {}
3534

3635
extern crate test;
@@ -56,7 +55,6 @@
5655
test::assert_test_result(z_test())),
5756
};
5857
#[ignore = "not yet implemented"]
59-
#[rustc_test_entrypoint_marker]
6058
fn z_test() {}
6159

6260
extern crate test;
@@ -81,7 +79,6 @@
8179
testfn: test::StaticTestFn(#[coverage(off)] ||
8280
test::assert_test_result(a_test())),
8381
};
84-
#[rustc_test_entrypoint_marker]
8582
fn a_test() {}
8683
#[rustc_main]
8784
#[coverage(off)]

tests/ui-fulldeps/test_entrypoint_attrs.rs

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

0 commit comments

Comments
 (0)