Skip to content

Commit 57b73d9

Browse files
committed
---
yaml --- r: 276596 b: refs/heads/try c: 68de28b h: refs/heads/master
1 parent a6efff5 commit 57b73d9

File tree

268 files changed

+1882
-1830
lines changed

Some content is hidden

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

268 files changed

+1882
-1830
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 064ec35c18f396c2c26c05517290fdc1a4379586
4+
refs/heads/try: 68de28b309b38c5143b3c27f3db0d57f4373729e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/crates.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ TARGET_CRATES := libc std term \
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
60-
rustc_plugin rustc_metadata rustc_passes
60+
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis
6161
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6262
flate arena graphviz rbml log serialize
6363
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -102,7 +102,7 @@ DEPS_rustc_data_structures := std log serialize
102102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
103103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
104104
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
105-
rustc_metadata syntax_ext rustc_passes
105+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
106106
DEPS_rustc_front := std syntax log serialize
107107
DEPS_rustc_lint := rustc log syntax
108108
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
@@ -116,6 +116,7 @@ DEPS_rustc_privacy := rustc rustc_front log syntax
116116
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
117117
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
118118
rustc_const_eval
119+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
119120
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
120121

121122
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \

branches/try/src/bootstrap/build/native.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ pub fn llvm(build: &Build, target: &str) {
3939

4040
let _ = fs::remove_dir_all(&dst.join("build"));
4141
t!(fs::create_dir_all(&dst.join("build")));
42-
let mut assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
43-
44-
// Disable LLVM assertions on ARM compilers until #32360 is fixed
45-
if target.contains("arm") && target.contains("gnu") {
46-
assertions = "OFF";
47-
}
42+
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
4843

4944
// http://llvm.org/docs/CMake.html
5045
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));

