From: Axary Date: Fri, 16 Nov 2018 18:35:13 +0000 (+0100) Subject: fix tidy (remove whitespace) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=2be930bd03d3c9b9230ae3b9cc8fc30b83378900;p=rust.git fix tidy (remove whitespace) --- diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a4b01f485d3..18929af4718 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5394,7 +5394,7 @@ fn parse_where_clause(&mut self) -> PResult<'a, WhereClause> { fn parse_fn_args(&mut self, named_args: bool, allow_variadic: bool) -> PResult<'a, (Vec , bool)> { self.expect(&token::OpenDelim(token::Paren))?; - + let sp = self.span; let mut variadic = false; let args: Vec> = diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.stderr b/src/test/ui/invalid-self-argument/bare-fn-start.stderr new file mode 100644 index 00000000000..d0eca1a9e5c --- /dev/null +++ b/src/test/ui/invalid-self-argument/bare-fn-start.stderr @@ -0,0 +1,8 @@ +error: unexpected `self` argument in function + --> $DIR/bare-fn-start.rs:1:7 + | +LL | fn a(&self) { } + | ^^^^ `self` is only valid as the first argument of a trait function + +error: aborting due to previous error + diff --git a/src/test/ui/invalid-self-argument/bare-fn.stderr b/src/test/ui/invalid-self-argument/bare-fn.stderr new file mode 100644 index 00000000000..bd6c598c88a --- /dev/null +++ b/src/test/ui/invalid-self-argument/bare-fn.stderr @@ -0,0 +1,8 @@ +error: unexpected `self` argument in function + --> $DIR/bare-fn.rs:1:21 + | +LL | fn b(foo: u32, &mut self) { } + | ^^^^ `self` is only valid as the first argument of a trait function + +error: aborting due to previous error + diff --git a/src/test/ui/invalid-self-argument/trait-fn.stderr b/src/test/ui/invalid-self-argument/trait-fn.stderr new file mode 100644 index 00000000000..d056e53b95c --- /dev/null +++ b/src/test/ui/invalid-self-argument/trait-fn.stderr @@ -0,0 +1,8 @@ +error: unexpected `self` argument in function + --> $DIR/trait-fn.rs:4:20 + | +LL | fn c(foo: u32, self) {} + | ^^^^ `self` is only valid as the first argument of a trait function + +error: aborting due to previous error +