Skip to content

Commit

Permalink
Stop using diagnostics to avoid merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Dec 14, 2014
1 parent 840ce00 commit f6d60f3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,5 @@ register_diagnostics!(
E0173,
E0174,
E0177,
E0178,
E0179 // parenthesized params may only be used with a trait
E0178
)
5 changes: 3 additions & 2 deletions src/librustc_typeck/astconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ fn ast_path_substs_for_ty<'tcx,AC,RS>(
convert_angle_bracketed_parameters(this, rscope, data)
}
ast::ParenthesizedParameters(ref data) => {
span_err!(tcx.sess, path.span, E0173,
"parenthesized parameters may only be used with a trait");
tcx.sess.span_err(
path.span,
"parenthesized parameters may only be used with a trait");
(Vec::new(), convert_parenthesized_parameters(this, data), Vec::new())
}
};
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5143,8 +5143,9 @@ pub fn instantiate_path<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
}

ast::ParenthesizedParameters(ref data) => {
span_err!(fcx.tcx().sess, span, E0173,
"parenthesized parameters may only be used with a trait");
fcx.tcx().sess.span_err(
span,
"parenthesized parameters may only be used with a trait");
push_explicit_parenthesized_parameters_from_segment_to_substs(
fcx, space, span, type_defs, data, substs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Bar<A,R> {

fn bar() {
let x: Box<Bar()> = panic!();
//~^ ERROR E0169
//~^ ERROR parenthesized parameters may only be used with a trait
}

fn main() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct Bar<A,R> {
}

fn foo(b: Box<Bar()>) {
//~^ ERROR E0169
//~^ ERROR parenthesized parameters may only be used with a trait
}

fn main() { }
Expand Down

5 comments on commit f6d60f3

@bors
Copy link
Contributor

@bors bors commented on f6d60f3 Dec 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from acrichto
at nikomatsakis@f6d60f3

@bors
Copy link
Contributor

@bors bors commented on f6d60f3 Dec 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging nikomatsakis/rust/unboxed-closure-purge-the-proc = f6d60f3 into auto

@bors
Copy link
Contributor

@bors bors commented on f6d60f3 Dec 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nikomatsakis/rust/unboxed-closure-purge-the-proc = f6d60f3 merged ok, testing candidate = 52f7a4a

@bors
Copy link
Contributor

@bors bors commented on f6d60f3 Dec 14, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 52f7a4a

Please sign in to comment.