Skip to content

Commit 62cd6a0

Browse files
committed
---
yaml --- r: 178129 b: refs/heads/tmp c: 8c468b6 h: refs/heads/master i: 178127: d55464d v: v3
1 parent 227fcd0 commit 62cd6a0

Some content is hidden

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

64 files changed

+345
-311
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: fcf1a57cea9d608190ace07f90b38164b3d9c017
37+
refs/heads/tmp: 8c468b69aed6c85ca4c15e178ade44633acedce6

branches/tmp/COPYRIGHT

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ The following third party packages are included, and carry
2323
their own copyright notices and license terms:
2424

2525
* Two header files that are part of the Valgrind
26-
package. These files are found at src/rt/vg/valgrind.h and
27-
src/rt/vg/memcheck.h, within this distribution. These files
26+
package. These files are found at src/rt/valgrind/valgrind.h and
27+
src/rt/valgrind/memcheck.h, within this distribution. These files
2828
are redistributed under the following terms, as noted in
2929
them:
3030

31-
for src/rt/vg/valgrind.h:
31+
for src/rt/valgrind/valgrind.h:
3232

3333
This file is part of Valgrind, a dynamic binary
3434
instrumentation framework.
@@ -74,7 +74,7 @@ their own copyright notices and license terms:
7474
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
7575
OF SUCH DAMAGE.
7676

77-
for src/rt/vg/memcheck.h:
77+
for src/rt/valgrind/memcheck.h:
7878

7979
This file is part of MemCheck, a heavyweight Valgrind
8080
tool for detecting memory errors.
@@ -120,18 +120,6 @@ their own copyright notices and license terms:
120120
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
121121
OF SUCH DAMAGE.
122122

123-
* The auxiliary file src/etc/pkg/modpath.iss contains a
124-
library routine compiled, by Inno Setup, into the Windows
125-
installer binary. This file is licensed under the LGPL,
126-
version 3, but, in our legal interpretation, this does not
127-
affect the aggregate "collected work" license of the Rust
128-
distribution (MIT/ASL2) nor any other components of it. We
129-
believe that the terms governing distribution of the
130-
binary Windows installer built from modpath.iss are
131-
therefore LGPL, but not the terms governing distribution
132-
of any of the files installed by such an installer (such
133-
as the Rust compiler or runtime libraries themselves).
134-
135123
* The src/rt/miniz.c file, carrying an implementation of
136124
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
137125
<[email protected]>. All uses of this file are

