Skip to content

Commit 5cf8839

Browse files
committed
Auto merge of #48510 - Manishearth:rollup, r=Manishearth
Rollup of 15 pull requests - Successful merges: #47987, #48056, #48061, #48084, #48143, #48185, #48206, #48208, #48232, #48246, #48258, #48317, #48353, #48356, #48402 - Failed merges:
2 parents 6070d3e + 34c7929 commit 5cf8839

File tree

153 files changed

+2485
-1375
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+2485
-1375
lines changed

src/libcore/macros.rs

+35-7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ macro_rules! panic {
1919
($msg:expr) => ({
2020
$crate::panicking::panic(&($msg, file!(), line!(), __rust_unstable_column!()))
2121
});
22-
($fmt:expr, $($arg:tt)*) => ({
22+
($msg:expr,) => (
23+
panic!($msg)
24+
);
25+
($fmt:expr, $($arg:tt)+) => ({
2326
$crate::panicking::panic_fmt(format_args!($fmt, $($arg)*),
2427
&(file!(), line!(), __rust_unstable_column!()))
2528
});
@@ -79,6 +82,9 @@ macro_rules! assert {
7982
panic!(concat!("assertion failed: ", stringify!($cond)))
8083
}
8184
);
85+
($cond:expr,) => (
86+
assert!($cond)
87+
);
8288
($cond:expr, $($arg:tt)+) => (
8389
if !$cond {
8490
panic!($($arg)+)
@@ -359,7 +365,8 @@ macro_rules! try {
359365
$crate::result::Result::Err(err) => {
360366
return $crate::result::Result::Err($crate::convert::From::from(err))
361367
}
362-
})
368+
});
369+
($expr:expr,) => (try!($expr));
363370
}
364371

365372
/// Write formatted data into a buffer.
@@ -456,6 +463,9 @@ macro_rules! writeln {
456463
($dst:expr) => (
457464
write!($dst, "\n")
458465
);
466+
($dst:expr,) => (
467+
writeln!($dst)
468+
);
459469
($dst:expr, $fmt:expr) => (
460470
write!($dst, concat!($fmt, "\n"))
461471
);
@@ -524,6 +534,9 @@ macro_rules! unreachable {
524534
($msg:expr) => ({
525535
unreachable!("{}", $msg)
526536
});
537+
($msg:expr,) => ({
538+
unreachable!($msg)
539+
});
527540
($fmt:expr, $($arg:tt)*) => ({
528541
panic!(concat!("internal error: entered unreachable code: ", $fmt), $($arg)*)
529542
});
@@ -603,7 +616,10 @@ mod builtin {
603616
#[stable(feature = "compile_error_macro", since = "1.20.0")]
604617
#[macro_export]
605618
#[cfg(dox)]
606-
macro_rules! compile_error { ($msg:expr) => ({ /* compiler built-in */ }) }
619+
macro_rules! compile_error {
620+
($msg:expr) => ({ /* compiler built-in */ });
621+
($msg:expr,) => ({ /* compiler built-in */ });
622+
}
607623

608624
/// The core macro for formatted string creation & output.
609625
///
@@ -639,7 +655,10 @@ mod builtin {
639655
#[stable(feature = "rust1", since = "1.0.0")]
640656
#[macro_export]
641657
#[cfg(dox)]
642-
macro_rules! option_env { ($name:expr) => ({ /* compiler built-in */ }) }
658+
macro_rules! option_env {
659+
($name:expr) => ({ /* compiler built-in */ });
660+
($name:expr,) => ({ /* compiler built-in */ });
661+
}
643662

644663
/// Concatenate identifiers into one identifier.
645664
///
@@ -715,7 +734,10 @@ mod builtin {
715734
#[stable(feature = "rust1", since = "1.0.0")]
716735
#[macro_export]
717736
#[cfg(dox)]
718-
macro_rules! include_str { ($file:expr) => ({ /* compiler built-in */ }) }
737+
macro_rules! include_str {
738+
($file:expr) => ({ /* compiler built-in */ });
739+
($file:expr,) => ({ /* compiler built-in */ });
740+
}
719741

720742
/// Includes a file as a reference to a byte array.
721743
///
@@ -725,7 +747,10 @@ mod builtin {
725747
#[stable(feature = "rust1", since = "1.0.0")]
726748
#[macro_export]
727749
#[cfg(dox)]
728-
macro_rules! include_bytes { ($file:expr) => ({ /* compiler built-in */ }) }
750+
macro_rules! include_bytes {
751+
($file:expr) => ({ /* compiler built-in */ });
752+
($file:expr,) => ({ /* compiler built-in */ });
753+
}
729754

730755
/// Expands to a string that represents the current module path.
731756
///
@@ -755,5 +780,8 @@ mod builtin {
755780
#[stable(feature = "rust1", since = "1.0.0")]
756781
#[macro_export]
757782
#[cfg(dox)]
758-
macro_rules! include { ($file:expr) => ({ /* compiler built-in */ }) }
783+
macro_rules! include {
784+
($file:expr) => ({ /* compiler built-in */ });
785+
($file:expr,) => ({ /* compiler built-in */ });
786+
}
759787
}

src/librustc/dep_graph/dep_node.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ impl DepKind {
436436
}
437437

438438
define_dep_nodes!( <'tcx>
439+
// We use this for most things when incr. comp. is turned off.
440+
[] Null,
441+
439442
// Represents the `Krate` as a whole (the `hir::Krate` value) (as
440443
// distinct from the krate module). This is basically a hash of
441444
// the entire krate, so if you read from `Krate` (e.g., by calling
@@ -605,8 +608,8 @@ define_dep_nodes!( <'tcx>
605608
[input] MissingExternCrateItem(CrateNum),
606609
[input] UsedCrateSource(CrateNum),
607610
[input] PostorderCnums,
608-
[input] HasCloneClosures(CrateNum),
609-
[input] HasCopyClosures(CrateNum),
611+
[] HasCloneClosures(CrateNum),
612+
[] HasCopyClosures(CrateNum),
610613

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

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

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

643644
[] GetSymbolExportLevel(DefId),
644645

646+
[input] Features,
645647
);
646648

647649
trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug {

0 commit comments

Comments
 (0)