Skip to content

Commit 877aec0

Browse files
authored
Unrolled build for #150561
Rollup merge of #150561 - semiopaque, r=BoxyUwU Finish transition from `semitransparent` to `semiopaque` for `rustc_macro_transparency` Since it's a bit annoying to have different names for the same thing. My understanding is that this is just internal stuff that is not part of any public API even tough rust-analyzer knows about it. Continuation of - #139084. Discovered while investigating - #150514
2 parents 85d0cdf + 9e00663 commit 877aec0

35 files changed

Lines changed: 75 additions & 76 deletions

File tree

compiler/rustc_arena/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ impl DroplessArena {
618618
/// - Types that are `!Copy` and `Drop`: these must be specified in the
619619
/// arguments. The `TypedArena` will be used for them.
620620
///
621-
#[rustc_macro_transparency = "semitransparent"]
621+
#[rustc_macro_transparency = "semiopaque"]
622622
pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
623623
#[derive(Default)]
624624
pub struct Arena<'tcx> {

compiler/rustc_attr_parsing/src/attributes/transparency.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl<S: Stage> SingleAttributeParser<S> for TransparencyParser {
1515
});
1616
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::MacroDef)]);
1717
const TEMPLATE: AttributeTemplate =
18-
template!(NameValueStr: ["transparent", "semitransparent", "opaque"]);
18+
template!(NameValueStr: ["transparent", "semiopaque", "opaque"]);
1919

