Skip to content

Commit 1b7dc3a

Browse files
committed
---
yaml --- r: 30295 b: refs/heads/incoming c: 147e938 h: refs/heads/master i: 30293: 23573c0 30291: c6f082e 30287: daf15b6 v: v3
1 parent f9cd09b commit 1b7dc3a

Some content is hidden

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

61 files changed

+550
-522
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 959f76ddeb795298b88ef42da0c69fa5198f4fe8
9+
refs/heads/incoming: 147e9380e270ae8c27d241837251f14b33596450
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/at_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pure fn from_elem<T: copy>(n_elts: uint, t: T) -> @[T] {
133133
}
134134

135135
#[cfg(notest)]
136-
impl<T: copy> @[T]: add<&[const T],@[T]> {
136+
impl<T: copy> @[T]: Add<&[const T],@[T]> {
137137
#[inline(always)]
138138
pure fn add(rhs: &[const T]) -> @[T] {
139139
append(self, rhs)

branches/incoming/src/libcore/core.rc

Lines changed: 5 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
// Don't link to core. We are core.
3232
#[no_core];
3333

34-
#[allow(vecs_implicitly_copyable)];
34+
#[warn(vecs_implicitly_copyable)];
35+
// XXX: Switch to deny after snapshot
36+
#[warn(non_camel_case_types)];
3537

3638
export int, i8, i16, i32, i64;
3739
export uint, u8, u16, u32, u64;
@@ -47,6 +49,7 @@ export extfmt;
4749
export rt;
4850
export tuple;
4951
export to_str, to_bytes;
52+
export from_str;
5053
export util;
5154
export dvec, dvec_iter;
5255
export dlist, dlist_iter;
@@ -71,7 +74,6 @@ export priv;
7174
// Built-in-type support modules
7275

7376
/// Operations and constants for `int`
74-
#[warn(non_camel_case_types)]
7577
#[path = "int-template"]
7678
mod int {
7779
import inst::{ hash, pow };
@@ -81,39 +83,34 @@ mod int {
8183
}
8284

8385
/// Operations and constants for `i8`
84-
#[warn(non_camel_case_types)]
8586
#[path = "int-template"]
8687
mod i8 {
8788
#[path = "i8.rs"]
8889
mod inst;
8990
}
9091

9192
/// Operations and constants for `i16`
92-
#[warn(non_camel_case_types)]
9393
#[path = "int-template"]
9494
mod i16 {
9595
#[path = "i16.rs"]
9696
mod inst;
9797
}
9898

9999
/// Operations and constants for `i32`
100-
#[warn(non_camel_case_types)]
101100
#[path = "int-template"]
102101
mod i32 {
103102
#[path = "i32.rs"]
104103
mod inst;
105104
}
106105

107106
/// Operations and constants for `i64`
108-
#[warn(non_camel_case_types)]
109107
#[path = "int-template"]
110108
mod i64 {
111109
#[path = "i64.rs"]
112110
mod inst;
113111
}
114112

115113
/// Operations and constants for `uint`
116-
#[warn(non_camel_case_types)]
117114
#[path = "uint-template"]
118115
mod uint {
119116
import inst::{
@@ -128,7 +125,6 @@ mod uint {
128125
}
129126

130127
/// Operations and constants for `u8`
131-
#[warn(non_camel_case_types)]
132128
#[path = "uint-template"]
133129
mod u8 {
134130
import inst::is_ascii;
@@ -139,72 +135,50 @@ mod u8 {
139135
}
140136

141137
/// Operations and constants for `u16`
142-
#[warn(non_camel_case_types)]
143138
#[path = "uint-template"]
144139
mod u16 {
145140
#[path = "u16.rs"]
146141
mod inst;
147142
}
148143

149144
/// Operations and constants for `u32`
150-
#[warn(non_camel_case_types)]
151145
#[path = "uint-template"]
152146
mod u32 {
153147
#[path = "u32.rs"]
154148
mod inst;
155149
}
156150

157151
/// Operations and constants for `u64`
158-
#[warn(non_camel_case_types)]
159152
#[path = "uint-template"]
160153
mod u64 {
161154
#[path = "u64.rs"]
162155
mod inst;
163156
}
164157

165158

166-
#[warn(non_camel_case_types)]
167159
mod box;
168-
#[warn(non_camel_case_types)]
169160
mod char;
170-
#[warn(non_camel_case_types)]
171161
mod float;
172-
#[warn(non_camel_case_types)]
173162
mod f32;
174-
#[warn(non_camel_case_types)]
175163
mod f64;
176-
#[warn(non_camel_case_types)]
177164
mod str;
178-
#[warn(non_camel_case_types)]
179165
mod ptr;
180-
#[warn(non_camel_case_types)]
181166
mod vec;
182-
#[warn(non_camel_case_types)]
183167
mod at_vec;
184-
#[warn(non_camel_case_types)]
185168
mod bool;
186-
#[warn(non_camel_case_types)]
187169
mod tuple;
188-
#[warn(non_camel_case_types)]
189170
mod unit;
190-
#[warn(non_camel_case_types)]
191171
mod uniq;
192172

193173
// Ubiquitous-utility-type modules
194174

195175
#[cfg(notest)]
196176
mod ops;
197-
#[warn(non_camel_case_types)]
198177
mod cmp;
199-
#[warn(non_camel_case_types)]
200178
mod num;
201-
#[warn(non_camel_case_types)]
202179
mod hash;
203-
#[warn(non_camel_case_types)]
204180
mod either;
205-
#[warn(non_camel_case_types)]
206181
mod iter;
207-
#[warn(non_camel_case_types)]
208182
mod logging;
209183
mod option;
210184
#[path="iter-trait"]
@@ -213,60 +187,42 @@ mod option_iter {
213187
mod inst;
214188
}
215189
mod result;
216-
#[warn(non_camel_case_types)]
217190
mod to_str;
218-
#[warn(non_camel_case_types)]
219191
mod to_bytes;
220-
#[warn(non_camel_case_types)]
192+
mod from_str;
221193
mod util;
222194

223195
// Data structure modules
224196

225-
#[warn(non_camel_case_types)]
226197
mod dvec;
227198
#[path="iter-trait"]
228-
#[warn(non_camel_case_types)]
229199
mod dvec_iter {
230200
#[path = "dvec.rs"]
231201
mod inst;
232202
}
233-
#[warn(non_camel_case_types)]
234203
mod dlist;
235204
#[path="iter-trait"]
236-
#[warn(non_camel_case_types)]
237205
mod dlist_iter {
238206
#[path ="dlist.rs"]
239207
mod inst;
240208
}
241-
#[warn(non_camel_case_types)]
242209
mod send_map;
243210

244211
// Concurrency
245-
#[warn(non_camel_case_types)]
246212
mod comm;
247-
#[warn(non_camel_case_types)]
248213
mod task;
249-
//#[warn(non_camel_ase_types)] pipec code continues to trip this warning
250214
mod future;
251-
#[warn(non_camel_case_types)]
252215
mod pipes;
253216

254217
// Runtime and language-primitive support
255218

256-
#[warn(non_camel_case_types)]
257219
mod io;
258220
mod libc;
259-
#[warn(non_camel_case_types)]
260221
mod os;
261-
#[warn(non_camel_case_types)]
262222
mod path;
263-
#[warn(non_camel_case_types)]
264223
mod rand;
265-
#[warn(non_camel_case_types)]
266224
mod run;
267-
#[warn(non_camel_case_types)]
268225
mod sys;
269-
#[warn(non_camel_case_types)]
270226
mod unsafe;
271227

272228
mod managed;
@@ -284,13 +240,9 @@ mod rt;
284240

285241
// For internal use, not exported
286242

287-
#[warn(non_camel_case_types)]
288243
mod unicode;
289-
#[warn(non_camel_case_types)]
290244
mod priv;
291-
#[warn(non_camel_case_types)]
292245
mod cmath;
293-
#[warn(non_camel_case_types)]
294246
mod stackwalk;
295247

296248
// Local Variables:

branches/incoming/src/libcore/core.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,28 @@ export ToStr;
4444
// The compiler has special knowlege of these so we must not duplicate them
4545
// when compiling for testing
4646
#[cfg(notest)]
47-
import ops::{const, copy, send, owned};
47+
import ops::{Const, Copy, Send, Owned};
4848
#[cfg(notest)]
49-
import ops::{add, sub, mul, div, modulo, neg, bitand, bitor, bitxor};
49+
import ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
5050
#[cfg(notest)]
51-
import ops::{shl, shr, index};
51+
import ops::{Shl, Shr, Index};
5252

5353
#[cfg(notest)]
54-
export const, copy, send, owned;
54+
export Const, Copy, Send, Owned;
5555
#[cfg(notest)]
56-
export add, sub, mul, div, modulo, neg, bitand, bitor, bitxor;
56+
export Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor;
5757
#[cfg(notest)]
58-
export shl, shr, index;
58+
export Shl, Shr, Index;
5959

6060
#[cfg(test)]
6161
use coreops(name = "core", vers = "0.4");
6262

6363
#[cfg(test)]
64-
import coreops::ops::{const, copy, send, owned};
64+
import coreops::ops::{Const, Copy, Send, Owned};
6565
#[cfg(test)]
66-
import coreops::ops::{add, sub, mul, div, modulo, neg, bitand, bitor, bitxor};
66+
import coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
6767
#[cfg(test)]
68-
import coreops::ops::{shl, shr, index};
68+
import coreops::ops::{Shl, Shr, Index};
6969

7070

7171
// Export the log levels as global constants. Higher levels mean

branches/incoming/src/libcore/dvec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl<A: copy> DVec<A> {
327327
}
328328
}
329329

330-
impl<A:copy> DVec<A>: index<uint,A> {
330+
impl<A:copy> DVec<A>: Index<uint,A> {
331331
pure fn index(&&idx: uint) -> A {
332332
self.get_elt(idx)
333333
}

branches/incoming/src/libcore/extfmt.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#[doc(hidden)];
2+
#[allow(non_camel_case_types)];
23

34
/*
45
Syntax Extension: fmt
@@ -86,7 +87,7 @@ mod ct {
8687
let mut pieces: ~[piece] = ~[];
8788
let lim = str::len(s);
8889
let mut buf = ~"";
89-
fn flush_buf(buf: ~str, &pieces: ~[piece]) -> ~str {
90+
fn flush_buf(+buf: ~str, &pieces: ~[piece]) -> ~str {
9091
if str::len(buf) > 0u {
9192
let piece = piece_string(buf);
9293
vec::push(pieces, piece);
@@ -109,7 +110,7 @@ mod ct {
109110
} else {
110111
buf = flush_buf(buf, pieces);
111112
let rs = parse_conversion(s, i, lim, error);
112-
vec::push(pieces, rs.piece);
113+
vec::push(pieces, copy rs.piece);
113114
i = rs.next;
114115
}
115116
} else { buf += curr; i += size; }
@@ -148,7 +149,7 @@ mod ct {
148149
let ty = parse_type(s, prec.next, lim, error);
149150
return {piece:
150151
piece_conv({param: parm.param,
151-
flags: flags.flags,
152+
flags: copy flags.flags,
152153
width: width.count,
153154
precision: prec.count,
154155
ty: ty.ty}),
@@ -177,12 +178,12 @@ mod ct {
177178
fn more_(f: flag, s: ~str, i: uint, lim: uint) ->
178179
{flags: ~[flag], next: uint} {
179180
let next = parse_flags(s, i + 1u, lim);
180-
let rest = next.flags;
181+
let rest = copy next.flags;
181182
let j = next.next;
182183
let curr: ~[flag] = ~[f];
183184
return {flags: vec::append(curr, rest), next: j};
184185
}
185-
let more = |x| more_(x, s, i, lim);
186+
let more = |x, copy s| more_(x, copy s, i, lim);
186187
let f = s[i];
187188
return if f == '-' as u8 {
188189
more(flag_left_justify)
@@ -404,14 +405,14 @@ mod rt {
404405

405406
fn pad(cv: conv, &s: ~str, mode: pad_mode) -> ~str {
406407
let uwidth : uint = match cv.width {
407-
count_implied => return s,
408+
count_implied => return copy s,
408409
count_is(width) => {
409410
// FIXME: width should probably be uint (see Issue #1996)
410411
width as uint
411412
}
412413
};
413414
let strlen = str::char_len(s);
414-
if uwidth <= strlen { return s; }
415+
if uwidth <= strlen { return copy s; }
415416
let mut padchar = ' ';
416417
let diff = uwidth - strlen;
417418
if have_flag(cv.flags, flag_left_justify) {

branches/incoming/src/libcore/flate.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ fn inflate_buf(buf: &[const u8]) -> ~[u8] {
5555
}
5656

5757
#[test]
58+
#[allow(non_implicitly_copyable_typarams)]
5859
fn test_flate_round_trip() {
5960
let r = rand::Rng();
6061
let mut words = ~[];
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use option::Option;
2+
3+
trait FromStr {
4+
static fn from_str(s: &str) -> Option<self>;
5+
}
6+

0 commit comments

Comments
 (0)