Skip to content

Commit 1562034

Browse files
committed
---
yaml --- r: 188407 b: refs/heads/tmp c: a3f2342 h: refs/heads/master i: 188405: 96e708a 188403: 8e790c1 188399: 61f883e v: v3
1 parent c148e7c commit 1562034

File tree

289 files changed

+668
-670
lines changed

Some content is hidden

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

289 files changed

+668
-670
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: eca6dacdc1c2029335675d6c3f93f09097e87e54
37+
refs/heads/tmp: a3f23428298b05d95a3c223826381ae100350344
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/mk/debuggers.mk

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,32 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
5656
tmp/install-debugger-scripts$(1)_H_$(2)-gdb.done: \
5757
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
5858
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
59+
$(Q)touch $$@.start_time
5960
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
6061
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
6162
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(HBIN$(1)_H_$(2))
6263
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
63-
$(Q)touch $$@
64+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
6465

6566
tmp/install-debugger-scripts$(1)_H_$(2)-lldb.done: \
6667
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
6768
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
69+
$(Q)touch $$@.start_time
6870
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
6971
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
7072
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(HBIN$(1)_H_$(2))
7173
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
72-
$(Q)touch $$@
74+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
7375

7476
tmp/install-debugger-scripts$(1)_H_$(2)-all.done: \
7577
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
7678
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
79+
$(Q)touch $$@.start_time
7780
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
7881
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
7982
$(Q)install $$(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(HBIN$(1)_H_$(2))
8083
$(Q)install $$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
81-
$(Q)touch $$@
84+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
8285

8386
tmp/install-debugger-scripts$(1)_H_$(2)-none.done:
8487
$(Q)touch $$@
@@ -98,29 +101,32 @@ define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
98101
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-gdb.done: \
99102
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) \
100103
$$(DEBUGGER_BIN_SCRIPTS_GDB_ABS)
104+
$(Q)touch $$@.start_time
101105
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
102106
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
103107
$(Q)install $(DEBUGGER_BIN_SCRIPTS_GDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
104108
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_GDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
105-
$(Q)touch $$@
109+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
106110

107111
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-lldb.done: \
108112
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) \
109113
$$(DEBUGGER_BIN_SCRIPTS_LLDB_ABS)
114+
$(Q)touch $$@.start_time
110115
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
111116
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
112117
$(Q)install $(DEBUGGER_BIN_SCRIPTS_LLDB_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
113118
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_LLDB_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
114-
$(Q)touch $$@
119+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
115120

116121
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-all.done: \
117122
$$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) \
118123
$$(DEBUGGER_BIN_SCRIPTS_ALL_ABS)
124+
$(Q)touch $$@.start_time
119125
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
120126
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
121127
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ALL_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
122128
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ALL_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
123-
$(Q)touch $$@
129+
$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
124130

125131
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3)-none.done:
126132
$(Q)touch $$@

branches/tmp/mk/llvm.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ endif
3838
# the stamp in the source dir.
3939
$$(LLVM_STAMP_$(1)): $(S)src/rustllvm/llvm-auto-clean-trigger
4040
@$$(call E, make: cleaning llvm)
41+
$(Q)touch $$@.start_time
4142
$(Q)$(MAKE) clean-llvm$(1)
4243
@$$(call E, make: done cleaning llvm)
43-
touch $$@
44+
touch -r $$@.start_time $$@ && rm $$@.start_time
4445

4546
ifeq ($$(CFG_ENABLE_LLVM_STATIC_STDCPP),1)
4647
LLVM_STDCPP_LOCATION_$(1) = $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \

branches/tmp/mk/target.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7575
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7676
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7777
@$$(call E, rustc: $$(@D)/lib$(4))
78+
@touch $$@.start_time
7879
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
7980
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8081
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
@@ -89,7 +90,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8990
--out-dir $$(@D) \
9091
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9192
$$<
92-
@touch $$@
93+
@touch -r $$@.start_time $$@ && rm $$@.start_time
9394
$$(call LIST_ALL_OLD_GLOB_MATCHES, \
9495
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
9596
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

branches/tmp/mk/tests.mk

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,11 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
389389
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
390390
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
391391
@$$(call E, run: $$<)
392+
$$(Q)touch $$@.start_time
392393
$$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(1),$(2),$(3)) $$(TESTARGS) \
393394
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
394395
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
395-
&& touch $$@
396+
&& touch -r $$@.start_time $$@ && rm $$@.start_time
396397
endef
397398

