Skip to content

Commit a62a529

Browse files
committed
review comments
1 parent 87b0cf4 commit a62a529

File tree

8 files changed

+255
-65
lines changed

8 files changed

+255
-65
lines changed

mk/crates.mk

+32-28
Original file line numberDiff line numberDiff line change
@@ -61,51 +61,55 @@ HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

6363
DEPS_core :=
64+
DEPS_alloc := core libc alloc_system
65+
DEPS_alloc_system := core libc
66+
DEPS_collections := core alloc rustc_unicode
6467
DEPS_libc := core
68+
DEPS_rand := core
69+
DEPS_rustc_bitflags := core
6570
DEPS_rustc_unicode := core
66-
DEPS_alloc := core libc alloc_system
71+
6772
DEPS_std := core libc rand alloc collections rustc_unicode \
6873
native:rust_builtin native:backtrace \
6974
alloc_system
75+
DEPS_arena := std
76+
DEPS_glob := std
77+
DEPS_flate := std native:miniz
78+
DEPS_fmt_macros = std
79+
DEPS_getopts := std
7080
DEPS_graphviz := std
81+
DEPS_log := std
82+
DEPS_num := std
83+
DEPS_rbml := std log serialize
84+
DEPS_serialize := std log
85+
DEPS_term := std log
86+
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
87+
7188
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
89+
90+
DEPS_rustc := syntax flate arena serialize getopts rbml rustc_front\
91+
log graphviz rustc_llvm rustc_back rustc_data_structures
92+
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
93+
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
94+
DEPS_rustc_data_structures := std log serialize
7295
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
7396
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
7497
rustc_trans rustc_privacy rustc_lint rustc_front
7598

76-
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
77-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
78-
DEPS_rustc_mir := rustc rustc_front syntax
79-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
80-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
81-
DEPS_rustc_resolve := rustc rustc_front log syntax
82-
DEPS_rustc_privacy := rustc rustc_front log syntax
8399
DEPS_rustc_front := std syntax log serialize
84100
DEPS_rustc_lint := rustc log syntax
85-
DEPS_rustc := syntax flate arena serialize getopts rbml rustc_front\
86-
log graphviz rustc_llvm rustc_back rustc_data_structures
87101
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
102+
DEPS_rustc_mir := rustc rustc_front syntax
103+
DEPS_rustc_resolve := rustc rustc_front log syntax
88104
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
89-
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
90-
DEPS_rustc_data_structures := std log serialize
105+
DEPS_rustc_privacy := rustc rustc_front log syntax
106+
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
107+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
108+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
109+
91110
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
92111
test rustc_lint rustc_front
93-
DEPS_rustc_bitflags := core
94-
DEPS_flate := std native:miniz
95-
DEPS_arena := std
96-
DEPS_graphviz := std
97-
DEPS_glob := std
98-
DEPS_serialize := std log
99-
DEPS_rbml := std log serialize
100-
DEPS_term := std log
101-
DEPS_getopts := std
102-
DEPS_collections := core alloc rustc_unicode
103-
DEPS_num := std
104-
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
105-
DEPS_rand := core
106-
DEPS_log := std
107-
DEPS_fmt_macros = std
108-
DEPS_alloc_system := core libc
112+
109113

110114
TOOL_DEPS_compiletest := test getopts
111115
TOOL_DEPS_rustdoc := rustdoc

src/librustc/middle/astencode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ impl FakeExtCtxt for parse::ParseSess {
13791379
struct FakeNodeIdAssigner;
13801380

13811381
#[cfg(test)]
1382-
// It should go without sayingt that this may give unexpected results. Avoid
1382+
// It should go without saying that this may give unexpected results. Avoid
13831383
// lowering anything which needs new nodes.
13841384
impl NodeIdAssigner for FakeNodeIdAssigner {
13851385
fn next_node_id(&self) -> NodeId {

src/librustc_driver/pretty.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ trait HirPrinterSupport<'ast>: pprust_hir::PpAnn {
224224
fn pp_ann<'a>(&'a self) -> &'a pprust_hir::PpAnn;
225225
}
226226

227-
struct NoAnn<'ast, 'tcx> {
228-
sess: &'tcx Session,
227+
struct NoAnn<'ast> {
228+
sess: &'ast Session,
229229
ast_map: Option<hir_map::Map<'ast>>
230230
}
231231

232-
impl<'ast, 'tcx> PrinterSupport<'ast> for NoAnn<'ast, 'tcx> {
232+
impl<'ast> PrinterSupport<'ast> for NoAnn<'ast> {
233233
fn sess<'a>(&'a self) -> &'a Session { self.sess }
234234

235235
fn ast_map<'a>(&'a self) -> Option<&'a hir_map::Map<'ast>> {
@@ -239,7 +239,7 @@ impl<'ast, 'tcx> PrinterSupport<'ast> for NoAnn<'ast, 'tcx> {
239239
fn pp_ann<'a>(&'a self) -> &'a pprust::PpAnn { self }
240240
}
241241

242-
impl<'ast, 'tcx> HirPrinterSupport<'ast> for NoAnn<'ast, 'tcx> {
242+
impl<'ast> HirPrinterSupport<'ast> for NoAnn<'ast> {
243243
fn sess<'a>(&'a self) -> &'a Session { self.sess }
244244

