Skip to content

Commit 62fa9cf

Browse files
committed
---
yaml --- r: 195893 b: refs/heads/beta c: 6cf3b0b h: refs/heads/master i: 195891: 0fff996 v: v3
1 parent 6a63a39 commit 62fa9cf

Some content is hidden

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

70 files changed

+820
-662
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 3b4547010011b948168d64eb8d05a5cfa7652765
32+
refs/heads/beta: 6cf3b0b74aadcc1fe87adbd2c74876a1f6c920b3
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 9de34a84bb300bab1bf0227f577331620cd60511

branches/beta/configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ case $CFG_OSTYPE in
404404
CFG_OSTYPE=pc-windows-gnu
405405
;;
406406

407-
# Thad's Cygwin identifers below
407+
# Thad's Cygwin identifiers below
408408

409409
# Vista 32 bit
410410
CYGWIN_NT-6.0)
@@ -526,7 +526,8 @@ VAL_OPTIONS=""
526526
opt valgrind 0 "run tests with valgrind (memcheck by default)"
527527
opt helgrind 0 "run tests with helgrind instead of memcheck"
528528
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
529-
opt docs 1 "build documentation"
529+
opt docs 1 "build standard library documentation"
530+
opt compiler-docs 0 "build compiler documentation"
530531
opt optimize 1 "build optimized rust code"
531532
opt optimize-cxx 1 "build optimized C++ code"
532533
opt optimize-llvm 1 "build optimized LLVM"

branches/beta/mk/crates.mk

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,29 @@ ONLY_RLIB_rustc_bitflags := 1
122122
# You should not need to edit below this line
123123
################################################################################
124124

125+
# On channels where the only usable crate is std, only build documentation for
126+
# std. This keeps distributions small and doesn't clutter up the API docs with
127+
# confusing internal details from the crates behind the facade.
128+
129+
ifeq ($(CFG_RELEASE_CHANNEL),stable)
130+
DOC_CRATES := std
131+
else
132+
ifeq ($(CFG_RELEASE_CHANNEL),beta)
133+
DOC_CRATES := std
134+
else
125135
DOC_CRATES := $(filter-out rustc, \
126-
$(filter-out rustc_trans, \
127-
$(filter-out rustc_typeck, \
128-
$(filter-out rustc_borrowck, \
129-
$(filter-out rustc_resolve, \
130-
$(filter-out rustc_driver, \
131-
$(filter-out rustc_privacy, \
132-
$(filter-out rustc_lint, \
133-
$(filter-out log, \
134-
$(filter-out getopts, \
135-
$(filter-out syntax, $(CRATES))))))))))))
136+
$(filter-out rustc_trans, \
137+
$(filter-out rustc_typeck, \
138+
$(filter-out rustc_borrowck, \
139+
$(filter-out rustc_resolve, \
140+
$(filter-out rustc_driver, \
141+
$(filter-out rustc_privacy, \
142+
$(filter-out rustc_lint, \
143+
$(filter-out log, \
144+
$(filter-out getopts, \
145+
$(filter-out syntax, $(CRATES))))))))))))
146+
endif
147+
endif
136148
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
137149
rustc_typeck rustc_driver syntax rustc_privacy \
138150
rustc_lint

branches/beta/mk/docs.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
259259
endef
260260

261261
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))
262-
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
262+
263+
ifdef CFG_COMPILER_DOCS
264+
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
265+
endif
263266

264267
ifdef CFG_DISABLE_DOCS
265268
$(info cfg: disabling doc build (CFG_DISABLE_DOCS))

branches/beta/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ define CFG_MAKE_TOOLCHAIN
179179

180180
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182-
# On Bitrig, we need the relocation model to be PIC for everthing
182+
# On Bitrig, we need the relocation model to be PIC for everything
183183
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
184184
LLVM_MC_RELOCATION_MODEL="pic"
185185
else

branches/beta/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ endef
132132
# on $$(TSREQ$(1)_T_$(2)_H_$(3)), to ensure that no products will be
133133
# put into the target area until after the get-snapshot.py script has
134134
# had its chance to clean it out; otherwise the other products will be
135-
# inadvertantly included in the clean out.
135+
# inadvertently included in the clean out.
136136
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
137137

138138
define TARGET_HOST_RULES

branches/beta/src/doc/trpl/arrays-vectors-and-slices.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,4 @@ You can also take a slice of a vector, `String`, or `&str`, because they are
9999
backed by arrays. Slices have type `&[T]`, which we'll talk about when we cover
100100
generics.
101101

