Skip to content

Commit ca3d668

Browse files
committed
---
yaml --- r: 55771 b: refs/heads/master c: 52d3f55 h: refs/heads/master i: 55769: d441981 55767: cf4f709 v: v3
1 parent a782517 commit ca3d668

Some content is hidden

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

63 files changed

+548
-553
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 8cadcc47ee0413bdb1b52a594fbed3a3cae75705
2+
refs/heads/master: 52d3f5558e663c4fab407a9ab703132b4ef6443d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/doc/rustpkg.md

Lines changed: 0 additions & 108 deletions
This file was deleted.

trunk/mk/docs.mk

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,6 @@ doc/rust.pdf: doc/rust.tex
8181
endif
8282
endif
8383

84-
DOCS += doc/rustpkg.html
85-
doc/rustpkg.html: rustpkg.md doc/version_info.html doc/rust.css doc/manual.css
86-
@$(call E, pandoc: $@)
87-
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
88-
"$(CFG_PANDOC)" \
89-
--standalone --toc \
90-
--section-divs \
91-
--number-sections \
92-
--from=markdown --to=html \
93-
--css=rust.css \
94-
--css=manual.css \
95-
--include-before-body=doc/version_info.html \
96-
--output=$@
97-
9884
######################################################################
9985
# Node (tutorial related)
10086
######################################################################

