diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2018-10-15 10:15:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-15 10:15:22 -0700 |
| commit | 4d837bef052af3e0d243a848e6ed333886665088 (patch) | |
| tree | 936fc03c400a84efd18381059af970a3a5a2188a | |
| parent | 6993a051e78bad6ac6144d487b44578d393ad8c8 (diff) | |
| parent | ac6b3f88c77444a4080f24e8620ece911a467231 (diff) | |
| download | rust-4d837bef052af3e0d243a848e6ed333886665088.tar.gz rust-4d837bef052af3e0d243a848e6ed333886665088.zip | |
Rollup merge of #55081 - sinkuu:dedup_test, r=Manishearth
Deduplicate tests * [`ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4`](https://github.com/rust-lang/rust/blob/0c665e20db6c61de8f741bca3ca7660e679885c0/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.rs) and [`ex3-both-anon-regions-both-are-structs-3`](https://github.com/rust-lang/rust/blob/0c665e20db6c61de8f741bca3ca7660e679885c0/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs) * [`ui/lint/lint-group-style`](https://github.com/rust-lang/rust/blob/0c665e20db6c61de8f741bca3ca7660e679885c0/src/test/ui/lint/lint-group-style.rs) and [`lint-group-nonstandard-style`](https://github.com/rust-lang/rust/blob/0c665e20db6c61de8f741bca3ca7660e679885c0/src/test/ui/lint/lint-group-nonstandard-style.rs)
5 files changed, 0 insertions, 148 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr deleted file mode 100644 index 4f0efe24cf7..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:5 - | -LL | fn foo(mut x: Ref) { - | ----- - | | - | has type `Ref<'_, '1>` - | has type `Ref<'2, '_>` -LL | x.a = x.b; //~ ERROR lifetime mismatch - | ^^^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.rs b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.rs deleted file mode 100644 index 78e6dc2d3e7..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.rs +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -struct Ref<'a, 'b> { - a: &'a u32, - b: &'b u32, -} - -fn foo(mut x: Ref) { - x.a = x.b; //~ ERROR lifetime mismatch -} - -fn main() {} diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr deleted file mode 100644 index ccc5e02ab70..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error[E0623]: lifetime mismatch - --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:11 - | -LL | fn foo(mut x: Ref) { - | --- - | | - | this type is declared with multiple lifetimes... -LL | x.a = x.b; //~ ERROR lifetime mismatch - | ^^^ ...but data with one lifetime flows into the other here - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0623`. diff --git a/src/test/ui/lint/lint-group-style.rs b/src/test/ui/lint/lint-group-style.rs deleted file mode 100644 index 55d6168e6e0..00000000000 --- a/src/test/ui/lint/lint-group-style.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2014–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. - -#![deny(nonstandard_style)] -#![allow(dead_code)] - -fn CamelCase() {} //~ ERROR should have a snake - -#[allow(nonstandard_style)] -mod test { - fn CamelCase() {} - - #[forbid(nonstandard_style)] - mod bad { - fn CamelCase() {} //~ ERROR should have a snake - - static bad: isize = 1; //~ ERROR should have an upper - } - - mod warn { - #![warn(nonstandard_style)] - - fn CamelCase() {} //~ WARN should have a snake - - struct snake_case; //~ WARN should have a camel - } -} - -fn main() {} diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr deleted file mode 100644 index 6b91ce5b93c..00000000000 --- a/src/test/ui/lint/lint-group-style.stderr +++ /dev/null @@ -1,67 +0,0 @@ -error: function `CamelCase` should have a snake case name such as `camel_case` - --> $DIR/lint-group-style.rs:14:1 - | -LL | fn CamelCase() {} //~ ERROR should have a snake - | ^^^^^^^^^^^^^^^^^ - | -note: lint level defined here - --> $DIR/lint-group-style.rs:11:9 - | -LL | #![deny(nonstandard_style)] - | ^^^^^^^^^^^^^^^^^ - = note: #[deny(non_snake_case)] implied by #[deny(nonstandard_style)] - -error: function `CamelCase` should have a snake case name such as `camel_case` - --> $DIR/lint-group-style.rs:22:9 - | -LL | fn CamelCase() {} //~ ERROR should have a snake - | ^^^^^^^^^^^^^^^^^ - | -note: lint level defined here - --> $DIR/lint-group-style.rs:20:14 - | -LL | #[forbid(nonstandard_style)] - | ^^^^^^^^^^^^^^^^^ - = note: #[forbid(non_snake_case)] implied by #[forbid(nonstandard_style)] - -error: static variable `bad` should have an upper case name such as `BAD` - --> $DIR/lint-group-style.rs:24:9 - | -LL | static bad: isize = 1; //~ ERROR should have an upper - | ^^^^^^^^^^^^^^^^^^^^^^ - | -note: lint level defined here - --> $DIR/lint-group-style.rs:20:14 - | -LL | #[forbid(nonstandard_style)] - | ^^^^^^^^^^^^^^^^^ - = note: #[forbid(non_upper_case_globals)] implied by #[forbid(nonstandard_style)] - -warning: function `CamelCase` should have a snake case name such as `camel_case` - --> $DIR/lint-group-style.rs:30:9 - | -LL | fn CamelCase() {} //~ WARN should have a snake - | ^^^^^^^^^^^^^^^^^ - | -note: lint level defined here - --> $DIR/lint-group-style.rs:28:17 - | -LL | #![warn(nonstandard_style)] - | ^^^^^^^^^^^^^^^^^ - = note: #[warn(non_snake_case)] implied by #[warn(nonstandard_style)] - -warning: type `snake_case` should have a camel case name such as `SnakeCase` - --> $DIR/lint-group-style.rs:32:9 - | -LL | struct snake_case; //~ WARN should have a camel - | ^^^^^^^^^^^^^^^^^^ - | -note: lint level defined here - --> $DIR/lint-group-style.rs:28:17 - | -LL | #![warn(nonstandard_style)] - | ^^^^^^^^^^^^^^^^^ - = note: #[warn(non_camel_case_types)] implied by #[warn(nonstandard_style)] - -error: aborting due to 3 previous errors - |
