diff options
| author | Cengiz Can <cengizc@gmail.com> | 2017-02-02 21:35:31 +0000 |
|---|---|---|
| committer | Cengiz Can <cengizc@gmail.com> | 2017-02-04 16:25:56 -0500 |
| commit | 3fa28cb206604fddf67a29e7cbd3a8b22da1edc2 (patch) | |
| tree | 92ac5b08f840db5d4d09fd77cefeecdd9e3ae290 /src/test/ui | |
| parent | 7aff6add92c5f8deea29af2a5aa7335d4e5843a9 (diff) | |
| download | rust-3fa28cb206604fddf67a29e7cbd3a8b22da1edc2.tar.gz rust-3fa28cb206604fddf67a29e7cbd3a8b22da1edc2.zip | |
Add a new ui test and update existing ones
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/codemap_tests/issue-38812-2.rs | 13 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/issue-38812-2.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/issue-38812.rs (renamed from src/test/ui/codemap_tests/repair_span_std_macros.rs) | 2 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/issue-38812.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/codemap_tests/repair_span_std_macros.stderr | 13 | ||||
| -rw-r--r-- | src/test/ui/missing-items/missing-type-parameter.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/missing-items/missing-type-parameter.stderr | 6 |
7 files changed, 41 insertions, 19 deletions
diff --git a/src/test/ui/codemap_tests/issue-38812-2.rs b/src/test/ui/codemap_tests/issue-38812-2.rs new file mode 100644 index 00000000000..c476657d207 --- /dev/null +++ b/src/test/ui/codemap_tests/issue-38812-2.rs @@ -0,0 +1,13 @@ +// Copyright 2017 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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let (x,) = (vec![],); +} diff --git a/src/test/ui/codemap_tests/issue-38812-2.stderr b/src/test/ui/codemap_tests/issue-38812-2.stderr new file mode 100644 index 00000000000..156a6bdee99 --- /dev/null +++ b/src/test/ui/codemap_tests/issue-38812-2.stderr @@ -0,0 +1,12 @@ +error[E0282]: type annotations needed + --> $DIR/issue-38812-2.rs:12:17 + | +12 | let (x,) = (vec![],); + | ---- ^^^^^^ cannot infer type for `T` + | | + | consider giving a type to pattern + | + = note: this error originates in a macro outside of the current crate + +error: aborting due to previous error + diff --git a/src/test/ui/codemap_tests/repair_span_std_macros.rs b/src/test/ui/codemap_tests/issue-38812.rs index 3abc91d4f5f..a9943f75336 100644 --- a/src/test/ui/codemap_tests/repair_span_std_macros.rs +++ b/src/test/ui/codemap_tests/issue-38812.rs @@ -1,4 +1,4 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // diff --git a/src/test/ui/codemap_tests/issue-38812.stderr b/src/test/ui/codemap_tests/issue-38812.stderr new file mode 100644 index 00000000000..6365e761453 --- /dev/null +++ b/src/test/ui/codemap_tests/issue-38812.stderr @@ -0,0 +1,12 @@ +error[E0282]: type annotations needed + --> $DIR/issue-38812.rs:12:13 + | +12 | let x = vec![]; + | - ^^^^^^ cannot infer type for `T` + | | + | consider giving `x` a type + | + = note: this error originates in a macro outside of the current crate + +error: aborting due to previous error + diff --git a/src/test/ui/codemap_tests/repair_span_std_macros.stderr b/src/test/ui/codemap_tests/repair_span_std_macros.stderr deleted file mode 100644 index 13e4b246c55..00000000000 --- a/src/test/ui/codemap_tests/repair_span_std_macros.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0282]: unable to fully infer type(s) - --> $DIR/repair_span_std_macros.rs:12:13 - | -12 | let x = vec![]; - | - ^^^^^^ cannot infer type - | | - | annotating the type for the variable `x` would help - | - = note: type annotations or generic parameter binding required - = note: this error originates in a macro outside of the current crate - -error: aborting due to previous error - diff --git a/src/test/ui/missing-items/missing-type-parameter.rs b/src/test/ui/missing-items/missing-type-parameter.rs index 3671abd6624..79368587062 100644 --- a/src/test/ui/missing-items/missing-type-parameter.rs +++ b/src/test/ui/missing-items/missing-type-parameter.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // diff --git a/src/test/ui/missing-items/missing-type-parameter.stderr b/src/test/ui/missing-items/missing-type-parameter.stderr index 03e9f61610d..a16ae5538bf 100644 --- a/src/test/ui/missing-items/missing-type-parameter.stderr +++ b/src/test/ui/missing-items/missing-type-parameter.stderr @@ -1,10 +1,8 @@ -error[E0282]: unable to fully infer type(s) +error[E0282]: type annotations needed --> $DIR/missing-type-parameter.rs:14:5 | 14 | foo(); - | ^^^ cannot infer type - | - = note: type annotations or generic parameter binding required + | ^^^ cannot infer type for `X` error: aborting due to previous error |