245245
fn ast_map<'a>(&'a self) -> Option<&'a hir_map::Map<'ast>> {
@@ -249,15 +249,15 @@ impl<'ast, 'tcx> HirPrinterSupport<'ast> for NoAnn<'ast, 'tcx> {
249249
fn pp_ann<'a>(&'a self) -> &'a pprust_hir::PpAnn { self }
250250
}
251251

252-
impl<'ast, 'tcx> pprust::PpAnn for NoAnn<'ast, 'tcx> {}
253-
impl<'ast, 'tcx> pprust_hir::PpAnn for NoAnn<'ast, 'tcx> {}
252+
impl<'ast> pprust::PpAnn for NoAnn<'ast> {}
253+
impl<'ast> pprust_hir::PpAnn for NoAnn<'ast> {}
254254

255-
struct IdentifiedAnnotation<'ast, 'tcx> {
256-
sess: &'tcx Session,
255+
struct IdentifiedAnnotation<'ast> {
256+
sess: &'ast Session,
257257
ast_map: Option<hir_map::Map<'ast>>,
258258
}
259259

260-
impl<'ast, 'tcx> PrinterSupport<'ast> for IdentifiedAnnotation<'ast, 'tcx> {
260+
impl<'ast> PrinterSupport<'ast> for IdentifiedAnnotation<'ast> {
261261
fn sess<'a>(&'a self) -> &'a Session { self.sess }
262262

263263
fn ast_map<'a>(&'a self) -> Option<&'a hir_map::Map<'ast>> {
@@ -267,7 +267,7 @@ impl<'ast, 'tcx> PrinterSupport<'ast> for IdentifiedAnnotation<'ast, 'tcx> {
267267
fn pp_ann<'a>(&'a self) -> &'a pprust::PpAnn { self }
268268
}
269269

270-
impl<'ast, 'tcx> pprust::PpAnn for IdentifiedAnnotation<'ast, 'tcx> {
270+
impl<'ast> pprust::PpAnn for IdentifiedAnnotation<'ast> {
271271
fn pre(&self,
272272
s: &mut pprust::State,
273273
node: pprust::AnnNode) -> io::Result<()> {
@@ -307,7 +307,7 @@ impl<'ast, 'tcx> pprust::PpAnn for IdentifiedAnnotation<'ast, 'tcx> {
307307
}
308308
}
309309

310-
impl<'ast, 'tcx> HirPrinterSupport<'ast> for IdentifiedAnnotation<'ast, 'tcx> {
310+
impl<'ast> HirPrinterSupport<'ast> for IdentifiedAnnotation<'ast> {
311311
fn sess<'a>(&'a self) -> &'a Session { self.sess }
312312

313313
fn ast_map<'a>(&'a self) -> Option<&'a hir_map::Map<'ast>> {
@@ -317,7 +317,7 @@ impl<'ast, 'tcx> HirPrinterSupport<'ast> for IdentifiedAnnotation<'ast, 'tcx> {
317317
fn pp_ann<'a>(&'a self) -> &'a pprust_hir::PpAnn { self }
318318
}
319319

320-
impl<'ast, 'tcx> pprust_hir::PpAnn for IdentifiedAnnotation<'ast, 'tcx> {
320+
impl<'ast> pprust_hir::PpAnn for IdentifiedAnnotation<'ast> {
321321
fn pre(&self,
322322
s: &mut pprust_hir::State,
323323
node: pprust_hir::AnnNode) -> io::Result<()> {
@@ -356,12 +356,12 @@ impl<'ast, 'tcx> pprust_hir::PpAnn for IdentifiedAnnotation<'ast, 'tcx> {
356356
}
357357
}
358358

359-
struct HygieneAnnotation<'ast, 'tcx> {
360-
sess: &'tcx Session,
359+
struct HygieneAnnotation<'ast> {
360+
sess: &'ast Session,
361361
ast_map: Option<hir_map::Map<'ast>>,
362362
}
363363

364-
impl<'ast, 'tcx> PrinterSupport<'ast> for HygieneAnnotation<'ast, 'tcx> {
364+
impl<'ast> PrinterSupport<'ast> for HygieneAnnotation<'ast> {
365365
fn sess<'a>(&'a self) -> &'a Session { self.sess }
366366

367367
fn ast_map<'a>(&'a self) -> Option<&'a hir_map::Map<'ast>> {
@@ -371,7 +371,7 @@ impl<'ast, 'tcx> PrinterSupport<'ast> for HygieneAnnotation<'ast, 'tcx> {
371371
fn pp_ann<'a>(&'a self) -> &'a pprust::PpAnn { self }
372372
}
373373

374-
impl<'ast, 'tcx> pprust::PpAnn for HygieneAnnotation<'ast, 'tcx> {
374+
impl<'ast> pprust::PpAnn for HygieneAnnotation<'ast> {
375375
fn post(&self,
376376
s: &mut pprust::State,
377377
node: pprust::AnnNode) -> io::Result<()> {

src/librustc_front/hir.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ pub enum UnsafeSource {
586586
}
587587

588588
/// An expression
589-
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash,)]
589+
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash)]
590590
pub struct Expr {
591591
pub id: NodeId,
592592
pub node: Expr_,

0 commit comments

Comments
 (0)