Skip to content

Commit e0d4aa5

Browse files
committed
---
yaml --- r: 73262 b: refs/heads/dist-snap c: d3f70b1 h: refs/heads/master v: v3
1 parent 83e4f50 commit e0d4aa5

File tree

17 files changed

+23
-227
lines changed

17 files changed

+23
-227
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 0b39bc275e8f573238ad23fc8f86c87cec5e103d
10+
refs/heads/dist-snap: d3f70b141a43ebe02dcb3d62ffe2ae42da561aad
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/io.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,7 @@
1010

1111
/*!
1212
13-
The `io` module contains basic input and output routines.
14-
15-
A quick summary:
16-
17-
## `Reader` and `Writer` traits
18-
19-
These traits define the minimal set of methods that anything that can do
20-
input and output should implement.
21-
22-
## `ReaderUtil` and `WriterUtil` traits
23-
24-
Richer methods that allow you to do more. `Reader` only lets you read a certain
25-
number of bytes into a buffer, while `ReaderUtil` allows you to read a whole
26-
line, for example.
27-
28-
Generally, these richer methods are probably the ones you want to actually
29-
use in day-to-day Rust.
30-
31-
Furthermore, because there is an implementation of `ReaderUtil` for
32-
`<T: Reader>`, when your input or output code implements `Reader`, you get
33-
all of these methods for free.
34-
35-
## `print` and `println`
36-
37-
These very useful functions are defined here. You generally don't need to
38-
import them, though, as the prelude already does.
39-
40-
## `stdin`, `stdout`, and `stderr`
41-
42-
These functions return references to the classic three file descriptors. They
43-
implement `Reader` and `Writer`, where appropriate.
13+
Basic input/output
4414
4515
*/
4616

