Skip to content

Commit

Permalink
Make built-in derives opaque macros
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed Aug 17, 2019
1 parent 497b502 commit 6ee60af
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn main() {
let mut new = None;
if let Some(current_as_str) = args[i].to_str() {
if (&*args[i - 1] == "-C" && current_as_str.starts_with("metadata")) ||
current_as_str.starts_with("-Cmetadata") {
current_as_str.starts_with("-Cmetadata") {
new = Some(format!("{}-{}", current_as_str, s));
}
}
Expand Down Expand Up @@ -89,7 +89,7 @@ fn main() {
if let Some(crate_name) = crate_name {
if let Some(target) = env::var_os("RUSTC_TIME") {
if target == "all" ||
target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name)
target.into_string().unwrap().split(",").any(|c| c.trim() == crate_name)
{
cmd.arg("-Ztime");
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub trait Clone : Sized {

/// Derive macro generating an impl of the trait `Clone`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
pub macro Clone($item:item) { /* compiler built-in */ }
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> {

/// Derive macro generating an impl of the trait `PartialEq`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro PartialEq($item:item) { /* compiler built-in */ }
Expand Down Expand Up @@ -265,7 +265,7 @@ pub trait Eq: PartialEq<Self> {

/// Derive macro generating an impl of the trait `Eq`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_eq)]
pub macro Eq($item:item) { /* compiler built-in */ }
Expand Down Expand Up @@ -616,7 +616,7 @@ pub trait Ord: Eq + PartialOrd<Self> {

/// Derive macro generating an impl of the trait `Ord`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Ord($item:item) { /* compiler built-in */ }
Expand Down Expand Up @@ -865,7 +865,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {

/// Derive macro generating an impl of the trait `PartialOrd`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro PartialOrd($item:item) { /* compiler built-in */ }
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub trait Default: Sized {

/// Derive macro generating an impl of the trait `Default`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Default($item:item) { /* compiler built-in */ }
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ pub trait Debug {
pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Debug`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Debug($item:item) { /* compiler built-in */ }
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ pub trait Hash {
pub(crate) mod macros {
/// Derive macro generating an impl of the trait `Hash`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro Hash($item:item) { /* compiler built-in */ }
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1263,14 +1263,14 @@ pub(crate) mod builtin {

/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics, libstd_sys_internals)]
pub macro RustcDecodable($item:item) { /* compiler built-in */ }

/// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "rust1", since = "1.0.0")]
#[allow_internal_unstable(core_intrinsics)]
pub macro RustcEncodable($item:item) { /* compiler built-in */ }
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub trait Copy : Clone {

/// Derive macro generating an impl of the trait `Copy`.
#[rustc_builtin_macro]
#[rustc_macro_transparency = "semitransparent"]
#[cfg_attr(boostrap_stdarch_ignore_this, rustc_macro_transparency = "semitransparent")]
#[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
#[allow_internal_unstable(core_intrinsics, derive_clone_copy)]
pub macro Copy($item:item) { /* compiler built-in */ }
Expand Down

0 comments on commit 6ee60af

Please sign in to comment.