398399
define DEF_TEST_CRATE_RULES_android
@@ -401,6 +402,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
401402
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
402403
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
403404
@$$(call E, run: $$< via adb)
405+
$$(Q)touch $$@.start_time
404406
$$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
405407
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=./$(2) \
406408
./$$(notdir $$<) \
@@ -414,7 +416,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
414416
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
415417
then \
416418
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
417-
touch $$@; \
419+
touch -r $$@.start_time $$@ && rm $$@.start_time; \
418420
else \
419421
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
420422
exit 101; \
@@ -690,10 +692,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
690692
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
691693
$$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
692694
@$$(call E, run $(4) [$(2)]: $$<)
695+
$$(Q)touch [email protected]_time
693696
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
694697
$$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
695698
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
696-
&& touch $$@
699+
&& touch -r $$@.start_time $$@ && rm [email protected]_time
697700

698701
else
699702

@@ -750,10 +753,11 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
750753
$$(PRETTY_DEPS_$(4)) \
751754
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
752755
@$$(call E, run pretty-rpass [$(2)]: $$<)
756+
$$(Q)touch $$@.start_time
753757
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
754758
$$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
755759
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
756-
&& touch $$@
760+
&& touch -r $$@.start_time $$@ && rm $$@.start_time
757761

758762
endef
759763

@@ -799,8 +803,10 @@ endif
799803
ifeq ($(2),$$(CFG_BUILD))
800804
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
801805
@$$(call E, run doc-$(4) [$(2)])
806+
$$(Q)touch $$@.start_time
802807
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< \
803-
--test-args "$$(TESTARGS)" && touch $$@
808+
--test-args "$$(TESTARGS)" && \
809+
touch -r $$@.start_time $$@ && rm $$@.start_time
804810
else
805811
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
806812
touch $$@
@@ -835,9 +841,11 @@ check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
835841
ifeq ($(2),$$(CFG_BUILD))
836842
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
837843
@$$(call E, run doc-crate-$(4) [$(2)])
844+
$$(Q)touch $$@.start_time
838845
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
839846
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
840-
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
847+
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && \
848+
touch -r $$@.start_time $$@ && rm $$@.start_time
841849
else
842850
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)):
843851
touch $$@
@@ -984,6 +992,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
984992
$$(CSREQ$(1)_T_$(2)_H_$(3))
985993
@rm -rf $(3)/test/run-make/$$*
986994
@mkdir -p $(3)/test/run-make/$$*
995+
$$(Q)touch $$@.start_time
987996
$$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
988997
$$(MAKE) \
989998
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
@@ -996,7 +1005,7 @@ $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
9961005
"$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
9971006
$(1) \
9981007
$$(S)
999-
@touch $$@
1008+
@touch -r $$@.start_time $$@ && rm [email protected]_time
10001009
else
10011010
# FIXME #11094 - The above rule doesn't work right for multiple targets
10021011
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec:

branches/tmp/src/doc/trpl/pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ fn main() {
709709
one_hundred: 100,
710710
});
711711

712-
let y = box foo(x);
712+
let y: Box<BigStruct> = box foo(x);
713713
}
714714
```
715715

branches/tmp/src/liballoc/arc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
//! }
7070
//! ```
7171
72+
use boxed::Box;
73+
7274
use core::prelude::*;
7375