branches/dist-snap/src/libcore/rt/uv/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
273273
ECONNREFUSED => ConnectionRefused,
274274
ECONNRESET => ConnectionReset,
275275
EPIPE => BrokenPipe,
276-
e => {
277-
rtdebug!("e %u", e as uint);
276+
_ => {
277+
rtdebug!("uverr.code %u", uverr.code as uint);
278278
// XXX: Need to map remaining uv error types
279279
OtherIoError
280280
}

branches/dist-snap/src/librustc/lib/llvm.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use core::hashmap::HashMap;
12-
use core::libc::{c_uint, c_ushort};
12+
use core::libc::c_uint;
1313

1414
pub type Opcode = u32;
1515
pub type Bool = c_uint;
@@ -221,7 +221,7 @@ pub mod llvm {
221221
use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
222222
use super::{ValueRef};
223223

224-
use core::libc::{c_char, c_int, c_longlong, c_ushort, c_uint, c_ulonglong};
224+
use core::libc::{c_char, c_int, c_longlong, c_uint, c_ulonglong};
225225

226226
#[link_args = "-Lrustllvm -lrustllvm"]
227227
#[link_name = "rustllvm"]
@@ -451,10 +451,6 @@ pub mod llvm {
451451
/* all zeroes */
452452
#[fast_ffi]
453453
pub unsafe fn LLVMConstAllOnes(Ty: TypeRef) -> ValueRef;
454-
#[fast_ffi]
455-
pub unsafe fn LLVMConstICmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef;
456-
#[fast_ffi]
457-
pub unsafe fn LLVMConstFCmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef;
458454
/* only for int/vector */
459455
#[fast_ffi]
460456
pub unsafe fn LLVMGetUndef(Ty: TypeRef) -> ValueRef;
@@ -1918,16 +1914,6 @@ pub fn SetLinkage(Global: ValueRef, Link: Linkage) {
19181914
}
19191915
}
19201916

1921-
pub fn ConstICmp(Pred: IntPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
1922-
unsafe {
1923-
llvm::LLVMConstICmp(Pred as c_ushort, V1, V2)
1924-
}
1925-
}
1926-
pub fn ConstFCmp(Pred: RealPredicate, V1: ValueRef, V2: ValueRef) -> ValueRef {
1927-
unsafe {
1928-
llvm::LLVMConstFCmp(Pred as c_ushort, V1, V2)
1929-
}
1930-
}
19311917
/* Memory-managed object interface to type handles. */
19321918

19331919
pub struct TypeNames {

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//! This module implements the check that the lifetime of a borrow
1212
//! does not exceed the lifetime of the value being borrowed.
1313
14-
use core::prelude::*;
1514
use middle::borrowck::*;
1615
use mc = middle::mem_categorization;
1716
use middle::ty;

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// their associated scopes. In phase two, checking loans, we will then make
1717
// sure that all of these loans are honored.
1818

19-
use core::prelude::*;
20-
2119
use middle::borrowck::*;
2220
use mc = middle::mem_categorization;
2321
use middle::pat_util;

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Computes the restrictions that result from a borrow.
1212
13-
use core::prelude::*;
1413
use middle::borrowck::*;
1514
use mc = middle::mem_categorization;
1615
use middle::ty;

branches/dist-snap/src/librustc/middle/borrowck/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
/*! See doc.rs for a thorough explanation of the borrow checker */
1212

13-
use core::prelude::*;
14-
1513
use mc = middle::mem_categorization;
1614
use middle::ty;
1715
use middle::typeck;

branches/dist-snap/src/librustc/middle/dataflow.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* GEN and KILL bits for each expression.
1717
*/
1818

19-
use core::prelude::*;
2019
use core::cast;
2120
use core::uint;
2221
use syntax::ast;

branches/dist-snap/src/librustc/middle/trans/consts.rs

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99
// except according to those terms.
1010

1111
use back::abi;
12-
use lib::llvm::{llvm, ConstFCmp, ConstICmp, SetLinkage, PrivateLinkage, ValueRef, TypeRef, Bool,
13-
True, False};
14-
use lib::llvm::{IntEQ, IntNE, IntUGT, IntUGE, IntULT, IntULE, IntSGT, IntSGE, IntSLT, IntSLE,
15-
RealOEQ, RealOGT, RealOGE, RealOLT, RealOLE, RealONE};
16-
12+
use lib::llvm::{llvm, SetLinkage, PrivateLinkage,
13+
ValueRef, TypeRef, Bool, True, False};
1714
use metadata::csearch;
1815
use middle::const_eval;
1916
use middle::trans::adt;
@@ -30,7 +27,6 @@ use util::ppaux::{Repr, ty_to_str};
3027

3128
use core::libc::c_uint;
3229
use syntax::{ast, ast_util, ast_map};
33-
use util::ppaux::ty_to_str;
3430

3531
pub fn const_lit(cx: @CrateContext, e: @ast::expr, lit: ast::lit)
3632
-> ValueRef {
@@ -283,8 +279,8 @@ fn const_expr_unadjusted(cx: @CrateContext, e: @ast::expr) -> ValueRef {
283279
else if signed { llvm::LLVMConstSRem(te1, te2) }
284280
else { llvm::LLVMConstURem(te1, te2) }
285281
}
286-
ast::and => llvm::LLVMConstAnd(te1, te2),
287-
ast::or => llvm::LLVMConstOr(te1, te2),
282+
ast::and |
283+
ast::or => cx.sess.span_unimpl(e.span, "binop logic"),
288284
ast::bitxor => llvm::LLVMConstXor(te1, te2),
289285
ast::bitand => llvm::LLVMConstAnd(te1, te2),
290286
ast::bitor => llvm::LLVMConstOr(te1, te2),
@@ -293,44 +289,14 @@ fn const_expr_unadjusted(cx: @CrateContext, e: @ast::expr) -> ValueRef {
293289
if signed { llvm::LLVMConstAShr(te1, te2) }
294290
else { llvm::LLVMConstLShr(te1, te2) }
295291
}
296-
ast::eq => {
297-
if is_float { ConstFCmp(RealOEQ, te1, te2) }
298-
else { ConstICmp(IntEQ, te1, te2) }
299-
},
300-
ast::lt => {
301-
if is_float { ConstFCmp(RealOLT, te1, te2) }
302-
else {
303-
if signed { ConstICmp(IntSLT, te1, te2) }
304-
else { ConstICmp(IntULT, te1, te2) }
305-
}
306-
},
307-
ast::le => {
308-
if is_float { ConstFCmp(RealOLE, te1, te2) }
309-
else {
310-
if signed { ConstICmp(IntSLE, te1, te2) }
311-
else { ConstICmp(IntULE, te1, te2) }
312-
}
313-
},
314-
ast::ne => {
315-
if is_float { ConstFCmp(RealONE, te1, te2) }
316-
else { ConstICmp(IntNE, te1, te2) }
317-
},
318-
ast::ge => {
319-
if is_float { ConstFCmp(RealOGE, te1, te2) }
320-
else {
321-
if signed { ConstICmp(IntSGE, te1, te2) }
322-
else { ConstICmp(IntUGE, te1, te2) }
323-
}
324-
},
325-
ast::gt => {
326-
if is_float { ConstFCmp(RealOGT, te1, te2) }
327-
else {
328-
if signed { ConstICmp(IntSGT, te1, te2) }
329-
else { ConstICmp(IntUGT, te1, te2) }
330-
}
331-
},
332-
};
333-
},
292+
ast::eq |
293+
ast::lt |
294+
ast::le |
295+
ast::ne |
296+
ast::ge |
297+
ast::gt => cx.sess.span_unimpl(e.span, "binop comparator")
298+
}
299+
}
334300
ast::expr_unary(u, e) => {
335301
let te = const_expr(cx, e);
336302
let ty = ty::expr_ty(cx.tcx, e);

branches/dist-snap/src/librustc/middle/trans/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ use middle::trans::type_of;
145145
use middle::ty::struct_fields;
146146
use middle::ty::{AutoDerefRef, AutoAddEnv};
147147
use middle::ty::{AutoPtr, AutoBorrowVec, AutoBorrowVecRef, AutoBorrowFn,
148-
AutoDerefRef, AutoAddEnv, AutoUnsafe};
148+
AutoUnsafe};
149149
use middle::ty;
150150
use util::common::indenter;
151151
use util::ppaux::Repr;

