diff options
| author | bors <bors@rust-lang.org> | 2020-02-28 02:19:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-02-28 02:19:31 +0000 |
| commit | 7497d93ef17d2b87fa8efb5c5de33f0bdc4155af (patch) | |
| tree | 8d57b787b10803b869d56281c9aab8f7350525aa /src/test | |
| parent | fbc46b7d71d0fe93066d7c026eccd01c16185cd4 (diff) | |
| parent | 02b96b3ecc48dc5245e425fc248163cfaae9643e (diff) | |
| download | rust-7497d93ef17d2b87fa8efb5c5de33f0bdc4155af.tar.gz rust-7497d93ef17d2b87fa8efb5c5de33f0bdc4155af.zip | |
Auto merge of #69534 - Dylan-DPC:rollup-fwa2lip, r=Dylan-DPC
Rollup of 9 pull requests Successful merges: - #69379 (Fail on multiple declarations of `main`.) - #69430 (librustc_typeck: remove loop that never actually loops) - #69449 (Do not ping PR reviewers in toolstate breakage) - #69491 (rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messages) - #69495 (don't take redundant references to operands) - #69496 (use find(x) instead of filter(x).next()) - #69501 (note that find(f) is equivalent to filter(f).next() in the docs.) - #69527 (Ignore untracked paths when running `rustfmt` on repository.) - #69529 (don't use .into() to convert types into identical types.) Failed merges: r? @ghost
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/duplicate/dupe-symbols-7.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/duplicate/dupe-symbols-7.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/duplicate/dupe-symbols-8.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/duplicate/dupe-symbols-8.stderr | 15 |
4 files changed, 29 insertions, 2 deletions
diff --git a/src/test/ui/duplicate/dupe-symbols-7.rs b/src/test/ui/duplicate/dupe-symbols-7.rs index 89a32c61620..633ca4c3189 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.rs +++ b/src/test/ui/duplicate/dupe-symbols-7.rs @@ -1,7 +1,7 @@ // build-fail // -// error-pattern: entry symbol `main` defined multiple times +// error-pattern: entry symbol `main` declared multiple times // FIXME https://github.com/rust-lang/rust/issues/59774 // normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> "" diff --git a/src/test/ui/duplicate/dupe-symbols-7.stderr b/src/test/ui/duplicate/dupe-symbols-7.stderr index 608ae27110a..2ea5521e095 100644 --- a/src/test/ui/duplicate/dupe-symbols-7.stderr +++ b/src/test/ui/duplicate/dupe-symbols-7.stderr @@ -1,4 +1,4 @@ -error: entry symbol `main` defined multiple times +error: entry symbol `main` declared multiple times --> $DIR/dupe-symbols-7.rs:12:1 | LL | fn main(){} diff --git a/src/test/ui/duplicate/dupe-symbols-8.rs b/src/test/ui/duplicate/dupe-symbols-8.rs new file mode 100644 index 00000000000..ce7fa24a9fe --- /dev/null +++ b/src/test/ui/duplicate/dupe-symbols-8.rs @@ -0,0 +1,12 @@ +// build-fail +// error-pattern: entry symbol `main` declared multiple times +// +// See #67946. + +#![allow(warnings)] +fn main() { + extern "Rust" { + fn main(); + } + unsafe { main(); } +} diff --git a/src/test/ui/duplicate/dupe-symbols-8.stderr b/src/test/ui/duplicate/dupe-symbols-8.stderr new file mode 100644 index 00000000000..f001201b8d0 --- /dev/null +++ b/src/test/ui/duplicate/dupe-symbols-8.stderr @@ -0,0 +1,15 @@ +error: entry symbol `main` declared multiple times + --> $DIR/dupe-symbols-8.rs:7:1 + | +LL | / fn main() { +LL | | extern "Rust" { +LL | | fn main(); +LL | | } +LL | | unsafe { main(); } +LL | | } + | |_^ + | + = help: did you use `#[no_mangle]` on `fn main`? Use `#[start]` instead + +error: aborting due to previous error + |
