Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split monster tests into smaller ones
- Loading branch information
Showing
29 changed files
with
456 additions
and
331 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/test/ui/existential_types/declared_but_never_defined.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// 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 <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. | ||
|
||
|
||
#![feature(existential_type)] | ||
|
||
fn main() {} | ||
|
||
// declared but never defined | ||
existential type Bar: std::fmt::Debug; //~ ERROR could not find defining uses |
8 changes: 8 additions & 0 deletions
8
src/test/ui/existential_types/declared_but_never_defined.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: could not find defining uses | ||
--> $DIR/declared_but_never_defined.rs:17:1 | ||
| | ||
LL | existential type Bar: std::fmt::Debug; //~ ERROR could not find defining uses | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
23 changes: 23 additions & 0 deletions
23
src/test/ui/existential_types/declared_but_not_defined_in_scope.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// 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 <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. | ||
|
||
|
||
#![feature(existential_type)] | ||
|
||
fn main() {} | ||
|
||
mod boo { | ||
// declared in module but not defined inside of it | ||
pub existential type Boo: ::std::fmt::Debug; //~ ERROR could not find defining uses | ||
} | ||
|
||
fn bomp() -> boo::Boo { | ||
"" | ||
} |
8 changes: 8 additions & 0 deletions
8
src/test/ui/existential_types/declared_but_not_defined_in_scope.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: could not find defining uses | ||
--> $DIR/declared_but_not_defined_in_scope.rs:18:5 | ||
| | ||
LL | pub existential type Boo: ::std::fmt::Debug; //~ ERROR could not find defining uses | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// 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 <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. | ||
|
||
|
||
#![feature(existential_type)] | ||
|
||
fn main() {} | ||
|
||
// two definitions with different types | ||
existential type Foo: std::fmt::Debug; | ||
|
||
fn foo() -> Foo { | ||
"" | ||
} | ||
|
||
fn bar() -> Foo { //~ ERROR defining existential type use differs from previous | ||
42i32 | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/ui/existential_types/different_defining_uses.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
error: defining existential type use differs from previous | ||
--> $DIR/different_defining_uses.rs:23:1 | ||
| | ||
LL | / fn bar() -> Foo { //~ ERROR defining existential type use differs from previous | ||
LL | | 42i32 | ||
LL | | } | ||
| |_^ | ||
| | ||
note: previous use here | ||
--> $DIR/different_defining_uses.rs:19:1 | ||
| | ||
LL | / fn foo() -> Foo { | ||
LL | | "" | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to previous error | ||
|
29 changes: 29 additions & 0 deletions
29
src/test/ui/existential_types/different_defining_uses_never_type.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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 <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. | ||
|
||
|
||
#![feature(existential_type)] | ||
|
||
fn main() {} | ||
|
||
// two definitions with different types | ||
existential type Foo: std::fmt::Debug; | ||
|
||
fn foo() -> Foo { | ||
"" | ||
} | ||
|
||
fn bar() -> Foo { //~ ERROR defining existential type use differs from previous | ||
panic!() | ||
} | ||
|
||
fn boo() -> Foo { //~ ERROR defining existential type use differs from previous | ||
loop {} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/test/ui/existential_types/different_defining_uses_never_type.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
error: defining existential type use differs from previous | ||
--> $DIR/different_defining_uses_never_type.rs:23:1 | ||
| | ||
LL | / fn bar() -> Foo { //~ ERROR defining existential type use differs from previous | ||
LL | | panic!() | ||
LL | | } | ||
| |_^ | ||
| | ||
note: previous use here | ||
--> $DIR/different_defining_uses_never_type.rs:19:1 | ||
| | ||
LL | / fn foo() -> Foo { | ||
LL | | "" | ||
LL | | } | ||
| |_^ | ||
|
||
error: defining existential type use differs from previous | ||
--> $DIR/different_defining_uses_never_type.rs:27:1 | ||
| | ||
LL | / fn boo() -> Foo { //~ ERROR defining existential type use differs from previous | ||
LL | | loop {} | ||
LL | | } | ||
| |_^ | ||
| | ||
note: previous use here | ||
--> $DIR/different_defining_uses_never_type.rs:19:1 | ||
| | ||
LL | / fn foo() -> Foo { | ||
LL | | "" | ||
LL | | } | ||
| |_^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
54 changes: 54 additions & 0 deletions
54
src/test/ui/existential_types/different_defining_uses_never_type2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// 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 <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. | ||
|
||
// compile-pass | ||
|
||
#![feature(existential_type)] | ||
|
||
fn main() {} | ||
|
||
// two definitions with different types | ||
existential type Foo: std::fmt::Debug; | ||
|
||
fn foo() -> Foo { | ||
"" | ||
} | ||
|
||
fn bar(arg: bool) -> Foo { | ||
if arg { | ||
panic!() | ||
} else { | ||
"bar" | ||
} | ||
} | ||
|
||
fn boo(arg: bool) -> Foo { | ||
if arg { | ||
loop {} | ||
} else { | ||
"boo" | ||
} | ||
} | ||
|
||
fn bar2(arg: bool) -> Foo { | ||
if arg { | ||
"bar2" | ||
} else { | ||
panic!() | ||
} | ||
} | ||
|
||
fn boo2(arg: bool) -> Foo { | ||
if arg { | ||
"boo2" | ||
} else { | ||
loop {} | ||
} | ||
} |
111 changes: 0 additions & 111 deletions
111
src/test/ui/existential_types/existential_type.nll.stderr
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.