提交 f6d60f32 编写于 作者: N Niko Matsakis

Stop using diagnostics to avoid merge conflicts.

上级 840ce00a
...@@ -67,6 +67,5 @@ ...@@ -67,6 +67,5 @@
E0173, E0173,
E0174, E0174,
E0177, E0177,
E0178, E0178
E0179 // parenthesized params may only be used with a trait
) )
...@@ -235,7 +235,8 @@ fn ast_path_substs_for_ty<'tcx,AC,RS>( ...@@ -235,7 +235,8 @@ fn ast_path_substs_for_ty<'tcx,AC,RS>(
convert_angle_bracketed_parameters(this, rscope, data) convert_angle_bracketed_parameters(this, rscope, data)
} }
ast::ParenthesizedParameters(ref data) => { ast::ParenthesizedParameters(ref data) => {
span_err!(tcx.sess, path.span, E0173, tcx.sess.span_err(
path.span,
"parenthesized parameters may only be used with a trait"); "parenthesized parameters may only be used with a trait");
(Vec::new(), convert_parenthesized_parameters(this, data), Vec::new()) (Vec::new(), convert_parenthesized_parameters(this, data), Vec::new())
} }
......
...@@ -5143,7 +5143,8 @@ fn push_explicit_parameters_from_segment_to_substs<'a, 'tcx>( ...@@ -5143,7 +5143,8 @@ fn push_explicit_parameters_from_segment_to_substs<'a, 'tcx>(
} }
ast::ParenthesizedParameters(ref data) => { ast::ParenthesizedParameters(ref data) => {
span_err!(fcx.tcx().sess, span, E0173, fcx.tcx().sess.span_err(
span,
"parenthesized parameters may only be used with a trait"); "parenthesized parameters may only be used with a trait");
push_explicit_parenthesized_parameters_from_segment_to_substs( push_explicit_parenthesized_parameters_from_segment_to_substs(
fcx, space, span, type_defs, data, substs); fcx, space, span, type_defs, data, substs);
......
...@@ -17,7 +17,7 @@ struct Bar<A,R> { ...@@ -17,7 +17,7 @@ struct Bar<A,R> {
fn bar() { fn bar() {
let x: Box<Bar()> = panic!(); let x: Box<Bar()> = panic!();
//~^ ERROR E0169 //~^ ERROR parenthesized parameters may only be used with a trait
} }
fn main() { } fn main() { }
......
...@@ -15,7 +15,7 @@ struct Bar<A,R> { ...@@ -15,7 +15,7 @@ struct Bar<A,R> {
} }
fn foo(b: Box<Bar()>) { fn foo(b: Box<Bar()>) {
//~^ ERROR E0169 //~^ ERROR parenthesized parameters may only be used with a trait
} }
fn main() { } fn main() { }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册