trunk/src/libcore/num/strconv.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ mod test {
655655
use option::*;
656656

657657
#[test]
658-
#[ignore(reason = "fails in x86")]
659658
fn from_str_ignore_underscores() {
660659
let s : Option<u8> = from_str_common("__1__", 2, false, false, false,
661660
ExpNone, false, true);

trunk/src/libcore/rt/io/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ pub fn stdout() -> StdWriter { fail!() }
1717

1818
pub fn stderr() -> StdReader { fail!() }
1919

20-
pub fn print(s: &str) { fail!() }
20+
pub fn print(_s: &str) { fail!() }
2121

22-
pub fn println(s: &str) { fail!() }
22+
pub fn println(_s: &str) { fail!() }
2323

2424
pub enum StdStream {
2525
StdIn,

trunk/src/libcore/rt/uvio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use option::*;
1212
use result::*;
1313

14-
use super::io::net::ip::{IpAddr, Ipv4};
14+
use super::io::net::ip::{IpAddr, Ipv4}; // n.b. Ipv4 is used only in tests
1515
use super::uv::*;
1616
use super::rtio::*;
1717
use ops::Drop;

trunk/src/libcore/task/spawn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ pub fn spawn_raw(opts: TaskOpts, f: ~fn()) {
549549
}
550550
}
551551
552-
fn spawn_raw_newsched(opts: TaskOpts, f: ~fn()) {
552+
fn spawn_raw_newsched(_opts: TaskOpts, f: ~fn()) {
553553
use rt::sched::*;
554554
555555
let mut sched = local_sched::take();

trunk/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ fn doc_transformed_self_ty(doc: ebml::Doc,
247247
}
248248
}
249249
250-
pub fn item_type(item_id: ast::def_id, item: ebml::Doc,
250+
pub fn item_type(_item_id: ast::def_id, item: ebml::Doc,
251251
tcx: ty::ctxt, cdata: cmd) -> ty::t {
252252
doc_type(item, tcx, cdata)
253253
}

trunk/src/librustc/metadata/tydecode.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -279,28 +279,28 @@ fn parse_trait_ref(st: @mut PState, conv: conv_did) -> ty::TraitRef {
279279
280280
fn parse_ty(st: @mut PState, conv: conv_did) -> ty::t {
281281
match next(st) {
282-
'n' => return ty::mk_nil(st.tcx),
283-
'z' => return ty::mk_bot(st.tcx),
284-
'b' => return ty::mk_bool(st.tcx),
285-
'i' => return ty::mk_int(st.tcx),
286-
'u' => return ty::mk_uint(st.tcx),
287-
'l' => return ty::mk_float(st.tcx),
282+
'n' => return ty::mk_nil(),
283+
'z' => return ty::mk_bot(),
284+
'b' => return ty::mk_bool(),
285+
'i' => return ty::mk_int(),
286+
'u' => return ty::mk_uint(),
287+
'l' => return ty::mk_float(),
288288
'M' => {
289289
match next(st) {
290-
'b' => return ty::mk_mach_uint(st.tcx, ast::ty_u8),
291-
'w' => return ty::mk_mach_uint(st.tcx, ast::ty_u16),
292-
'l' => return ty::mk_mach_uint(st.tcx, ast::ty_u32),
293-
'd' => return ty::mk_mach_uint(st.tcx, ast::ty_u64),
294-
'B' => return ty::mk_mach_int(st.tcx, ast::ty_i8),
295-
'W' => return ty::mk_mach_int(st.tcx, ast::ty_i16),
296-
'L' => return ty::mk_mach_int(st.tcx, ast::ty_i32),
297-
'D' => return ty::mk_mach_int(st.tcx, ast::ty_i64),
298-
'f' => return ty::mk_mach_float(st.tcx, ast::ty_f32),
299-
'F' => return ty::mk_mach_float(st.tcx, ast::ty_f64),
290+
'b' => return ty::mk_mach_uint(ast::ty_u8),
291+
'w' => return ty::mk_mach_uint(ast::ty_u16),
292+
'l' => return ty::mk_mach_uint(ast::ty_u32),
293+
'd' => return ty::mk_mach_uint(ast::ty_u64),
294+
'B' => return ty::mk_mach_int(ast::ty_i8),
295+
'W' => return ty::mk_mach_int(ast::ty_i16),
296+
'L' => return ty::mk_mach_int(ast::ty_i32),
297+
'D' => return ty::mk_mach_int(ast::ty_i64),
298+
'f' => return ty::mk_mach_float(ast::ty_f32),
299+
'F' => return ty::mk_mach_float(ast::ty_f64),
300300
_ => fail!(~"parse_ty: bad numeric type")
301301
}
302302
}
303-
'c' => return ty::mk_char(st.tcx),
303+
'c' => return ty::mk_char(),
304304
't' => {
305305
assert!((next(st) == '['));
306306
let def = parse_def(st, NominalType, conv);

trunk/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub fn is_useful(cx: @MatchCheckCtxt, m: &matrix, v: &[@pat]) -> useful {
211211
let real_pat = match m.find(|r| r[0].id != 0) {
212212
Some(r) => r[0], None => v[0]
213213
};
214-
let left_ty = if real_pat.id == 0 { ty::mk_nil(cx.tcx) }
214+
let left_ty = if real_pat.id == 0 { ty::mk_nil() }
215215
else { ty::node_id_to_type(cx.tcx, real_pat.id) };
216216
217217
match pat_ctor_id(cx, v[0]) {

trunk/src/librustc/middle/lint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ pub fn get_lint_dict() -> LintDict {
262262
(~"unused_unsafe",
263263
LintSpec {
264264
lint: unused_unsafe,
265-
desc: "unnecessary use of an `unsafe` block",
265+
desc: "unnecessary use of an \"unsafe\" block",
266266
default: warn
267267
}),
268268

@@ -949,7 +949,7 @@ fn check_item_unused_unsafe(cx: ty::ctxt, it: @ast::item) {
949949
if !cx.used_unsafe.contains(&blk.node.id) {
950950
cx.sess.span_lint(unused_unsafe, blk.node.id, it.id,
951951
blk.span,
952-
~"unnecessary `unsafe` block");
952+
~"unnecessary \"unsafe\" block");
953953
}
954954
}
955955
_ => ()

trunk/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ pub impl mem_categorization_ctxt {
749749
fn cat_index<N:ast_node>(&self,
750750
elt: N,
751751
base_cmt: cmt) -> cmt {
752-
let mt = match ty::index(self.tcx, base_cmt.ty) {
752+
let mt = match ty::index(base_cmt.ty) {
753753
Some(mt) => mt,
754754
None => {
755755
self.tcx.sess.span_bug(

trunk/src/librustc/middle/trans/_match.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,7 @@ pub fn compare_values(cx: block,
10731073
10741074
match ty::get(rhs_t).sty {
10751075
ty::ty_estr(ty::vstore_uniq) => {
1076-
let scratch_result = scratch_datum(cx, ty::mk_bool(cx.tcx()),
1077-
false);
1076+
let scratch_result = scratch_datum(cx, ty::mk_bool(), false);
10781077
let scratch_lhs = alloca(cx, val_ty(lhs));
10791078
Store(cx, lhs, scratch_lhs);
10801079
let scratch_rhs = alloca(cx, val_ty(rhs));
@@ -1092,8 +1091,7 @@ pub fn compare_values(cx: block,
10921091
}
10931092
}
10941093
ty::ty_estr(_) => {
1095-
let scratch_result = scratch_datum(cx, ty::mk_bool(cx.tcx()),
1096-
false);
1094+
let scratch_result = scratch_datum(cx, ty::mk_bool(), false);
10971095
let did = cx.tcx().lang_items.str_eq_fn();
10981096
let bcx = callee::trans_lang_call(cx, did,
10991097
~[lhs, rhs],

trunk/src/librustc/middle/trans/adt.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ use core::option::{Option, Some, None};
5050
use core::vec;
5151

5252
use lib::llvm::{ValueRef, TypeRef, True, IntEQ, IntNE};
53-
use lib::llvm::llvm::LLVMDumpValue;
5453
use middle::trans::_match;
5554
use middle::trans::build::*;
5655
use middle::trans::common::*;
@@ -136,7 +135,7 @@ fn represent_type_uncached(cx: @CrateContext, t: ty::t) -> Repr {
136135
let packed = ty::lookup_packed(cx.tcx, def_id);
137136
let dtor = ty::ty_dtor(cx.tcx, def_id).is_present();
138137
let ftys =
139-
if dtor { ftys + [ty::mk_bool(cx.tcx)] } else { ftys };
138+
if dtor { ftys + [ty::mk_bool()] } else { ftys };
140139
return Univariant(mk_struct(cx, ftys, packed), dtor)
141140
}
142141
ty::ty_enum(def_id, ref substs) => {
@@ -204,7 +203,7 @@ fn represent_type_uncached(cx: @CrateContext, t: ty::t) -> Repr {
204203
}
205204

206205
// The general case.
207-
let discr = ~[ty::mk_int(cx.tcx)];
206+
let discr = ~[ty::mk_int()];
208207
return General(cases.map(|c| mk_struct(cx, discr + c.tys, false)))
209208
}
210209
_ => cx.sess.bug(~"adt::represent_type called on non-ADT type")

trunk/src/librustc/middle/trans/base.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ pub fn iter_structural_ty(cx: block, av: ValueRef, t: ty::t,
707707
substs.tps, f);
708708
}
709709
(_match::switch, Some(lldiscrim_a)) => {
710-
cx = f(cx, lldiscrim_a, ty::mk_int(cx.tcx()));
710+
cx = f(cx, lldiscrim_a, ty::mk_int());
711711
let unr_cx = sub_block(cx, ~"enum-iter-unr");
712712
Unreachable(unr_cx);
713713
let llswitch = Switch(cx, lldiscrim_a, unr_cx.llbb,
@@ -2361,7 +2361,7 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
23612361
}
23622362
23632363
fn create_main(ccx: @CrateContext, main_llfn: ValueRef) -> ValueRef {
2364-
let nt = ty::mk_nil(ccx.tcx);
2364+
let nt = ty::mk_nil();
23652365
let llfty = type_of_fn(ccx, ~[], nt);
23662366
let llfdecl = decl_fn(ccx.llmod, ~"_rust_main",
23672367
lib::llvm::CCallConv, llfty);
@@ -2407,9 +2407,8 @@ pub fn create_entry_wrapper(ccx: @CrateContext,
24072407
unsafe {
24082408
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
24092409
2410-
let crate_map = ccx.crate_map;
24112410
let start_def_id = ccx.tcx.lang_items.start_fn();
2412-
let start_fn = if start_def_id.crate == ast::local_crate {
2411+
if start_def_id.crate == ast::local_crate {
24132412
ccx.sess.bug(~"start lang item is never in the local crate")
24142413
} else {
24152414
let start_fn_type = csearch::get_type(ccx.tcx,
@@ -2727,7 +2726,7 @@ pub fn trans_constant(ccx: @CrateContext, it: @ast::item) {
27272726
path_name(variant.node.name),
27282727
path_name(special_idents::descrim)
27292728
]);
2730-
let s = @mangle_exported_name(ccx, p, ty::mk_int(ccx.tcx));
2729+
let s = @mangle_exported_name(ccx, p, ty::mk_int());
27312730
let disr_val = vi[i].disr_val;
27322731
note_unique_llvm_symbol(ccx, s);
27332732
let discrim_gvar = str::as_c_str(*s, |buf| {

trunk/src/librustc/middle/trans/closure.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ pub fn build_closure(bcx0: block,
261261
include_ret_handle: Option<ValueRef>) -> ClosureResult {
262262
let _icx = bcx0.insn_ctxt("closure::build_closure");
263263
// If we need to, package up the iterator body to call
264-
let bcx = bcx0;;
265-
let ccx = bcx.ccx(), tcx = ccx.tcx;
264+
let bcx = bcx0;
266265

267266
// Package up the captured upvars
268267
let mut env_vals = ~[];
@@ -290,7 +289,7 @@ pub fn build_closure(bcx0: block,
290289
// variables:
291290
for include_ret_handle.each |flagptr| {
292291
// Flag indicating we have returned (a by-ref bool):
293-
let flag_datum = Datum {val: *flagptr, ty: ty::mk_bool(tcx),
292+
let flag_datum = Datum {val: *flagptr, ty: ty::mk_bool(),
294293
mode: ByRef, source: ZeroMem};
295294
env_vals.push(EnvValue {action: EnvRef,
296295
datum: flag_datum});
@@ -302,7 +301,7 @@ pub fn build_closure(bcx0: block,
302301
None => bcx.fcx.llretptr.get()
303302
};
304303
let ret_casted = PointerCast(bcx, ret_true, T_ptr(T_nil()));
305-
let ret_datum = Datum {val: ret_casted, ty: ty::mk_nil(tcx),
304+
let ret_datum = Datum {val: ret_casted, ty: ty::mk_nil(),
306305
mode: ByRef, source: ZeroMem};
307306
env_vals.push(EnvValue {action: EnvRef,
308307
datum: ret_datum});
@@ -420,7 +419,7 @@ pub fn trans_expr_fn(bcx: block,
420419
}
421420

422421
let real_return_type = if is_loop_body.is_some() {
423-
ty::mk_bool(bcx.tcx())
422+
ty::mk_bool()
424423
} else {
425424
ty::ty_fn_ret(fty)
426425
};

trunk/src/librustc/middle/trans/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,9 +999,9 @@ pub fn T_opaque_vec(targ_cfg: @session::config) -> TypeRef {
999999
pub fn tuplify_box_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
10001000
let ptr = ty::mk_ptr(
10011001
tcx,
1002-
ty::mt {ty: ty::mk_nil(tcx), mutbl: ast::m_imm}
1002+
ty::mt {ty: ty::mk_nil(), mutbl: ast::m_imm}
10031003
);
1004-
return ty::mk_tup(tcx, ~[ty::mk_uint(tcx), ty::mk_type(tcx),
1004+
return ty::mk_tup(tcx, ~[ty::mk_uint(), ty::mk_type(tcx),
10051005
ptr, ptr,
10061006
t]);
10071007
}

0 commit comments

Comments
 (0)