branches/dist-snap/src/librustc/middle/typeck/infer/combine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use middle::typeck::infer::glb::Glb;
6262
use middle::typeck::infer::lub::Lub;
6363
use middle::typeck::infer::sub::Sub;
6464
use middle::typeck::infer::to_str::InferStr;
65-
use middle::typeck::infer::{cres, InferCtxt, ures, IntType, UintType};
65+
use middle::typeck::infer::{cres, InferCtxt, ures};
6666
use util::common::indent;
6767

6868
use core::result::{iter_vec2, map_vec2};

branches/dist-snap/src/librustc/middle/typeck/infer/lattice.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ use middle::typeck::infer::glb::Glb;
4141
use middle::typeck::infer::lub::Lub;
4242
use middle::typeck::infer::unify::*;
4343
use middle::typeck::infer::sub::Sub;
44-
use middle::typeck::infer::lub::Lub;
45-
use middle::typeck::infer::glb::Glb;
4644
use middle::typeck::infer::to_str::InferStr;
4745
use util::common::indenter;
4846

branches/dist-snap/src/librustpkg/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use rustc::driver::{driver, session};
1616
use rustc::metadata::filesearch;
1717
use std::getopts::groups::getopts;
1818
use std::semver;
19-
use std::{term, getopts};
19+
use std::term;
2020
use syntax::ast_util::*;
2121
use syntax::codemap::{dummy_sp, spanned, dummy_spanned};
2222
use syntax::ext::base::{mk_ctxt, ext_ctxt};

branches/dist-snap/src/libsyntax/opt_vec.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
* other useful things like `push()` and `len()`.
1717
*/
1818

19-
use core::prelude::*;
2019
use core::old_iter;
2120
use core::old_iter::BaseIter;
2221

branches/dist-snap/src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ use ast::{expr_ret, expr_self, expr_struct, expr_tup, expr_unary};
3030
use ast::{expr_vec, expr_vstore, expr_vstore_mut_box};
3131
use ast::{expr_vstore_slice, expr_vstore_box};
3232
use ast::{expr_vstore_mut_slice, expr_while, extern_fn, field, fn_decl};
33-
use ast::{expr_vstore_uniq, TyClosure, TyBareFn, Onceness, Once, Many};
33+
use ast::{expr_vstore_uniq, Onceness, Once, Many};
3434
use ast::{foreign_item, foreign_item_const, foreign_item_fn, foreign_mod};
3535
use ast::{ident, impure_fn, inherited, item, item_, item_const};
36-
use ast::{item_const, item_enum, item_fn, item_foreign_mod, item_impl};
36+
use ast::{item_enum, item_fn, item_foreign_mod, item_impl};
3737
use ast::{item_mac, item_mod, item_struct, item_trait, item_ty, lit, lit_};
3838
use ast::{lit_bool, lit_float, lit_float_unsuffixed, lit_int};
3939
use ast::{lit_int_unsuffixed, lit_nil, lit_str, lit_uint, local, m_const};

0 commit comments

Comments
 (0)