Skip to content

Commit bf24d64

Browse files
committed
---
yaml --- r: 234279 b: refs/heads/tmp c: 2a40e46 h: refs/heads/master i: 234277: 5649b26 234275: 76196af 234271: f84e68c v: v3
1 parent 1e059a6 commit bf24d64

File tree

173 files changed

+14580
-5055
lines changed

Some content is hidden

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

173 files changed

+14580
-5055
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: c6b0fccac822abe319a1f10d67c1271702098475
28+
refs/heads/tmp: 2a40e46f18206e30e8528a5a2adcef71a615aba4
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/mk/crates.mk

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ TARGET_CRATES := libc std flate arena term \
5656
alloc_system
5757
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
59-
rustc_data_structures rustc_platform_intrinsics
59+
rustc_data_structures rustc_front rustc_platform_intrinsics
6060
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

@@ -71,23 +71,24 @@ DEPS_graphviz := std
7171
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
7272
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
7373
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
74-
rustc_trans rustc_privacy rustc_lint
74+
rustc_trans rustc_privacy rustc_lint rustc_front
7575

7676
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
77-
log syntax serialize rustc_llvm rustc_platform_intrinsics
78-
DEPS_rustc_typeck := rustc syntax rustc_platform_intrinsics
79-
DEPS_rustc_borrowck := rustc log graphviz syntax
80-
DEPS_rustc_resolve := rustc log syntax
81-
DEPS_rustc_privacy := rustc log syntax
77+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
78+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
79+
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
80+
DEPS_rustc_resolve := rustc rustc_front log syntax
81+
DEPS_rustc_privacy := rustc rustc_front log syntax
8282
DEPS_rustc_lint := rustc log syntax
8383
DEPS_rustc := syntax flate arena serialize getopts rbml \
8484
log graphviz rustc_llvm rustc_back rustc_data_structures
8585
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
8686
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
87-
DEPS_rustc_back := std syntax rustc_llvm flate log libc
87+
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
88+
DEPS_rustc_front := std syntax log serialize
8889
DEPS_rustc_data_structures := std log serialize
8990
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
90-
test rustc_lint
91+
test rustc_lint rustc_front
9192
DEPS_rustc_bitflags := core
9293
DEPS_flate := std native:miniz
9394
DEPS_arena := std

branches/tmp/mk/docs.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ ifdef CFG_DISABLE_DOCS
191191
endif
192192

193193
docs: $(DOC_TARGETS)
194+
doc: docs
194195
compiler-docs: $(COMPILER_DOC_TARGETS)
195196

196197
trpl: doc/book/index.html