branches/tmp/src/liballoc/arc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//!
4040
//! let five = Arc::new(5);
4141
//!
42-
//! for _ in 0u..10 {
42+
//! for _ in 0..10 {
4343
//! let five = five.clone();
4444
//!
4545
//! Thread::spawn(move || {
@@ -56,7 +56,7 @@
5656
//!
5757
//! let five = Arc::new(Mutex::new(5));
5858
//!
59-
//! for _ in 0u..10 {
59+
//! for _ in 0..10 {
6060
//! let five = five.clone();
6161
//!
6262
//! Thread::spawn(move || {
@@ -101,7 +101,7 @@ use heap::deallocate;
101101
/// let numbers: Vec<_> = (0..100u32).map(|i| i as f32).collect();
102102
/// let shared_numbers = Arc::new(numbers);
103103
///
104-
/// for _ in 0u..10 {
104+
/// for _ in 0..10 {
105105
/// let child_numbers = shared_numbers.clone();
106106
///
107107
/// Thread::spawn(move || {
@@ -661,7 +661,7 @@ mod tests {
661661

662662
#[test]
663663
fn test_cowarc_clone_make_unique() {
664-
let mut cow0 = Arc::new(75u);
664+
let mut cow0 = Arc::new(75);
665665
let mut cow1 = cow0.clone();
666666
let mut cow2 = cow1.clone();
667667

@@ -685,7 +685,7 @@ mod tests {
685685

686686
#[test]
687687
fn test_cowarc_clone_unique2() {
688-
let mut cow0 = Arc::new(75u);
688+
let mut cow0 = Arc::new(75);
689689
let cow1 = cow0.clone();
690690
let cow2 = cow1.clone();
691691

@@ -708,7 +708,7 @@ mod tests {
708708

709709
#[test]
710710
fn test_cowarc_clone_weak() {
711-
let mut cow0 = Arc::new(75u);
711+
let mut cow0 = Arc::new(75);
712712
let cow1_weak = cow0.downgrade();
713713

714714
assert!(75 == *cow0);

branches/tmp/src/liballoc/boxed_test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ struct Test;
3131

3232
#[test]
3333
fn any_move() {
34-
let a = Box::new(8u) as Box<Any>;
34+
let a = Box::new(8us) as Box<Any>;
3535
let b = Box::new(Test) as Box<Any>;
3636

3737
match a.downcast::<uint>() {
38-
Ok(a) => { assert!(a == Box::new(8u)); }
38+
Ok(a) => { assert!(a == Box::new(8us)); }
3939
Err(..) => panic!()
4040
}
4141
match b.downcast::<Test>() {
4242
Ok(a) => { assert!(a == Box::new(Test)); }
4343
Err(..) => panic!()
4444
}
4545

46-
let a = Box::new(8u) as Box<Any>;
46+
let a = Box::new(8) as Box<Any>;
4747
let b = Box::new(Test) as Box<Any>;
4848

4949
assert!(a.downcast::<Box<Test>>().is_err());
@@ -52,14 +52,14 @@ fn any_move() {
5252

5353
#[test]
5454
fn test_show() {
55-
let a = Box::new(8u) as Box<Any>;
55+
let a = Box::new(8) as Box<Any>;
5656
let b = Box::new(Test) as Box<Any>;
5757
let a_str = format!("{:?}", a);
5858
let b_str = format!("{:?}", b);
5959
assert_eq!(a_str, "Box<Any>");
6060
assert_eq!(b_str, "Box<Any>");
6161

62-
static EIGHT: usize = 8us;
62+
static EIGHT: usize = 8;
6363
static TEST: Test = Test;
6464
let a = &EIGHT as &Any;
6565
let b = &TEST as &Any;

branches/tmp/src/liballoc/rc.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
266266
/// ```
267267
/// use std::rc::{self, Rc};
268268
///
269-
/// let x = Rc::new(3u);
270-
/// assert_eq!(rc::try_unwrap(x), Ok(3u));
269+
/// let x = Rc::new(3);
270+
/// assert_eq!(rc::try_unwrap(x), Ok(3));
271271
///
272-
/// let x = Rc::new(4u);
272+
/// let x = Rc::new(4);
273273
/// let _y = x.clone();
274-
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u)));
274+
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4)));
275275
/// ```
276276
#[inline]
277277
#[unstable(feature = "alloc")]
@@ -300,9 +300,9 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
300300
/// ```
301301
/// use std::rc::{self, Rc};
302302
///
303-
/// let mut x = Rc::new(3u);
304-
/// *rc::get_mut(&mut x).unwrap() = 4u;
305-
/// assert_eq!(*x, 4u);
303+
/// let mut x = Rc::new(3);
304+
/// *rc::get_mut(&mut x).unwrap() = 4;
305+
/// assert_eq!(*x, 4);
306306
///
307307
/// let _y = x.clone();
308308
/// assert!(rc::get_mut(&mut x).is_none());
@@ -845,7 +845,7 @@ mod tests {
845845

846846
#[test]
847847
fn is_unique() {
848-
let x = Rc::new(3u);
848+
let x = Rc::new(3);
849849
assert!(super::is_unique(&x));
850850
let y = x.clone();
851851
assert!(!super::is_unique(&x));
@@ -893,21 +893,21 @@ mod tests {
893893

894894
#[test]
895895
fn try_unwrap() {
896-
let x = Rc::new(3u);
897-
assert_eq!(super::try_unwrap(x), Ok(3u));
898-
let x = Rc::new(4u);
896+
let x = Rc::new(3);
897+
assert_eq!(super::try_unwrap(x), Ok(3));
898+
let x = Rc::new(4);
899899
let _y = x.clone();
900-
assert_eq!(super::try_unwrap(x), Err(Rc::new(4u)));
901-
let x = Rc::new(5u);
900+
assert_eq!(super::try_unwrap(x), Err(Rc::new(4)));
901+
let x = Rc::new(5);
902902
let _w = x.downgrade();
903-
assert_eq!(super::try_unwrap(x), Err(Rc::new(5u)));
903+
assert_eq!(super::try_unwrap(x), Err(Rc::new(5)));
904904
}
905905

906906
#[test]
907907
fn get_mut() {
908-
let mut x = Rc::new(3u);
909-
*super::get_mut(&mut x).unwrap() = 4u;
910-
assert_eq!(*x, 4u);
908+
let mut x = Rc::new(3);
909+
*super::get_mut(&mut x).unwrap() = 4;
910+
assert_eq!(*x, 4);
911911
let y = x.clone();
912912
assert!(super::get_mut(&mut x).is_none());
913913
drop(y);
@@ -918,7 +918,7 @@ mod tests {
918918

919919
#[test]
920920
fn test_cowrc_clone_make_unique() {
921-
let mut cow0 = Rc::new(75u);
921+
let mut cow0 = Rc::new(75);
922922
let mut cow1 = cow0.clone();
923923
let mut cow2 = cow1.clone();
924924

@@ -942,7 +942,7 @@ mod tests {
942942

943943
#[test]
944944
fn test_cowrc_clone_unique2() {
945-
let mut cow0 = Rc::new(75u);
945+
let mut cow0 = Rc::new(75);
946946
let cow1 = cow0.clone();
947947
let cow2 = cow1.clone();
948948

@@ -965,7 +965,7 @@ mod tests {
965965

966966
#[test]
967967
fn test_cowrc_clone_weak() {
968-
let mut cow0 = Rc::new(75u);
968+
let mut cow0 = Rc::new(75);
969969
let cow1_weak = cow0.downgrade();
970970

971971
assert!(75 == *cow0);
@@ -979,7 +979,7 @@ mod tests {
979979

980980
#[test]
981981
fn test_show() {
982-
let foo = Rc::new(75u);
982+
let foo = Rc::new(75);
983983
assert_eq!(format!("{:?}", foo), "75");
984984
}
985985

branches/tmp/src/librustc/lint/builtin.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ pub struct BoxPointers;
493493
impl BoxPointers {
494494
fn check_heap_type<'a, 'tcx>(&self, cx: &Context<'a, 'tcx>,
495495
span: Span, ty: Ty<'tcx>) {
496-
let mut n_uniq = 0u;
496+
let mut n_uniq = 0us;
497497
ty::fold_ty(cx.tcx, ty, |t| {
498498
match t.sty {
499499
ty::ty_uniq(_) => {
@@ -592,7 +592,15 @@ impl LintPass for RawPointerDerive {
592592
return
593593
}
594594
let did = match item.node {
595-
ast::ItemImpl(..) => {
595+
ast::ItemImpl(_, _, _, ref t_ref_opt, _, _) => {
596+
// Deriving the Copy trait does not cause a warning
597+
if let &Some(ref trait_ref) = t_ref_opt {
598+
let def_id = ty::trait_ref_to_def_id(cx.tcx, trait_ref);
599+
if Some(def_id) == cx.tcx.lang_items.copy_trait() {
600+
return
601+
}
602+
}
603+
596604
match ty::node_id_to_type(cx.tcx, item.id).sty {
597605
ty::ty_enum(did, _) => did,
598606
ty::ty_struct(did, _) => did,

branches/tmp/src/librustc/lint/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ impl<'a, 'tcx> Context<'a, 'tcx> {
490490
// current dictionary of lint information. Along the way, keep a history
491491
// of what we changed so we can roll everything back after invoking the
492492
// specified closure
493-
let mut pushed = 0u;
493+
let mut pushed = 0;
494494

495495
for result in gather_attrs(attrs).into_iter() {
496496
let v = match result {

branches/tmp/src/librustc/metadata/decoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn maybe_find_item<'a>(item_id: ast::NodeId,
8888
items: rbml::Doc<'a>) -> Option<rbml::Doc<'a>> {
8989
fn eq_item(bytes: &[u8], item_id: ast::NodeId) -> bool {
9090
return u64_from_be_bytes(
91-
&bytes[0u..4u], 0u, 4u) as ast::NodeId
91+
&bytes[0..4], 0, 4) as ast::NodeId
9292
== item_id;
9393
}
9494
lookup_hash(items,
@@ -1164,7 +1164,7 @@ fn get_attributes(md: rbml::Doc) -> Vec<ast::Attribute> {
11641164
let meta_items = get_meta_items(attr_doc);
11651165
// Currently it's only possible to have a single meta item on
11661166
// an attribute
1167-
assert_eq!(meta_items.len(), 1u);
1167+
assert_eq!(meta_items.len(), 1);
11681168
let meta_item = meta_items.into_iter().nth(0).unwrap();
11691169
attrs.push(
11701170
codemap::Spanned {

branches/tmp/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
10601060
encode_name(rbml_w, item.ident.name);
10611061
encode_path(rbml_w, path);
10621062
encode_attributes(rbml_w, &item.attrs[]);
1063-
if tps_len > 0u || should_inline(&item.attrs[]) {
1063+
if tps_len > 0 || should_inline(&item.attrs[]) {
10641064
encode_inlined_item(ecx, rbml_w, IIItemRef(item));
10651065
}
10661066
if tps_len == 0 {

branches/tmp/src/librustc/metadata/loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ impl<'a> Context<'a> {
487487
fn extract_one(&mut self, m: HashMap<Path, PathKind>, flavor: &str,
488488
slot: &mut Option<MetadataBlob>) -> Option<(Path, PathKind)> {
489489
let mut ret = None::<(Path, PathKind)>;
490-
let mut error = 0u;
490+
let mut error = 0;
491491

492492
if slot.is_some() {
493493
// FIXME(#10786): for an optimization, we only read one of the

0 commit comments

Comments
 (0)