Skip to content

Commit

Permalink
Auto merge of #48510 - Manishearth:rollup, r=Manishearth
Browse files Browse the repository at this point in the history
Rollup of 15 pull requests

- Successful merges: #47987, #48056, #48061, #48084, #48143, #48185, #48206, #48208, #48232, #48246, #48258, #48317, #48353, #48356, #48402
- Failed merges:
  • Loading branch information
bors committed Feb 24, 2018
2 parents 6070d3e + 34c7929 commit 5cf8839
Show file tree
Hide file tree
Showing 153 changed files with 2,485 additions and 1,375 deletions.
42 changes: 35 additions & 7 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ macro_rules! panic {
($msg:expr) => ({
$crate::panicking::panic(&($msg, file!(), line!(), __rust_unstable_column!()))
});
($fmt:expr, $($arg:tt)*) => ({
($msg:expr,) => (
panic!($msg)
);
($fmt:expr, $($arg:tt)+) => ({
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)*),
&(file!(), line!(), __rust_unstable_column!()))
});
Expand Down Expand Up @@ -79,6 +82,9 @@ macro_rules! assert {
panic!(concat!("assertion failed: ", stringify!($cond)))
}
);
($cond:expr,) => (
assert!($cond)
);
($cond:expr, $($arg:tt)+) => (
if !$cond {
panic!($($arg)+)
Expand Down Expand Up @@ -359,7 +365,8 @@ macro_rules! try {
$crate::result::Result::Err(err) => {
return $crate::result::Result::Err($crate::convert::From::from(err))
}
})
});
($expr:expr,) => (try!($expr));
}

/// Write formatted data into a buffer.
Expand Down Expand Up @@ -456,6 +463,9 @@ macro_rules! writeln {
($dst:expr) => (
write!($dst, "\n")
);
($dst:expr,) => (
writeln!($dst)
);
($dst:expr, $fmt:expr) => (
write!($dst, concat!($fmt, "\n"))
);
Expand Down Expand Up @@ -524,6 +534,9 @@ macro_rules! unreachable {
($msg:expr) => ({
unreachable!("{}", $msg)
});
($msg:expr,) => ({
unreachable!($msg)
});
($fmt:expr, $($arg:tt)*) => ({
panic!(concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
});
Expand Down Expand Up @@ -603,7 +616,10 @@ mod builtin {
#[stable(feature = "compile_error_macro", since = "1.20.0")]
#[macro_export]
#[cfg(dox)]
macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) }
macro_rules! compile_error {
($msg:expr) => ({ /* compiler built-in */ });
($msg:expr,) => ({ /* compiler built-in */ });
}

/// The core macro for formatted string creation & output.
///
Expand Down Expand Up @@ -639,7 +655,10 @@ mod builtin {
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export]
#[cfg(dox)]
macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) }
macro_rules! option_env {
($name:expr) => ({ /* compiler built-in */ });
($name:expr,) => ({ /* compiler built-in */ });
}

/// Concatenate identifiers into one identifier.
///
Expand Down Expand Up @@ -715,7 +734,10 @@ mod builtin {
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export]
#[cfg(dox)]
macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) }
macro_rules! include_str {
($file:expr) => ({ /* compiler built-in */ });
($file:expr,) => ({ /* compiler built-in */ });
}

/// Includes a file as a reference to a byte array.
///
Expand All @@ -725,7 +747,10 @@ mod builtin {
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export]
#[cfg(dox)]
macro_rules! include_bytes { ($file:expr) => ({ /* compiler built-in */ }) }
macro_rules! include_bytes {
($file:expr) => ({ /* compiler built-in */ });
($file:expr,) => ({ /* compiler built-in */ });
}

/// Expands to a string that represents the current module path.
///
Expand Down Expand Up @@ -755,5 +780,8 @@ mod builtin {
#[stable(feature = "rust1", since = "1.0.0")]
#[macro_export]
#[cfg(dox)]
macro_rules! include { ($file:expr) => ({ /* compiler built-in */ }) }
macro_rules! include {
($file:expr) => ({ /* compiler built-in */ });
($file:expr,) => ({ /* compiler built-in */ });
}
}
12 changes: 7 additions & 5 deletions src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ impl DepKind {
}

define_dep_nodes!( <'tcx>
// We use this for most things when incr. comp. is turned off.
[] Null,

// Represents the `Krate` as a whole (the `hir::Krate` value) (as
// distinct from the krate module). This is basically a hash of
// the entire krate, so if you read from `Krate` (e.g., by calling
Expand Down Expand Up @@ -605,8 +608,8 @@ define_dep_nodes!( <'tcx>
[input] MissingExternCrateItem(CrateNum),
[input] UsedCrateSource(CrateNum),
[input] PostorderCnums,
[input] HasCloneClosures(CrateNum),
[input] HasCopyClosures(CrateNum),
[] HasCloneClosures(CrateNum),
[] HasCopyClosures(CrateNum),

// This query is not expected to have inputs -- as a result, it's
// not a good candidate for "replay" because it's essentially a
Expand All @@ -625,13 +628,11 @@ define_dep_nodes!( <'tcx>
[eval_always] CollectAndPartitionTranslationItems,
[] ExportName(DefId),
[] ContainsExternIndicator(DefId),
[] IsTranslatedFunction(DefId),
[] IsTranslatedItem(DefId),
[] CodegenUnit(InternedString),
[] CompileCodegenUnit(InternedString),
[input] OutputFilenames,
[anon] NormalizeTy,
// We use this for most things when incr. comp. is turned off.
[] Null,

[] SubstituteNormalizeAndTestPredicates { key: (DefId, &'tcx Substs<'tcx>) },

Expand All @@ -642,6 +643,7 @@ define_dep_nodes!( <'tcx>

[] GetSymbolExportLevel(DefId),

[input] Features,
);

trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug {
Expand Down
Loading

0 comments on commit 5cf8839

Please sign in to comment.