2020
fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
2121
let Some(nv) = args.name_value() else {
@@ -24,12 +24,12 @@ impl<S: Stage> SingleAttributeParser<S> for TransparencyParser {
2424
};
2525
match nv.value_as_str() {
2626
Some(sym::transparent) => Some(Transparency::Transparent),
27-
Some(sym::semiopaque | sym::semitransparent) => Some(Transparency::SemiOpaque),
27+
Some(sym::semiopaque) => Some(Transparency::SemiOpaque),
2828
Some(sym::opaque) => Some(Transparency::Opaque),
2929
Some(_) => {
3030
cx.expected_specific_argument_strings(
3131
nv.value_span,
32-
&[sym::transparent, sym::semitransparent, sym::opaque],
32+
&[sym::transparent, sym::semiopaque, sym::opaque],
3333
);
3434
None
3535
}

compiler/rustc_codegen_cranelift/example/mini_core.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -744,43 +744,43 @@ unsafe extern "C" {
744744
pub struct VaList<'a>(&'a mut VaListImpl);
745745

746746
#[rustc_builtin_macro]
747-
#[rustc_macro_transparency = "semitransparent"]
747+
#[rustc_macro_transparency = "semiopaque"]
748748
pub macro stringify($($t:tt)*) {
749749
/* compiler built-in */
750750
}
751751

752752
#[rustc_builtin_macro]
753-
#[rustc_macro_transparency = "semitransparent"]
753+
#[rustc_macro_transparency = "semiopaque"]
754754
pub macro file() {
755755
/* compiler built-in */
756756
}
757757

758758
#[rustc_builtin_macro]
759-
#[rustc_macro_transparency = "semitransparent"]
759+
#[rustc_macro_transparency = "semiopaque"]
760760
pub macro line() {
761761
/* compiler built-in */
762762
}
763763

764764
#[rustc_builtin_macro]
765-
#[rustc_macro_transparency = "semitransparent"]
765+
#[rustc_macro_transparency = "semiopaque"]
766766
pub macro cfg() {
767767
/* compiler built-in */
768768
}
769769

770770
#[rustc_builtin_macro]
771-
#[rustc_macro_transparency = "semitransparent"]
771+
#[rustc_macro_transparency = "semiopaque"]
772772
pub macro asm() {
773773
/* compiler built-in */
774774
}
775775

776776
#[rustc_builtin_macro]
777-
#[rustc_macro_transparency = "semitransparent"]
777+
#[rustc_macro_transparency = "semiopaque"]
778778
pub macro global_asm() {
779779
/* compiler built-in */
780780
}
781781

782782
#[rustc_builtin_macro]
783-
#[rustc_macro_transparency = "semitransparent"]
783+
#[rustc_macro_transparency = "semiopaque"]
784784
pub macro naked_asm() {
785785
/* compiler built-in */
786786
}

compiler/rustc_codegen_cranelift/src/global_asm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ pub(crate) fn compile_global_asm(
233233
#![allow(internal_features)]
234234
#![no_core]
235235
#[rustc_builtin_macro]
236-
#[rustc_macro_transparency = "semitransparent"]
236+
#[rustc_macro_transparency = "semiopaque"]
237237
macro global_asm() { /* compiler built-in */ }
238238
global_asm!(r###"
239239
"####,

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,25 +748,25 @@ extern "C" {
748748
pub struct VaList<'a>(&'a mut VaListImpl);
749749

750750
#[rustc_builtin_macro]
751-
#[rustc_macro_transparency = "semitransparent"]
751+
#[rustc_macro_transparency = "semiopaque"]
752752
pub macro stringify($($t:tt)*) {
753753
/* compiler built-in */
754754
}
755755

756756
#[rustc_builtin_macro]
757-
#[rustc_macro_transparency = "semitransparent"]
757+
#[rustc_macro_transparency = "semiopaque"]
758758
pub macro file() {
759759
/* compiler built-in */
760760
}
761761

762762
#[rustc_builtin_macro]
763-
#[rustc_macro_transparency = "semitransparent"]
763+
#[rustc_macro_transparency = "semiopaque"]
764764
pub macro line() {
765765
/* compiler built-in */
766766
}
767767

768768
#[rustc_builtin_macro]
769-
#[rustc_macro_transparency = "semitransparent"]
769+
#[rustc_macro_transparency = "semiopaque"]
770770
pub macro cfg() {
771771
/* compiler built-in */
772772
}

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2041,7 +2041,6 @@ symbols! {
20412041
self_in_typedefs,
20422042
self_struct_ctor,
20432043
semiopaque,
2044-
semitransparent,
20452044
sha2,
20462045
sha3,
20472046
sha512_sm_x86,

library/core/src/macros/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ macro_rules! assert_ne {
168168
/// ```
169169
#[unstable(feature = "assert_matches", issue = "82775")]
170170
#[allow_internal_unstable(panic_internals)]
171-
#[rustc_macro_transparency = "semitransparent"]
171+
#[rustc_macro_transparency = "semiopaque"]
172172
pub macro assert_matches {
173173
($left:expr, $(|)? $( $pattern:pat_param )|+ $( if $guard: expr )? $(,)?) => {
174174
match $left {
@@ -401,7 +401,7 @@ macro_rules! debug_assert_ne {
401401
/// ```
402402
#[unstable(feature = "assert_matches", issue = "82775")]
403403
#[allow_internal_unstable(assert_matches)]
404-
#[rustc_macro_transparency = "semitransparent"]
404+
#[rustc_macro_transparency = "semiopaque"]
405405
pub macro debug_assert_matches($($arg:tt)*) {
406406
if $crate::cfg!(debug_assertions) {
407407
$crate::assert_matches::assert_matches!($($arg)*);

library/core/src/panic.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::any::Any;
2020
#[unstable(feature = "edition_panic", issue = "none", reason = "use panic!() instead")]
2121
#[allow_internal_unstable(panic_internals, const_format_args)]
2222
#[rustc_diagnostic_item = "core_panic_2015_macro"]
23-
#[rustc_macro_transparency = "semitransparent"]
23+
#[rustc_macro_transparency = "semiopaque"]
2424
pub macro panic_2015 {
2525
() => (
2626
$crate::panicking::panic("explicit panic")
@@ -47,7 +47,7 @@ pub macro panic_2015 {
4747
#[unstable(feature = "edition_panic", issue = "none", reason = "use panic!() instead")]
4848
#[allow_internal_unstable(panic_internals, const_format_args)]
4949
#[rustc_diagnostic_item = "core_panic_2021_macro"]
50-
#[rustc_macro_transparency = "semitransparent"]
50+
#[rustc_macro_transparency = "semiopaque"]
5151
pub macro panic_2021 {
5252
() => (
5353
$crate::panicking::panic("explicit panic")
@@ -67,7 +67,7 @@ pub macro panic_2021 {
6767
#[unstable(feature = "edition_panic", issue = "none", reason = "use unreachable!() instead")]
6868
#[allow_internal_unstable(panic_internals)]
6969
#[rustc_diagnostic_item = "unreachable_2015_macro"]
70-
#[rustc_macro_transparency = "semitransparent"]
70+
#[rustc_macro_transparency = "semiopaque"]
7171
pub macro unreachable_2015 {
7272
() => (
7373
$crate::panicking::panic("internal error: entered unreachable code")
@@ -85,7 +85,7 @@ pub macro unreachable_2015 {
8585
#[doc(hidden)]
8686
#[unstable(feature = "edition_panic", issue = "none", reason = "use unreachable!() instead")]
8787
#[allow_internal_unstable(panic_internals)]
88-
#[rustc_macro_transparency = "semitransparent"]
88+
#[rustc_macro_transparency = "semiopaque"]
8989
pub macro unreachable_2021 {
9090
() => (
9191
$crate::panicking::panic("internal error: entered unreachable code")

library/core/src/pin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ unsafe impl<T: ?Sized> PinCoerceUnsized for *mut T {}
20272027
///
20282028
/// [`Box::pin`]: ../../std/boxed/struct.Box.html#method.pin
20292029
#[stable(feature = "pin_macro", since = "1.68.0")]
2030-
#[rustc_macro_transparency = "semitransparent"]
2030+
#[rustc_macro_transparency = "semiopaque"]
20312031
#[allow_internal_unstable(super_let)]
20322032
#[rustc_diagnostic_item = "pin_macro"]
20332033
// `super` gets removed by rustfmt

library/core/src/ptr/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,7 +2662,7 @@ impl<F: FnPtr> fmt::Debug for F {
26622662
/// same requirements apply to field projections, even inside `addr_of!`. (In particular, it makes
26632663
/// no difference whether the pointer is null or dangling.)
26642664
#[stable(feature = "raw_ref_macros", since = "1.51.0")]
2665-
#[rustc_macro_transparency = "semitransparent"]
2665+
#[rustc_macro_transparency = "semiopaque"]
26662666
pub macro addr_of($place:expr) {
26672667
&raw const $place
26682668
}
@@ -2752,7 +2752,7 @@ pub macro addr_of($place:expr) {
27522752
/// same requirements apply to field projections, even inside `addr_of_mut!`. (In particular, it
27532753
/// makes no difference whether the pointer is null or dangling.)
27542754
#[stable(feature = "raw_ref_macros", since = "1.51.0")]
2755-
#[rustc_macro_transparency = "semitransparent"]
2755+
#[rustc_macro_transparency = "semiopaque"]
27562756
pub macro addr_of_mut($place:expr) {
27572757
&raw mut $place
27582758
}

0 commit comments

Comments
 (0)