102-
We have now learned all of the most basic Rust concepts. Next, we learn how to
103-
get input from the keyboard.
102+
We have now learned all of the most basic Rust concepts.

branches/beta/src/doc/trpl/associated-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ let obj = Box::new(graph) as Box<Graph>;
170170
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171171
```
172172

173-
We can’t create a trait object like this, becuase we don’t know the associated
173+
We can’t create a trait object like this, because we don’t know the associated
174174
types. Instead, we can write this:
175175

176176
```rust

branches/beta/src/doc/trpl/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ This will create documentation for bar both inside the documentation for the
529529
crate `foo`, as well as the documentation for your crate. It will use the same
530530
documentation in both places.
531531

532-
This behavior can be supressed with `no_inline`:
532+
This behavior can be suppressed with `no_inline`:
533533

534534
```ignore
535535
extern crate foo;

branches/beta/src/etc/rustup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ case $CFG_OSTYPE in
335335
MINGW32*)
336336
CFG_OSTYPE=pc-mingw32
337337
;;
338-
# Thad's Cygwin identifers below
338+
# Thad's Cygwin identifiers below
339339

340340
# Vista 32 bit
341341
CYGWIN_NT-6.0)
@@ -437,7 +437,7 @@ CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
437437
|| create_tmp_dir)
438438

439439
# If we're saving nightlies and we didn't specify which one, grab the latest
440-
# verison from the perspective of the server. Buildbot has typically finished
440+
# version from the perspective of the server. Buildbot has typically finished
441441
# building and uploading by ~8UTC, but we want to include a little buffer.
442442
#
443443
# FIXME It would be better to use the known most recent nightly that has been

branches/beta/src/libcollectionstest/bench.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ macro_rules! map_insert_rand_bench {
2222
let mut rng = rand::weak_rng();
2323

2424
for _ in 0..n {
25-
let i = rng.gen() % n;
25+
let i = rng.gen::<usize>() % n;
2626
map.insert(i, i);
2727
}
2828

2929
// measure
3030
b.iter(|| {
31-
let k = rng.gen() % n;
31+
let k = rng.gen::<usize>() % n;
3232
map.insert(k, k);
3333
map.remove(&k);
3434
});
@@ -77,7 +77,7 @@ macro_rules! map_find_rand_bench {
7777

7878
// setup
7979
let mut rng = rand::weak_rng();
80-
let mut keys: Vec<_> = (0..n).map(|_| rng.gen() % n).collect();
80+
let mut keys: Vec<_> = (0..n).map(|_| rng.gen::<usize>() % n).collect();
8181

8282
for &k in &keys {
8383
map.insert(k, k);

branches/beta/src/libcore/marker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ pub struct InvariantType<T>;
476476
/// particular, thanks to the `Reflect` bound, callers know that a
477477
/// function declared like `fn bar<T>(...)` will always act in
478478
/// precisely the same way no matter what type `T` is supplied,
479-
/// beacuse there are no bounds declared on `T`. (The ability for a
479+
/// because there are no bounds declared on `T`. (The ability for a
480480
/// caller to reason about what a function may do based solely on what
481481
/// generic bounds are declared is often called the ["parametricity
482482
/// property"][1].)

branches/beta/src/libcore/ops.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ pub trait Neg {
485485
macro_rules! neg_impl {
486486
($($t:ty)*) => ($(
487487
#[stable(feature = "rust1", since = "1.0.0")]
488+
#[allow(unsigned_negation)]
488489
impl Neg for $t {
489490
#[stable(feature = "rust1", since = "1.0.0")]
490491
type Output = $t;
@@ -498,28 +499,7 @@ macro_rules! neg_impl {
498499
)*)
499500
}
500501

501-
macro_rules! neg_uint_impl {
502-
($t:ty, $t_signed:ty) => {
503-
#[stable(feature = "rust1", since = "1.0.0")]
504-
impl Neg for $t {
505-
type Output = $t;
506-
507-
#[inline]
508-
fn neg(self) -> $t { -(self as $t_signed) as $t }
509-
}
510-
511-
forward_ref_unop! { impl Neg, neg for $t }
512-
}
513-
}
514-
515-
neg_impl! { isize i8 i16 i32 i64 f32 f64 }
516-
517-
neg_uint_impl! { usize, isize }
518-
neg_uint_impl! { u8, i8 }
519-
neg_uint_impl! { u16, i16 }
520-
neg_uint_impl! { u32, i32 }
521-
neg_uint_impl! { u64, i64 }
522-
502+
neg_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
523503

524504
/// The `Not` trait is used to specify the functionality of unary `!`.
525505
///

branches/beta/src/librand/distributions/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ fn ziggurat<R: Rng, P, Z>(
256256
return zero_case(rng, u);
257257
}
258258
// algebraically equivalent to f1 + DRanU()*(f0 - f1) < 1
259-
if f_tab[i + 1] + (f_tab[i] - f_tab[i + 1]) * rng.gen() < pdf(x) {
259+
if f_tab[i + 1] + (f_tab[i] - f_tab[i + 1]) * rng.gen::<f64>() < pdf(x) {
260260
return x;
261261
}
262262
}

branches/beta/src/librand/distributions/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ macro_rules! float_impl {
154154
}
155155
}
156156
fn sample_range<R: Rng>(r: &Range<$ty>, rng: &mut R) -> $ty {
157-
r.low + r.range * rng.gen()
157+
r.low + r.range * rng.gen::<$ty>()
158158
}
159159
}
160160
}

branches/beta/src/librbml/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
//! - `Sub32` (`0d`): 4-byte unsigned integer for supplementary information.
8484
//! Those two tags normally occur as the first subdocument of certain tags,
8585
//! namely `Enum`, `Vec` and `Map`, to provide a variant or size information.
86-
//! They can be used interchangably.
86+
//! They can be used interchangeably.
8787
//!
8888
//! Predefined tags with an explicit length:
8989
//!

branches/beta/src/librustc/middle/ty.rs

Lines changed: 10 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,10 @@ pub fn mk_nil<'tcx>(cx: &ctxt<'tcx>) -> Ty<'tcx> {
30393039
mk_tup(cx, Vec::new())
30403040
}
30413041

3042+
pub fn mk_bool<'tcx>(cx: &ctxt<'tcx>) -> Ty<'tcx> {
3043+
mk_t(cx, ty_bool)
3044+
}
3045+
30423046
pub fn mk_bare_fn<'tcx>(cx: &ctxt<'tcx>,
30433047
opt_def_id: Option<ast::DefId>,
30443048
fty: &'tcx BareFnTy<'tcx>) -> Ty<'tcx> {
@@ -3406,8 +3410,12 @@ pub fn type_is_scalar(ty: Ty) -> bool {
34063410
/// Returns true if this type is a floating point type and false otherwise.
34073411
pub fn type_is_floating_point(ty: Ty) -> bool {
34083412
match ty.sty {
3409-
ty_float(_) => true,
3410-
_ => false,
3413+
ty_float(_) |
3414+
ty_infer(FloatVar(_)) =>
3415+
true,
3416+
3417+
_ =>
3418+
false,
34113419
}
34123420
}
34133421

@@ -5805,78 +5813,6 @@ pub fn closure_upvars<'tcx>(typer: &mc::Typer<'tcx>,
58055813
}
58065814
}
58075815

5808-
pub fn is_binopable<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>, op: ast::BinOp) -> bool {
5809-
#![allow(non_upper_case_globals)]
5810-
const tycat_other: isize = 0;
5811-
const tycat_bool: isize = 1;
5812-
const tycat_char: isize = 2;
5813-
const tycat_int: isize = 3;
5814-
const tycat_float: isize = 4;
5815-
const tycat_raw_ptr: isize = 6;
5816-
5817-
const opcat_add: isize = 0;
5818-
const opcat_sub: isize = 1;
5819-
const opcat_mult: isize = 2;
5820-
const opcat_shift: isize = 3;
5821-
const opcat_rel: isize = 4;
5822-
const opcat_eq: isize = 5;
5823-
const opcat_bit: isize = 6;
5824-
const opcat_logic: isize = 7;
5825-
const opcat_mod: isize = 8;
5826-
5827-
fn opcat(op: ast::BinOp) -> isize {
5828-
match op.node {
5829-
ast::BiAdd => opcat_add,
5830-
ast::BiSub => opcat_sub,
5831-
ast::BiMul => opcat_mult,
5832-
ast::BiDiv => opcat_mult,
5833-
ast::BiRem => opcat_mod,
5834-
ast::BiAnd => opcat_logic,
5835-
ast::BiOr => opcat_logic,
5836-
ast::BiBitXor => opcat_bit,
5837-
ast::BiBitAnd => opcat_bit,
5838-
ast::BiBitOr => opcat_bit,
5839-
ast::BiShl => opcat_shift,
5840-
ast::BiShr => opcat_shift,
5841-
ast::BiEq => opcat_eq,
5842-
ast::BiNe => opcat_eq,
5843-
ast::BiLt => opcat_rel,
5844-
ast::BiLe => opcat_rel,
5845-
ast::BiGe => opcat_rel,
5846-
ast::BiGt => opcat_rel
5847-
}
5848-
}
5849-
5850-
fn tycat<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> isize {
5851-
if type_is_simd(cx, ty) {
5852-
return tycat(cx, simd_type(cx, ty))
5853-
}
5854-
match ty.sty {
5855-
ty_char => tycat_char,
5856-
ty_bool => tycat_bool,
5857-
ty_int(_) | ty_uint(_) | ty_infer(IntVar(_)) => tycat_int,
5858-
ty_float(_) | ty_infer(FloatVar(_)) => tycat_float,
5859-
ty_ptr(_) => tycat_raw_ptr,
5860-
_ => tycat_other
5861-
}
5862-
}
5863-
5864-
const t: bool = true;
5865-
const f: bool = false;
5866-
5867-
let tbl = [
5868-
// +, -, *, shift, rel, ==, bit, logic, mod
5869-
/*other*/ [f, f, f, f, f, f, f, f, f],
5870-
/*bool*/ [f, f, f, f, t, t, t, t, f],
5871-
/*char*/ [f, f, f, f, t, t, f, f, f],
5872-
/*isize*/ [t, t, t, t, t, t, t, f, t],
5873-
/*float*/ [t, t, t, f, t, t, f, f, f],
5874-
/*bot*/ [t, t, t, t, t, t, t, t, t],
5875-
/*raw ptr*/ [f, f, f, f, t, t, f, f, f]];
5876-
5877-
return tbl[tycat(cx, ty) as usize ][opcat(op) as usize];
5878-
}
5879-
58805816
// Returns the repeat count for a repeating vector expression.
58815817
pub fn eval_repeat_count(tcx: &ctxt, count_expr: &ast::Expr) -> usize {
58825818
match const_eval::eval_const_expr_partial(tcx, count_expr, Some(tcx.types.usize)) {

branches/beta/src/librustc_back/target/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub struct TargetOptions {
157157
/// particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
158158
pub is_like_osx: bool,
159159
/// Whether the target toolchain is like Windows'. Only useful for compiling against Windows,
160-
/// only realy used for figuring out how to find libraries, since Windows uses its own
160+
/// only really used for figuring out how to find libraries, since Windows uses its own
161161
/// library naming convention. Defaults to false.
162162
pub is_like_windows: bool,
163163
/// Whether the target toolchain is like Android's. Only useful for compiling against Android.

branches/beta/src/librustc_trans/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ pub fn compare_scalar_types<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
560560
_ => bcx.sess().bug("compare_scalar_types: must be a comparison operator")
561561
}
562562
}
563-
ty::ty_bool | ty::ty_uint(_) | ty::ty_char => {
563+
ty::ty_bare_fn(..) | ty::ty_bool | ty::ty_uint(_) | ty::ty_char => {
564564
ICmp(bcx, bin_op_to_icmp_predicate(bcx.ccx(), op, false), lhs, rhs, debug_loc)
565565
}
566566
ty::ty_ptr(mt) if common::type_is_sized(bcx.tcx(), mt.ty) => {

branches/beta/src/librustc_trans/trans/consts.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,14 @@ pub fn const_expr<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
351351
fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
352352
e: &ast::Expr,
353353
ety: Ty<'tcx>,
354-
param_substs: &'tcx Substs<'tcx>) -> ValueRef {
354+
param_substs: &'tcx Substs<'tcx>)
355+
-> ValueRef
356+
{
357+
debug!("const_expr_unadjusted(e={}, ety={}, param_substs={})",
358+
e.repr(cx.tcx()),
359+
ety.repr(cx.tcx()),
360+
param_substs.repr(cx.tcx()));
361+
355362
let map_list = |exprs: &[P<ast::Expr>]| {
356363
exprs.iter().map(|e| const_expr(cx, &**e, param_substs).0)
357364
.fold(Vec::new(), |mut l, val| { l.push(val); l })
@@ -366,6 +373,9 @@ fn const_expr_unadjusted<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
366373
/* Neither type is bottom, and we expect them to be unified
367374
* already, so the following is safe. */
368375
let (te1, ty) = const_expr(cx, &**e1, param_substs);
376+
debug!("const_expr_unadjusted: te1={}, ty={}",
377+
cx.tn().val_to_string(te1),
378+
ty.repr(cx.tcx()));
369379
let is_simd = ty::type_is_simd(cx.tcx(), ty);
370380
let intype = if is_simd {
371381
ty::simd_type(cx.tcx(), ty)

0 commit comments

Comments
 (0)