branches/try/src/doc/book/strings.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ let s = "foo\
4444
assert_eq!("foobar", s);
4545
```
4646

47+
Note that you normally cannot access a `str` directly, but only through a `&str`
48+
reference. This is because `str` is an unsized type which requires additional
49+
runtime information to be usable. For more information see the chapter on
50+
[unsized types][ut].
51+
4752
Rust has more than only `&str`s though. A `String` is a heap-allocated string.
4853
This string is growable, and is also guaranteed to be UTF-8. `String`s are
4954
commonly created by converting from a string slice using the `to_string`
@@ -185,5 +190,6 @@ let hello_world = hello + &world;
185190
This is because `&String` can automatically coerce to a `&str`. This is a
186191
feature called ‘[`Deref` coercions][dc]’.
187192

193+
[ut]: unsized-types.html
188194
[dc]: deref-coercions.html
189195
[connect]: ../std/net/struct.TcpStream.html#method.connect

branches/try/src/doc/reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3911,6 +3911,9 @@ The _heap_ is a general term that describes boxes. The lifetime of an
39113911
allocation in the heap depends on the lifetime of the box values pointing to
39123912
it. Since box values may themselves be passed in and out of frames, or stored
39133913
in the heap, heap allocations may outlive the frame they are allocated within.
3914+
An allocation in the heap is guaranteed to reside at a single location in the
3915+
heap for the whole lifetime of the allocation - it will never be relocated as
3916+
a result of moving a box value.
39143917

39153918
### Memory ownership
39163919

branches/try/src/etc/CONFIGS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ These are some links to repos with configs which ease the use of rust.
1010
* [kate-config](https://github.com/rust-lang/kate-config)
1111
* [nano-config](https://github.com/rust-lang/nano-config)
1212
* [zsh-config](https://github.com/rust-lang/zsh-config)
13-
14-
## Community-maintained Configs
15-
16-
* [.editorconfig](https://gist.github.com/derhuerst/c9d1b9309e308d9851fa) ([what is this?](http://editorconfig.org/))

branches/try/src/librustc/middle/cfg/construct.rs renamed to branches/try/src/librustc/cfg/construct.rs

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

1111
use rustc_data_structures::graph;
12-
use middle::cfg::*;
12+
use cfg::*;
1313
use middle::def::Def;
1414
use middle::pat_util;
15-
use middle::ty::{self, TyCtxt};
15+
use ty::{self, TyCtxt};
1616
use syntax::ast;
1717
use syntax::ptr::P;
1818

branches/try/src/librustc/middle/cfg/graphviz.rs renamed to branches/try/src/librustc/cfg/graphviz.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use graphviz::IntoCow;
1818
use syntax::ast;
1919

2020
use front::map as ast_map;
21-
use middle::cfg;
21+
use cfg;
2222

2323
pub type Node<'a> = (cfg::CFGIndex, &'a cfg::CFGNode);
2424
pub type Edge<'a> = &'a cfg::CFGEdge;

branches/try/src/librustc/middle/cfg/mod.rs renamed to branches/try/src/librustc/cfg/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//! Uses `Graph` as the underlying representation.
1313
1414
use rustc_data_structures::graph;
15-
use middle::ty::TyCtxt;
15+
use ty::TyCtxt;
1616
use syntax::ast;
1717
use rustc_front::hir;
1818

branches/try/src/librustc/dep_graph/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use self::thread::{DepGraphThreadData, DepMessage};
1212
use middle::def_id::DefId;
1313
use syntax::ast::NodeId;
14-
use middle::ty::TyCtxt;
14+
use ty::TyCtxt;
1515
use rustc_front::hir;
1616
use rustc_front::intravisit::Visitor;
1717
use std::rc::Rc;

branches/try/src/librustc/middle/infer/bivariate.rs renamed to branches/try/src/librustc/infer/bivariate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
use super::combine::{self, CombineFields};
2929
use super::type_variable::{BiTo};
3030

31-
use middle::ty::{self, Ty, TyCtxt};
32-
use middle::ty::TyVar;
33-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
31+
use ty::{self, Ty, TyCtxt};
32+
use ty::TyVar;
33+
use ty::relate::{Relate, RelateResult, TypeRelation};
3434

3535
pub struct Bivariate<'a, 'tcx: 'a> {
3636
fields: CombineFields<'a, 'tcx>

branches/try/src/librustc/middle/infer/combine.rs renamed to branches/try/src/librustc/infer/combine.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ use super::{InferCtxt};
4141
use super::{MiscVariable, TypeTrace};
4242
use super::type_variable::{RelationDir, BiTo, EqTo, SubtypeOf, SupertypeOf};
4343

44-
use middle::ty::{IntType, UintType};
45-
use middle::ty::{self, Ty, TyCtxt};
46-
use middle::ty::error::TypeError;
47-
use middle::ty::fold::{TypeFolder, TypeFoldable};
48-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
44+
use ty::{IntType, UintType};
45+
use ty::{self, Ty, TyCtxt};
46+
use ty::error::TypeError;
47+
use ty::fold::{TypeFolder, TypeFoldable};
48+
use ty::relate::{Relate, RelateResult, TypeRelation};
4949

5050
use syntax::ast;
5151
use syntax::codemap::Span;

branches/try/src/librustc/middle/infer/equate.rs renamed to branches/try/src/librustc/infer/equate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
1313
use super::{Subtype};
1414
use super::type_variable::{EqTo};
1515

16-
use middle::ty::{self, Ty, TyCtxt};
17-
use middle::ty::TyVar;
18-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
16+
use ty::{self, Ty, TyCtxt};
17+
use ty::TyVar;
18+
use ty::relate::{Relate, RelateResult, TypeRelation};
1919

2020
/// Ensures `a` is made equal to `b`. Returns `a` on success.
2121
pub struct Equate<'a, 'tcx: 'a> {

branches/try/src/librustc/middle/infer/error_reporting.rs renamed to branches/try/src/librustc/infer/error_reporting.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ use rustc_front::print::pprust;
8080
use middle::cstore::CrateStore;
8181
use middle::def::Def;
8282
use middle::def_id::DefId;
83-
use middle::infer::{self, TypeOrigin};
83+
use infer::{self, TypeOrigin};
8484
use middle::region;
85-
use middle::subst;
86-
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
87-
use middle::ty::{Region, ReFree};
88-
use middle::ty::error::TypeError;
85+
use ty::subst;
86+
use ty::{self, Ty, TyCtxt, TypeFoldable};
87+
use ty::{Region, ReFree};
88+
use ty::error::TypeError;
8989

9090
use std::cell::{Cell, RefCell};
9191
use std::char::from_u32;

branches/try/src/librustc/middle/infer/freshen.rs renamed to branches/try/src/librustc/infer/freshen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
//! variable only once, and it does so as soon as it can, so it is reasonable to ask what the type
3131
//! inferencer knows "so far".
3232
33-
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
34-
use middle::ty::fold::TypeFolder;
33+
use ty::{self, Ty, TyCtxt, TypeFoldable};
34+
use ty::fold::TypeFolder;
3535
use std::collections::hash_map::{self, Entry};
3636

3737
use super::InferCtxt;

branches/try/src/librustc/middle/infer/glb.rs renamed to branches/try/src/librustc/infer/glb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use super::InferCtxt;
1414
use super::lattice::{self, LatticeDir};
1515
use super::Subtype;
1616

17-
use middle::ty::{self, Ty, TyCtxt};
18-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
17+
use ty::{self, Ty, TyCtxt};
18+
use ty::relate::{Relate, RelateResult, TypeRelation};
1919

2020
/// "Greatest lower bound" (common subtype)
2121
pub struct Glb<'a, 'tcx: 'a> {

branches/try/src/librustc/middle/infer/higher_ranked/mod.rs renamed to branches/try/src/librustc/infer/higher_ranked/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use super::{CombinedSnapshot, InferCtxt, HigherRankedType, SkolemizationMap};
1515
use super::combine::CombineFields;
1616

17-
use middle::ty::{self, TyCtxt, Binder, TypeFoldable};
18-
use middle::ty::error::TypeError;
19-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
17+
use ty::{self, TyCtxt, Binder, TypeFoldable};
18+
use ty::error::TypeError;
19+
use ty::relate::{Relate, RelateResult, TypeRelation};
2020
use syntax::codemap::Span;
2121
use util::nodemap::{FnvHashMap, FnvHashSet};
2222

branches/try/src/librustc/middle/infer/lattice.rs renamed to branches/try/src/librustc/infer/lattice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
use super::combine;
3333
use super::InferCtxt;
3434

35-
use middle::ty::TyVar;
36-
use middle::ty::{self, Ty};
37-
use middle::ty::relate::{RelateResult, TypeRelation};
35+
use ty::TyVar;
36+
use ty::{self, Ty};
37+
use ty::relate::{RelateResult, TypeRelation};
3838

3939
pub trait LatticeDir<'f,'tcx> : TypeRelation<'f,'tcx> {
4040
fn infcx(&self) -> &'f InferCtxt<'f, 'tcx>;

branches/try/src/librustc/middle/infer/lub.rs renamed to branches/try/src/librustc/infer/lub.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ use super::InferCtxt;
1414
use super::lattice::{self, LatticeDir};
1515
use super::Subtype;
1616

17-
use middle::ty::{self, Ty, TyCtxt};
18-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
17+
use ty::{self, Ty, TyCtxt};
18+
use ty::relate::{Relate, RelateResult, TypeRelation};
1919

2020
/// "Least upper bound" (common supertype)
2121
pub struct Lub<'a, 'tcx: 'a> {

branches/try/src/librustc/middle/infer/mod.rs renamed to branches/try/src/librustc/infer/mod.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub use self::LateBoundRegionConversionTime::*;
1414
pub use self::RegionVariableOrigin::*;
1515
pub use self::SubregionOrigin::*;
1616
pub use self::ValuePairs::*;
17-
pub use middle::ty::IntVarValue;
17+
pub use ty::IntVarValue;
1818
pub use self::freshen::TypeFreshener;
1919
pub use self::region_inference::{GenericKind, VerifyBound};
2020

@@ -24,16 +24,16 @@ use middle::free_region::FreeRegionMap;
2424
use middle::mem_categorization as mc;
2525
use middle::mem_categorization::McResult;
2626
use middle::region::CodeExtent;
27-
use middle::subst;
28-
use middle::subst::Substs;
29-
use middle::subst::Subst;
30-
use middle::traits::{self, ProjectionMode};
31-
use middle::ty::adjustment;
32-
use middle::ty::{TyVid, IntVid, FloatVid};
33-
use middle::ty::{self, Ty, TyCtxt};
34-
use middle::ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
35-
use middle::ty::fold::{TypeFolder, TypeFoldable};
36-
use middle::ty::relate::{Relate, RelateResult, TypeRelation};
27+
use ty::subst;
28+
use ty::subst::Substs;
29+
use ty::subst::Subst;
30+
use traits::{self, ProjectionMode};
31+
use ty::adjustment;
32+
use ty::{TyVid, IntVid, FloatVid};
33+
use ty::{self, Ty, TyCtxt};
34+
use ty::error::{ExpectedFound, TypeError, UnconstrainedNumeric};
35+
use ty::fold::{TypeFolder, TypeFoldable};
36+
use ty::relate::{Relate, RelateResult, TypeRelation};
3737
use rustc_data_structures::unify::{self, UnificationTable};
3838
use std::cell::{RefCell, Ref};
3939
use std::fmt;
@@ -622,8 +622,8 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
622622
}
623623

624624
pub fn type_is_unconstrained_numeric(&'a self, ty: Ty) -> UnconstrainedNumeric {
625-
use middle::ty::error::UnconstrainedNumeric::Neither;
626-
use middle::ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat};
625+
use ty::error::UnconstrainedNumeric::Neither;
626+
use ty::error::UnconstrainedNumeric::{UnconstrainedInt, UnconstrainedFloat};
627627
match ty.sty {
628628
ty::TyInfer(ty::IntVar(vid)) => {
629629
if self.int_unification_table.borrow_mut().has_value(vid) {

branches/try/src/librustc/middle/infer/region_inference/graphviz.rs renamed to branches/try/src/librustc/infer/region_inference/graphviz.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
/// For clarity, rename the graphviz crate locally to dot.
1919
use graphviz as dot;
2020

21-
use middle::ty::{self, TyCtxt};
21+
use ty::{self, TyCtxt};
2222
use middle::region::CodeExtent;
2323
use super::Constraint;
24-
use middle::infer::SubregionOrigin;
25-
use middle::infer::region_inference::RegionVarBindings;
24+
use infer::SubregionOrigin;
25+
use infer::region_inference::RegionVarBindings;
2626
use util::nodemap::{FnvHashMap, FnvHashSet};
2727

2828
use std::borrow::Cow;

branches/try/src/librustc/middle/infer/region_inference/mod.rs renamed to branches/try/src/librustc/infer/region_inference/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ use super::unify_key;
2323
use rustc_data_structures::graph::{self, Direction, NodeIndex};
2424
use rustc_data_structures::unify::{self, UnificationTable};
2525
use middle::free_region::FreeRegionMap;
26-
use middle::ty::{self, Ty, TyCtxt};
27-
use middle::ty::{BoundRegion, Region, RegionVid};
28-
use middle::ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
29-
use middle::ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
26+
use ty::{self, Ty, TyCtxt};
27+
use ty::{BoundRegion, Region, RegionVid};
28+
use ty::{ReEmpty, ReStatic, ReFree, ReEarlyBound};
29+
use ty::{ReLateBound, ReScope, ReVar, ReSkolemized, BrFresh};
3030
use util::common::indenter;
3131
use util::nodemap::{FnvHashMap, FnvHashSet};
3232

branches/try/src/librustc/middle/infer/resolve.rs renamed to branches/try/src/librustc/infer/resolve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use super::{InferCtxt, FixupError, FixupResult};
12-
use middle::ty::{self, Ty, TyCtxt, TypeFoldable};
12+
use ty::{self, Ty, TyCtxt, TypeFoldable};
1313

1414
///////////////////////////////////////////////////////////////////////////
1515
// OPPORTUNISTIC TYPE RESOLVER

branches/try/src/librustc/middle/infer/sub.rs renamed to branches/try/src/librustc/infer/sub.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use super::higher_ranked::HigherRankedRelations;
1313
use super::SubregionOrigin;
1414
use super::type_variable::{SubtypeOf, SupertypeOf};
1515

16-
use middle::ty::{self, Ty, TyCtxt};
17-
use middle::ty::TyVar;
18-
use middle::ty::relate::{Cause, Relate, RelateResult, TypeRelation};
16+
use ty::{self, Ty, TyCtxt};
17+
use ty::TyVar;
18+
use ty::relate::{Cause, Relate, RelateResult, TypeRelation};
1919
use std::mem;
2020

2121
/// Ensures `a` is made a subtype of `b`. Returns `a` on success.

branches/try/src/librustc/middle/infer/type_variable.rs renamed to branches/try/src/librustc/infer/type_variable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub use self::RelationDir::*;
1212
use self::TypeVariableValue::*;
1313
use self::UndoEntry::*;
1414
use middle::def_id::{DefId};
15-
use middle::ty::{self, Ty};
15+
use ty::{self, Ty};
1616
use syntax::codemap::Span;
1717

1818
use std::cmp::min;

branches/try/src/librustc/middle/infer/unify_key.rs renamed to branches/try/src/librustc/infer/unify_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use syntax::ast;
12-
use middle::ty::{self, IntVarValue, Ty, TyCtxt};
12+
use ty::{self, IntVarValue, Ty, TyCtxt};
1313
use rustc_data_structures::unify::{Combine, UnifyKey};
1414

1515
pub trait ToType<'tcx> {

0 commit comments

Comments
 (0)