Skip to content

Commit 50f6c3e

Browse files
committed
Auto merge of #46745 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests - Successful merges: #46601, #46652, #46690, #46705, #46710, #46728, #46737 - Failed merges:
2 parents 5a0dc2d + b98de5d commit 50f6c3e

File tree

7 files changed

+32
-25
lines changed

7 files changed

+32
-25
lines changed

src/libcore/iter/iterator.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -621,27 +621,24 @@ pub trait Iterator {
621621
/// Basic usage:
622622
///
623623
/// ```
624-
/// let a = ["1", "2", "lol"];
624+
/// let a = ["1", "lol", "3", "NaN", "5"];
625625
///
626626
/// let mut iter = a.iter().filter_map(|s| s.parse().ok());
627627
///
628628
/// assert_eq!(iter.next(), Some(1));
629-
/// assert_eq!(iter.next(), Some(2));
629+
/// assert_eq!(iter.next(), Some(3));
630+
/// assert_eq!(iter.next(), Some(5));
630631
/// assert_eq!(iter.next(), None);
631632
/// ```
632633
///
633634
/// Here's the same example, but with [`filter`] and [`map`]:
634635
///
635636
/// ```
636-
/// let a = ["1", "2", "lol"];
637-
///
638-
/// let mut iter = a.iter()
639-
/// .map(|s| s.parse())
640-
/// .filter(|s| s.is_ok())
641-
/// .map(|s| s.unwrap());
642-
///
637+
/// let a = ["1", "lol", "3", "NaN", "5"];
638+
/// let mut iter = a.iter().map(|s| s.parse()).filter(|s| s.is_ok()).map(|s| s.unwrap());
643639
/// assert_eq!(iter.next(), Some(1));
644-
/// assert_eq!(iter.next(), Some(2));
640+
/// assert_eq!(iter.next(), Some(3));
641+
/// assert_eq!(iter.next(), Some(5));
645642
/// assert_eq!(iter.next(), None);
646643
/// ```
647644
///

src/libcore/ops/deref.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
///
3636
/// For more details, visit [the chapter in *The Rust Programming Language*]
3737
/// [book] as well as the reference sections on [the dereference operator]
38-
/// [ref-deref-op], [the `Deref` trait][ref-deref-trait], and [type coercions].
38+
/// [ref-deref-op], [method resolution] and [type coercions].
3939
///
4040
/// [book]: ../../book/second-edition/ch15-02-deref.html
4141
/// [`DerefMut`]: trait.DerefMut.html
4242
/// [more]: #more-on-deref-coercion
4343
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
44-
/// [ref-deref-trait]: ../../reference/the-deref-trait.html
44+
/// [method resolution]: ../../reference/expressions/method-call-expr.html
4545
/// [type coercions]: ../../reference/type-coercions.html
4646
///
4747
/// # Examples
@@ -122,13 +122,13 @@ impl<'a, T: ?Sized> Deref for &'a mut T {
122122
///
123123
/// For more details, visit [the chapter in *The Rust Programming Language*]
124124
/// [book] as well as the reference sections on [the dereference operator]
125-
/// [ref-deref-op], [the `Deref` trait][ref-deref-trait], and [type coercions].
125+
/// [ref-deref-op], [method resolution] and [type coercions].
126126
///
127127
/// [book]: ../../book/second-edition/ch15-02-deref.html
128128
/// [`Deref`]: trait.Deref.html
129129
/// [more]: #more-on-deref-coercion
130130
/// [ref-deref-op]: ../../reference/expressions/operator-expr.html#the-dereference-operator
131-
/// [ref-deref-trait]: ../../reference/the-deref-trait.html
131+
/// [method resolution]: ../../reference/expressions/method-call-expr.html
132132
/// [type coercions]: ../../reference/type-coercions.html
133133
///
134134
/// # Examples

src/libproc_macro/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,12 @@ impl Span {
265265
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
266266
pub struct LineColumn {
267267
/// The 1-indexed line in the source file on which the span starts or ends (inclusive).
268-
line: usize,
268+
#[unstable(feature = "proc_macro", issue = "38356")]
269+
pub line: usize,
269270
/// The 0-indexed column (in UTF-8 characters) in the source file on which
270271
/// the span starts or ends (inclusive).
271-
column: usize
272+
#[unstable(feature = "proc_macro", issue = "38356")]
273+
pub column: usize
272274
}
273275

274276
/// The source file of a given `Span`.

src/librustc/session/mod.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,13 @@ impl Session {
635635
self.perf_stats.incr_comp_hashes_count.get());
636636
println!("Total number of bytes hashed for incr. comp.: {}",
637637
self.perf_stats.incr_comp_bytes_hashed.get());
638-
println!("Average bytes hashed per incr. comp. HIR node: {}",
639-
self.perf_stats.incr_comp_bytes_hashed.get() /
640-
self.perf_stats.incr_comp_hashes_count.get());
638+
if self.perf_stats.incr_comp_hashes_count.get() != 0 {
639+
println!("Average bytes hashed per incr. comp. HIR node: {}",
640+
self.perf_stats.incr_comp_bytes_hashed.get() /
641+
self.perf_stats.incr_comp_hashes_count.get());
642+
} else {
643+
println!("Average bytes hashed per incr. comp. HIR node: N/A");
644+
}
641645
println!("Total time spent computing symbol hashes: {}",
642646
duration_to_secs_str(self.perf_stats.symbol_hash_time.get()));
643647
println!("Total time spent decoding DefPath tables: {}",

src/librustc_driver/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -810,9 +810,8 @@ impl RustcDefaultCalls {
810810
PrintRequest::TargetCPUs | PrintRequest::TargetFeatures => {
811811
rustc_trans::print(*req, sess);
812812
}
813-
PrintRequest::NativeStaticLibs => {
814-
println!("Native static libs can be printed only during linking");
815-
}
813+
// Any output here interferes with Cargo's parsing of other printed output
814+
PrintRequest::NativeStaticLibs => {}
816815
}
817816
}
818817
return Compilation::Stop;

src/libstd/collections/hash/table.rs

-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ pub struct RawTable<K, V> {
123123
marker: marker::PhantomData<(K, V)>,
124124
}
125125

126-
unsafe impl<K: Send, V: Send> Send for RawTable<K, V> {}
127-
unsafe impl<K: Sync, V: Sync> Sync for RawTable<K, V> {}
128-
129126
// An unsafe view of a RawTable bucket
130127
// Valid indexes are within [0..table_capacity)
131128
pub struct RawBucket<K, V> {

src/rustllvm/PassWrapper.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,19 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
969969
// linkage will stay as external, and internal will stay as internal.
970970
std::set<GlobalValue::GUID> ExportedGUIDs;
971971
for (auto &List : Ret->Index) {
972+
#if LLVM_VERSION_GE(5, 0)
973+
for (auto &GVS: List.second.SummaryList) {
974+
#else
972975
for (auto &GVS: List.second) {
976+
#endif
973977
if (GlobalValue::isLocalLinkage(GVS->linkage()))
974978
continue;
975979
auto GUID = GVS->getOriginalName();
980+
#if LLVM_VERSION_GE(5, 0)
981+
if (GVS->flags().Live)
982+
#else
976983
if (!DeadSymbols.count(GUID))
984+
#endif
977985
ExportedGUIDs.insert(GUID);
978986
}
979987
}

0 commit comments

Comments
 (0)