From 9bb939d6107b72ced8aa0c8a8c447e88a80fdd30 Mon Sep 17 00:00:00 2001 From: Simon Martin Date: Sun, 27 May 2018 17:04:27 +0200 Subject: Address comments in pull request #51084. --- src/test/compile-fail/issue-51022.rs | 12 ------------ src/test/ui/issue-51022.rs | 12 ++++++++++++ src/test/ui/issue-51022.stderr | 9 +++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) delete mode 100644 src/test/compile-fail/issue-51022.rs create mode 100644 src/test/ui/issue-51022.rs create mode 100644 src/test/ui/issue-51022.stderr diff --git a/src/test/compile-fail/issue-51022.rs b/src/test/compile-fail/issue-51022.rs deleted file mode 100644 index d4d2192b8ae..00000000000 --- a/src/test/compile-fail/issue-51022.rs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// error-pattern: `main` function is not allowed to have lifetime parameters -fn main<'a>() { } diff --git a/src/test/ui/issue-51022.rs b/src/test/ui/issue-51022.rs new file mode 100644 index 00000000000..f9486fa57b1 --- /dev/null +++ b/src/test/ui/issue-51022.rs @@ -0,0 +1,12 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main<'a>() { } + //~^ ERROR `main` function is not allowed to have lifetime parameters [E0131] diff --git a/src/test/ui/issue-51022.stderr b/src/test/ui/issue-51022.stderr new file mode 100644 index 00000000000..3b691bbb033 --- /dev/null +++ b/src/test/ui/issue-51022.stderr @@ -0,0 +1,9 @@ +error[E0131]: `main` function is not allowed to have lifetime parameters + --> $DIR/issue-51022.rs:11:8 + | +LL | fn main<'a>() { } + | ^^^^ `main` cannot have lifetime parameters + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0131`. -- cgit 1.4.1-3-g733a5