branches/tmp/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
268268
// FIXME (#9639): This needs to handle non-utf8 paths
269269
let mut args = vec!("-".to_owned(),
270270
"-Zunstable-options".to_owned(),
271-
"--pretty".to_owned(),
271+
"--unpretty".to_owned(),
272272
pretty_type,
273273
format!("--target={}", config.target),
274274
"-L".to_owned(),

branches/tmp/src/doc/trpl/lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ If we wanted an `&mut` reference, we’d do this:
108108

109109
If you compare `&mut i32` to `&'a mut i32`, they’re the same, it’s just that
110110
the lifetime `'a` has snuck in between the `&` and the `mut i32`. We read `&mut
111-
i32` as ‘a mutable reference to an i32’ and `&'a mut i32` as ‘a mutable
111+
i32` as ‘a mutable reference to an `i32`’ and `&'a mut i32` as ‘a mutable
112112
reference to an `i32` with the lifetime `'a`’.
113113

114114
# In `struct`s

branches/tmp/src/doc/trpl/structs.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Structs
22

3-
Structs are a way of creating more complex data types. For example, if we were
3+
`struct`s are a way of creating more complex data types. For example, if we were
44
doing calculations involving coordinates in 2D space, we would need both an `x`
55
and a `y` value:
66

@@ -9,7 +9,7 @@ let origin_x = 0;
99
let origin_y = 0;
1010
```
1111

12-
A struct lets us combine these two into a single, unified datatype:
12+
A `struct` lets us combine these two into a single, unified datatype:
1313

1414
```rust
1515
struct Point {
@@ -28,14 +28,14 @@ There’s a lot going on here, so let’s break it down. We declare a `struct` w
2828
the `struct` keyword, and then with a name. By convention, `struct`s begin with
2929
a capital letter and are camel cased: `PointInSpace`, not `Point_In_Space`.
3030

31-
We can create an instance of our struct via `let`, as usual, but we use a `key:
31+
We can create an instance of our `struct` via `let`, as usual, but we use a `key:
3232
value` style syntax to set each field. The order doesn’t need to be the same as
3333
in the original declaration.
3434

3535
Finally, because fields have names, we can access the field through dot
3636
notation: `origin.x`.
3737

38-
The values in structs are immutable by default, like other bindings in Rust.
38+
The values in `struct`s are immutable by default, like other bindings in Rust.
3939
Use `mut` to make them mutable:
4040

4141
```rust
@@ -91,7 +91,7 @@ fn main() {
9191
# Update syntax
9292

9393
A `struct` can include `..` to indicate that you want to use a copy of some
94-
other struct for some of the values. For example:
94+
other `struct` for some of the values. For example:
9595

9696
```rust
9797
struct Point3d {
@@ -121,7 +121,7 @@ let point = Point3d { z: 1, x: 2, .. origin };
121121
# Tuple structs
122122

123123
Rust has another data type that’s like a hybrid between a [tuple][tuple] and a
124-
struct, called a ‘tuple struct’. Tuple structs have a name, but
124+
`struct`, called a ‘tuple struct’. Tuple structs have a name, but
125125
their fields don’t:
126126

127127
```rust
@@ -140,7 +140,7 @@ let black = Color(0, 0, 0);
140140
let origin = Point(0, 0, 0);
141141
```
142142

143-
It is almost always better to use a struct than a tuple struct. We would write
143+
It is almost always better to use a `struct` than a tuple struct. We would write
144144
`Color` and `Point` like this instead:
145145

146146
```rust
@@ -158,7 +158,7 @@ struct Point {
158158
```
159159

160160
Now, we have actual names, rather than positions. Good names are important,
161-
and with a struct, we have actual names.
161+
and with a `struct`, we have actual names.
162162

163163
There _is_ one case when a tuple struct is very useful, though, and that’s a
164164
tuple struct with only one element. We call this the ‘newtype’ pattern, because
@@ -180,13 +180,13 @@ destructuring `let`, just as with regular tuples. In this case, the
180180

181181
# Unit-like structs
182182

183-
You can define a struct with no members at all:
183+
You can define a `struct` with no members at all:
184184

185185
```rust
186186
struct Electron;
187187
```
188188

189-
Such a struct is called ‘unit-like’ because it resembles the empty
189+
Such a `struct` is called ‘unit-like’ because it resembles the empty
190190
tuple, `()`, sometimes called ‘unit’. Like a tuple struct, it defines a
191191
new type.
192192

@@ -195,6 +195,6 @@ marker type), but in combination with other features, it can become
195195
useful. For instance, a library may ask you to create a structure that
196196
implements a certain [trait][trait] to handle events. If you don’t have
197197
any data you need to store in the structure, you can just create a
198-
unit-like struct.
198+
unit-like `struct`.
199199

200200
[trait]: traits.html

branches/tmp/src/librustc/ast_map/blocks.rs renamed to branches/tmp/src/librustc/front/map/blocks.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@
2323
2424
pub use self::Code::*;
2525

26-
use ast_map::{self, Node};
26+
use front::map::{self, Node};
2727
use syntax::abi;
28-
use syntax::ast::{Block, FnDecl, NodeId};
29-
use syntax::ast;
28+
use rustc_front::hir::{Block, FnDecl};
29+
use syntax::ast::{NodeId, Ident};
30+
use rustc_front::hir as ast;
3031
use syntax::codemap::Span;
31-
use syntax::visit::FnKind;
32+
use rustc_front::visit::FnKind;
3233

3334
/// An FnLikeNode is a Node that is like a fn, in that it has a decl
3435
/// and a body (as well as a NodeId, a span, etc).
@@ -40,7 +41,7 @@ use syntax::visit::FnKind;
4041
///
4142
/// To construct one, use the `Code::from_node` function.
4243
#[derive(Copy, Clone)]
43-
pub struct FnLikeNode<'a> { node: ast_map::Node<'a> }
44+
pub struct FnLikeNode<'a> { node: map::Node<'a> }
4445

4546
/// MaybeFnLike wraps a method that indicates if an object
4647
/// corresponds to some FnLikeNode.
@@ -86,7 +87,7 @@ pub enum Code<'a> {
8687
}
8788

8889
impl<'a> Code<'a> {
89-
pub fn id(&self) -> ast::NodeId {
90+
pub fn id(&self) -> NodeId {
9091
match *self {
9192
FnLikeCode(node) => node.id(),
9293
BlockCode(block) => block.id,
@@ -95,7 +96,7 @@ impl<'a> Code<'a> {
9596

9697
/// Attempts to construct a Code from presumed FnLike or Block node input.
9798
pub fn from_node(node: Node) -> Option<Code> {
98-
if let ast_map::NodeBlock(block) = node {
99+
if let map::NodeBlock(block) = node {
99100
Some(BlockCode(block))
100101
} else {
101102
FnLikeNode::from_node(node).map(|fn_like| FnLikeCode(fn_like))
@@ -106,15 +107,15 @@ impl<'a> Code<'a> {
106107
/// These are all the components one can extract from a fn item for
107108
/// use when implementing FnLikeNode operations.
108109
struct ItemFnParts<'a> {
109-
ident: ast::Ident,
110+
ident: Ident,
110111
decl: &'a ast::FnDecl,
111112
unsafety: ast::Unsafety,
112113
constness: ast::Constness,
113114
abi: abi::Abi,
114115
vis: ast::Visibility,
115116
generics: &'a ast::Generics,
116117
body: &'a Block,
117-
id: ast::NodeId,
118+
id: NodeId,
118119
span: Span
119120
}
120121

@@ -137,10 +138,10 @@ impl<'a> FnLikeNode<'a> {
137138
/// Attempts to construct a FnLikeNode from presumed FnLike node input.
138139
pub fn from_node(node: Node) -> Option<FnLikeNode> {
139140
let fn_like = match node {
140-
ast_map::NodeItem(item) => item.is_fn_like(),
141-
ast_map::NodeTraitItem(tm) => tm.is_fn_like(),
142-
ast_map::NodeImplItem(_) => true,
143-
ast_map::NodeExpr(e) => e.is_fn_like(),
141+
map::NodeItem(item) => item.is_fn_like(),
142+
map::NodeTraitItem(tm) => tm.is_fn_like(),
143+
map::NodeImplItem(_) => true,
144+
map::NodeExpr(e) => e.is_fn_like(),
144145
_ => false
145146
};
146147
if fn_like {
@@ -202,7 +203,7 @@ impl<'a> FnLikeNode<'a> {
202203
fn handle<A, I, M, C>(self, item_fn: I, method: M, closure: C) -> A where
203204
I: FnOnce(ItemFnParts<'a>) -> A,
204205
M: FnOnce(NodeId,
205-
ast::Ident,
206+
Ident,
206207
&'a ast::MethodSig,
207208
Option<ast::Visibility>,
208209
&'a ast::Block,
@@ -211,7 +212,7 @@ impl<'a> FnLikeNode<'a> {
211212
C: FnOnce(ClosureParts<'a>) -> A,
212213
{
213214
match self.node {
214-
ast_map::NodeItem(i) => match i.node {
215+
map::NodeItem(i) => match i.node {
215216
ast::ItemFn(ref decl, unsafety, constness, abi, ref generics, ref block) =>
216217
item_fn(ItemFnParts {
217218
id: i.id,
@@ -227,13 +228,13 @@ impl<'a> FnLikeNode<'a> {
227228
}),
228229
_ => panic!("item FnLikeNode that is not fn-like"),
229230
},
230-
ast_map::NodeTraitItem(ti) => match ti.node {
231+
map::NodeTraitItem(ti) => match ti.node {
231232
ast::MethodTraitItem(ref sig, Some(ref body)) => {
232233
method(ti.id, ti.ident, sig, None, body, ti.span)
233234
}
234235
_ => panic!("trait method FnLikeNode that is not fn-like"),
235236
},
236-
ast_map::NodeImplItem(ii) => {
237+
map::NodeImplItem(ii) => {
237238
match ii.node {
238239
ast::MethodImplItem(ref sig, ref body) => {
239240
method(ii.id, ii.ident, sig, Some(ii.vis), body, ii.span)
@@ -243,7 +244,7 @@ impl<'a> FnLikeNode<'a> {
243244
}
244245
}
245246
}
246-
ast_map::NodeExpr(e) => match e.node {
247+
map::NodeExpr(e) => match e.node {
247248
ast::ExprClosure(_, ref decl, ref block) =>
248249
closure(ClosureParts::new(&**decl, &**block, e.id, e.span)),
249250
_ => panic!("expr FnLikeNode that is not fn-like"),

0 commit comments

Comments
 (0)