7476
use core::atomic;
@@ -170,7 +172,7 @@ impl<T> Arc<T> {
170172
pub fn new(data: T) -> Arc<T> {
171173
// Start the weak pointer count as 1 which is the weak pointer that's
172174
// held by all the strong pointers (kinda), see std/rc.rs for more info
173-
let x = box ArcInner {
175+
let x: Box<_> = box ArcInner {
174176
strong: atomic::AtomicUsize::new(1),
175177
weak: atomic::AtomicUsize::new(1),
176178
data: data,

branches/tmp/src/liballoc/boxed.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ impl<T> Box<T> {
9494
/// let x = Box::new(5);
9595
/// ```
9696
#[stable(feature = "rust1", since = "1.0.0")]
97+
#[inline(always)]
9798
pub fn new(x: T) -> Box<T> {
9899
box x
99100
}
@@ -156,7 +157,7 @@ impl<T: Default> Default for Box<T> {
156157
#[stable(feature = "rust1", since = "1.0.0")]
157158
impl<T> Default for Box<[T]> {
158159
#[stable(feature = "rust1", since = "1.0.0")]
159-
fn default() -> Box<[T]> { box [] }
160+
fn default() -> Box<[T]> { Box::<[T; 0]>::new([]) }
160161
}
161162

162163
#[stable(feature = "rust1", since = "1.0.0")]

branches/tmp/src/liballoc/heap.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ mod test {
387387
extern crate test;
388388
use self::test::Bencher;
389389
use core::ptr::PtrExt;
390+
use boxed::Box;
390391
use heap;
391392

392393
#[test]
@@ -404,7 +405,7 @@ mod test {
404405
#[bench]
405406
fn alloc_owned_small(b: &mut Bencher) {
406407
b.iter(|| {
407-
box 10
408+
let _: Box<_> = box 10;
408409
})
409410
}
410411
}

branches/tmp/src/liballoc/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,15 @@ pub mod heap;
9696

9797
// Primitive types using the heaps above
9898

99+
// Need to conditionally define the mod from `boxed.rs` to avoid
100+
// duplicating the lang-items when building in test cfg; but also need
101+
// to allow code to have `use boxed::HEAP;`
102+
// and `use boxed::Box;` declarations.
99103
#[cfg(not(test))]
100104
pub mod boxed;
101105
#[cfg(test)]
106+
mod boxed { pub use std::boxed::{Box, HEAP}; }
107+
#[cfg(test)]
102108
mod boxed_test;
103109
pub mod arc;
104110
pub mod rc;

branches/tmp/src/liballoc/rc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@ impl<T> RcBoxPtr<T> for Weak<T> {
795795
#[cfg(test)]
796796
mod tests {
797797
use super::{Rc, Weak, weak_count, strong_count};
798+
use std::boxed::Box;
798799
use std::cell::RefCell;
799800
use std::option::Option;
800801
use std::option::Option::{Some, None};
@@ -826,7 +827,7 @@ mod tests {
826827

827828
#[test]
828829
fn test_destructor() {
829-
let x = Rc::new(box 5);
830+
let x: Rc<Box<_>> = Rc::new(box 5);
830831
assert_eq!(**x, 5);
831832
}
832833

branches/tmp/src/libarena/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,11 +581,11 @@ mod tests {
581581
#[bench]
582582
pub fn bench_copy_nonarena(b: &mut Bencher) {
583583
b.iter(|| {
584-
box Point {
584+
let _: Box<_> = box Point {
585585
x: 1,
586586
y: 2,
587587
z: 3,
588-
}
588+
};
589589
})
590590
}
591591

@@ -634,10 +634,10 @@ mod tests {
634634
#[bench]
635635
pub fn bench_noncopy_nonarena(b: &mut Bencher) {
636636
b.iter(|| {
637-
box Noncopy {
637+
let _: Box<_> = box Noncopy {
638638
string: "hello world".to_string(),
639639
array: vec!( 1, 2, 3, 4, 5 ),
640-
}
640+
};
641641
})
642642
}
643643

branches/tmp/src/libcollections/binary_heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ mod tests {
790790

791791
#[test]
792792
fn test_push_unique() {
793-
let mut heap = BinaryHeap::from_vec(vec![box 2, box 4, box 9]);
793+
let mut heap = BinaryHeap::<Box<_>>::from_vec(vec![box 2, box 4, box 9]);
794794
assert_eq!(heap.len(), 3);
795795
assert!(*heap.peek().unwrap() == box 9);
796796
heap.push(box 11);

branches/tmp/src/libcollections/linked_list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ mod tests {
984984

985985
#[test]
986986
fn test_basic() {
987-
let mut m = LinkedList::new();
987+
let mut m = LinkedList::<Box<_>>::new();
988988
assert_eq!(m.pop_front(), None);
989989
assert_eq!(m.pop_back(), None);
990990
assert_eq!(m.pop_front(), None);

0 commit comments

Comments
 (0)