Skip to content

Commit 0ff1153

Browse files
committed
---
yaml --- r: 104923 b: refs/heads/snap-stage3 c: 87c7c03 h: refs/heads/master i: 104921: a9c54c6 104919: f63d764 v: v3
1 parent 8b57458 commit 0ff1153

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
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: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 92f0bc29355ac990595e1771c4bb9a3b7e358d30
4+
refs/heads/snap-stage3: 87c7c03f4585a35f1bc6d3e607a08e3beea48041
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/driver/driver.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,15 +596,15 @@ struct IdentifiedAnnotation;
596596

597597
impl pprust::PpAnn for IdentifiedAnnotation {
598598
fn pre(&self,
599-
s: &mut pprust::State<IdentifiedAnnotation>,
599+
s: &mut pprust::State,
600600
node: pprust::AnnNode) -> io::IoResult<()> {
601601
match node {
602602
pprust::NodeExpr(_) => s.popen(),
603603
_ => Ok(())
604604
}
605605
}
606606
fn post(&self,
607-
s: &mut pprust::State<IdentifiedAnnotation>,
607+
s: &mut pprust::State,
608608
node: pprust::AnnNode) -> io::IoResult<()> {
609609
match node {
610610
pprust::NodeItem(item) => {
@@ -634,15 +634,15 @@ struct TypedAnnotation {
634634
635635
impl pprust::PpAnn for TypedAnnotation {
636636
fn pre(&self,
637-
s: &mut pprust::State<TypedAnnotation>,
637+
s: &mut pprust::State,
638638
node: pprust::AnnNode) -> io::IoResult<()> {
639639
match node {
640640
pprust::NodeExpr(_) => s.popen(),
641641
_ => Ok(())
642642
}
643643
}
644644
fn post(&self,
645-
s: &mut pprust::State<TypedAnnotation>,
645+
s: &mut pprust::State,
646646
node: pprust::AnnNode) -> io::IoResult<()> {
647647
let tcx = &self.analysis.ty_cx;
648648
match node {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct LoopScope<'a> {
8585

8686
impl<'a, O:DataFlowOperator> pprust::PpAnn for DataFlowContext<'a, O> {
8787
fn pre(&self,
88-
ps: &mut pprust::State<DataFlowContext<'a, O>>,
88+
ps: &mut pprust::State,
8989
node: pprust::AnnNode) -> io::IoResult<()> {
9090
let id = match node {
9191
pprust::NodeExpr(expr) => expr.id,

branches/snap-stage3/src/libsyntax/fold.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@ mod test {
880880
use super::*;
881881

882882
// this version doesn't care about getting comments or docstrings in.
883-
fn fake_print_crate<A: pprust::PpAnn>(s: &mut pprust::State<A>,
884-
krate: &ast::Crate) -> io::IoResult<()> {
883+
fn fake_print_crate(s: &mut pprust::State,
884+
krate: &ast::Crate) -> io::IoResult<()> {
885885
s.print_mod(&krate.module, krate.attrs.as_slice())
886886
}
887887

branches/snap-stage3/src/libsyntax/print/pprust.rs

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ pub enum AnnNode<'a> {
4343
}
4444

4545
pub trait PpAnn {
46-
fn pre(&self, _state: &mut State<Self>, _node: AnnNode) -> IoResult<()> { Ok(()) }
47-
fn post(&self, _state: &mut State<Self>, _node: AnnNode) -> IoResult<()> { Ok(()) }
46+
fn pre(&self, _state: &mut State, _node: AnnNode) -> IoResult<()> { Ok(()) }
47+
fn post(&self, _state: &mut State, _node: AnnNode) -> IoResult<()> { Ok(()) }
4848
}
4949

5050
pub struct NoAnn;
@@ -56,23 +56,24 @@ pub struct CurrentCommentAndLiteral {
5656
cur_lit: uint,
5757
}
5858

59-
pub struct State<'a, A> {
59+
pub struct State<'a> {
6060
s: pp::Printer,
6161
cm: Option<&'a CodeMap>,
6262
intr: @token::IdentInterner,
6363
comments: Option<Vec<comments::Comment> >,
6464
literals: Option<Vec<comments::Literal> >,
6565
cur_cmnt_and_lit: CurrentCommentAndLiteral,
6666
boxes: RefCell<Vec<pp::Breaks> >,
67-
ann: &'a A
67+
ann: &'a PpAnn
6868
}
6969

70-
pub fn rust_printer(writer: ~io::Writer) -> State<'static, NoAnn> {
70+
pub fn rust_printer(writer: ~io::Writer) -> State<'static> {
7171
static NO_ANN: NoAnn = NoAnn;
7272
rust_printer_annotated(writer, &NO_ANN)
7373
}
7474

75-
pub fn rust_printer_annotated<'a, A: PpAnn>(writer: ~io::Writer, ann: &'a A) -> State<'a, A> {
75+
pub fn rust_printer_annotated<'a>(writer: ~io::Writer,
76+
ann: &'a PpAnn) -> State<'a> {
7677
State {
7778
s: pp::mk_printer(writer, default_columns),
7879
cm: None,
@@ -95,14 +96,14 @@ pub static default_columns: uint = 78u;
9596
// Requires you to pass an input filename and reader so that
9697
// it can scan the input text for comments and literals to
9798
// copy forward.
98-
pub fn print_crate<'a, A: PpAnn>(cm: &'a CodeMap,
99-
span_diagnostic: &diagnostic::SpanHandler,
100-
krate: &ast::Crate,
101-
filename: ~str,
102-
input: &mut io::Reader,
103-
out: ~io::Writer,
104-
ann: &'a A,
105-
is_expanded: bool) -> IoResult<()> {
99+
pub fn print_crate<'a>(cm: &'a CodeMap,
100+
span_diagnostic: &diagnostic::SpanHandler,
101+
krate: &ast::Crate,
102+
filename: ~str,
103+
input: &mut io::Reader,
104+
out: ~io::Writer,
105+
ann: &'a PpAnn,
106+
is_expanded: bool) -> IoResult<()> {
106107
let (cmnts, lits) = comments::gather_comments_and_literals(
107108
span_diagnostic,
108109
filename,
@@ -133,7 +134,7 @@ pub fn print_crate<'a, A: PpAnn>(cm: &'a CodeMap,
133134
eof(&mut s.s)
134135
}
135136

136-
pub fn to_str(f: |&mut State<NoAnn>| -> IoResult<()>) -> ~str {
137+
pub fn to_str(f: |&mut State| -> IoResult<()>) -> ~str {
137138
let mut s = rust_printer(~MemWriter::new());
138139
f(&mut s).unwrap();
139140
eof(&mut s.s).unwrap();
@@ -237,7 +238,7 @@ pub fn visibility_qualified(vis: ast::Visibility, s: &str) -> ~str {
237238
}
238239
}
239240

240-
impl<'a, A: PpAnn> State<'a, A> {
241+
impl<'a> State<'a> {
241242
pub fn ibox(&mut self, u: uint) -> IoResult<()> {
242243
self.boxes.borrow_mut().get().push(pp::Inconsistent);
243244
pp::ibox(&mut self.s, u)
@@ -365,7 +366,7 @@ impl<'a, A: PpAnn> State<'a, A> {
365366
}
366367

367368
pub fn commasep<T>(&mut self, b: Breaks, elts: &[T],
368-
op: |&mut State<A>, &T| -> IoResult<()>)
369+
op: |&mut State, &T| -> IoResult<()>)
369370
-> IoResult<()> {
370371
try!(self.rbox(0u, b));
371372
let mut first = true;
@@ -381,7 +382,7 @@ impl<'a, A: PpAnn> State<'a, A> {
381382
&mut self,
382383
b: Breaks,
383384
elts: &[T],
384-
op: |&mut State<A>, &T| -> IoResult<()>,
385+
op: |&mut State, &T| -> IoResult<()>,
385386
get_span: |&T| -> codemap::Span) -> IoResult<()> {
386387
try!(self.rbox(0u, b));
387388
let len = elts.len();

0 commit comments

Comments
 (0)