Skip to content

Commit

Permalink
Move 100 entries from tests/ui into subdirs
Browse files Browse the repository at this point in the history
- Move super-fast-paren-parsing test into ui/parser
- Move stmt_expr_attrs test into ui/feature-gates
- Move macro tests into ui/macros
- Move global_asm tests into ui/asm
- Move env tests into ui/process
- Move xcrate tests into ui/cross-crate
- Move unop tests into ui/unop
- Move backtrace tests into ui/backtrace
- Move check-static tests into ui/statics
- Move expr tests into ui/expr
- Move optimization fuel tests into ui/fuel
- Move ffi attribute tests into ui/ffi-attrs
- Move suggestion tests into ui/suggestions
- Move main tests into ui/fn-main
- Move lint tests into ui/lint
- Move repr tests into ui/repr
- Move intrinsics tests into ui/intrinsics
- Move tool lint tests into ui/tool-attributes
- Move return tests into ui/return
- Move pattern tests into ui/patttern
- Move range tests into ui/range
- Move foreign-fn tests into ui/foreign
- Move orphan-check tests into ui/coherence
- Move inference tests into ui/inference
- Reduce ROOT_ENTRY_LIMIT
  • Loading branch information
workingjubilee committed May 21, 2024
1 parent 8e7517d commit d895008
Show file tree
Hide file tree
Showing 127 changed files with 42 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1676;
const ROOT_ENTRY_LIMIT: usize = 859;
const ROOT_ENTRY_LIMIT: usize = 757;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0603]: static `j` is private
--> $DIR/xcrate-private-by-default.rs:23:29
--> $DIR/private-by-default.rs:23:29
|
LL | static_priv_by_default::j;
| ^ private static
Expand All @@ -11,7 +11,7 @@ LL | static j: isize = 0;
| ^^^^^^^^^^^^^^^

error[E0603]: function `k` is private
--> $DIR/xcrate-private-by-default.rs:25:29
--> $DIR/private-by-default.rs:25:29
|
LL | static_priv_by_default::k;
| ^ private function
Expand All @@ -23,7 +23,7 @@ LL | fn k() {}
| ^^^^^^

error[E0603]: unit struct `l` is private
--> $DIR/xcrate-private-by-default.rs:27:29
--> $DIR/private-by-default.rs:27:29
|
LL | static_priv_by_default::l;
| ^ private unit struct
Expand All @@ -35,7 +35,7 @@ LL | struct l;
| ^^^^^^^^

error[E0603]: enum `m` is private
--> $DIR/xcrate-private-by-default.rs:29:35
--> $DIR/private-by-default.rs:29:35
|
LL | foo::<static_priv_by_default::m>();
| ^ private enum
Expand All @@ -47,7 +47,7 @@ LL | enum m {}
| ^^^^^^

error[E0603]: type alias `n` is private
--> $DIR/xcrate-private-by-default.rs:31:35
--> $DIR/private-by-default.rs:31:35
|
LL | foo::<static_priv_by_default::n>();
| ^ private type alias
Expand All @@ -59,7 +59,7 @@ LL | type n = isize;
| ^^^^^^

error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:35:29
--> $DIR/private-by-default.rs:35:29
|
LL | static_priv_by_default::foo::a;
| ^^^ - static `a` is not publicly re-exported
Expand All @@ -73,7 +73,7 @@ LL | mod foo {
| ^^^^^^^

error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:37:29
--> $DIR/private-by-default.rs:37:29
|
LL | static_priv_by_default::foo::b;
| ^^^ - function `b` is not publicly re-exported
Expand All @@ -87,7 +87,7 @@ LL | mod foo {
| ^^^^^^^

error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:39:29
--> $DIR/private-by-default.rs:39:29
|
LL | static_priv_by_default::foo::c;
| ^^^ - unit struct `c` is not publicly re-exported
Expand All @@ -101,7 +101,7 @@ LL | mod foo {
| ^^^^^^^

error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:41:35
--> $DIR/private-by-default.rs:41:35
|
LL | foo::<static_priv_by_default::foo::d>();
| ^^^ - enum `d` is not publicly re-exported
Expand All @@ -115,7 +115,7 @@ LL | mod foo {
| ^^^^^^^

error[E0603]: module `foo` is private
--> $DIR/xcrate-private-by-default.rs:43:35
--> $DIR/private-by-default.rs:43:35
|
LL | foo::<static_priv_by_default::foo::e>();
| ^^^ - type alias `e` is not publicly re-exported
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0423]: expected value, found struct `xcrate_unit_struct::StructWithFields`
--> $DIR/xcrate-unit-struct.rs:9:13
--> $DIR/unit-struct.rs:9:13
|
LL | let _ = xcrate_unit_struct::StructWithFields;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `xcrate_unit_struct::StructWithFields { foo: val }`
Expand All @@ -10,7 +10,7 @@ LL | pub struct StructWithFields {
| --------------------------- `xcrate_unit_struct::StructWithFields` defined here

error[E0423]: expected value, found struct `xcrate_unit_struct::StructWithPrivFields`
--> $DIR/xcrate-unit-struct.rs:11:13
--> $DIR/unit-struct.rs:11:13
|
LL | let _ = xcrate_unit_struct::StructWithPrivFields;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0601]: `main` function not found in crate `main_wrong_location`
--> $DIR/main-wrong-location.rs:5:2
error[E0601]: `main` function not found in crate `wrong_location`
--> $DIR/wrong-location.rs:5:2
|
LL | }
| ^ the main function must be defined at the crate level (in `$DIR/main-wrong-location.rs`)
| ^ the main function must be defined at the crate level (in `$DIR/wrong-location.rs`)
|
note: here is a function named `main`
--> $DIR/main-wrong-location.rs:4:5
--> $DIR/wrong-location.rs:4:5
|
LL | fn main() { }
| ^^^^^^^^^
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0580]: `main` function has wrong type
--> $DIR/main-wrong-type.rs:6:1
--> $DIR/wrong-type.rs:6:1
|
LL | fn main(foo: S) {
| ^^^^^^^^^^^^^^^ incorrect number of function parameters
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
--> $DIR/intrinsics-always-extern.rs:4:32
--> $DIR/always-extern.rs:4:32
|
LL | extern "rust-intrinsic" fn foo(&self);
| ^^^

error[E0093]: unrecognized intrinsic function: `hello`
--> $DIR/intrinsics-always-extern.rs:12:28
--> $DIR/always-extern.rs:12:28
|
LL | extern "rust-intrinsic" fn hello() {
| ^^^^^ unrecognized intrinsic
|
= help: if you're adding an intrinsic, be sure to update `check_intrinsic_type`

error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
--> $DIR/intrinsics-always-extern.rs:8:43
--> $DIR/always-extern.rs:8:43
|
LL | extern "rust-intrinsic" fn foo(&self) {
| ___________________________________________^
LL | | }
| |_____^

error: intrinsic must be in `extern "rust-intrinsic" { ... }` block
--> $DIR/intrinsics-always-extern.rs:12:36
--> $DIR/always-extern.rs:12:36
|
LL | extern "rust-intrinsic" fn hello() {
| ____________________________________^
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: unused variable: `x`
--> $DIR/lint-group-forbid-always-trumps-cli.rs:4:9
--> $DIR/group-forbid-always-trumps-cli.rs:4:9
|
LL | let x = 1;
| ^ help: if this is intentional, prefix it with an underscore: `_x`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
#![allow(unused_parens)]
#![allow(non_upper_case_globals)]
#![allow(dead_code)]
//@ exec-env:RUST_MIN_STACK=16000000
//@ rustc-env:RUST_MIN_STACK=16000000
//
// Big stack is needed for pretty printing, a little sad...
#![cfg_attr(rustfmt, rustfmt::skip)]

static a: isize =
(((((((((((((((((((((((((((((((((((((((((((((((((((
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0764]: mutable references are not allowed in the final value of statics
--> $DIR/check-static-immutable-mut-slices.rs:3:37
--> $DIR/check-immutable-mut-slices.rs:3:37
|
LL | static TEST: &'static mut [isize] = &mut [];
| ^^^^^^^
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0493]: destructor of `SafeStruct` cannot be evaluated at compile-time
--> $DIR/check-static-values-constraints.rs:64:7
--> $DIR/check-values-constraints.rs:64:7
|
LL | ..SafeStruct {
| _______^
Expand All @@ -12,15 +12,15 @@ LL | };
| - value is dropped here

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:81:33
--> $DIR/check-values-constraints.rs:81:33
|
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:81:33
--> $DIR/check-values-constraints.rs:81:33
|
LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
| ^^^^^^^^^^^^^
Expand All @@ -30,7 +30,7 @@ LL | static STATIC11: Vec<MyOwned> = vec![MyOwned];
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `<str as ToString>::to_string` in statics
--> $DIR/check-static-values-constraints.rs:92:38
--> $DIR/check-values-constraints.rs:92:38
|
LL | field2: SafeEnum::Variant4("str".to_string()),
| ^^^^^^^^^^^
Expand All @@ -43,15 +43,15 @@ LL + #![feature(const_trait_impl)]
|

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:96:5
--> $DIR/check-values-constraints.rs:96:5
|
LL | vec![MyOwned],
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:96:5
--> $DIR/check-values-constraints.rs:96:5
|
LL | vec![MyOwned],
| ^^^^^^^^^^^^^
Expand All @@ -61,15 +61,15 @@ LL | vec![MyOwned],
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:98:5
--> $DIR/check-values-constraints.rs:98:5
|
LL | vec![MyOwned],
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:98:5
--> $DIR/check-values-constraints.rs:98:5
|
LL | vec![MyOwned],
| ^^^^^^^^^^^^^
Expand All @@ -79,15 +79,15 @@ LL | vec![MyOwned],
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:103:6
--> $DIR/check-values-constraints.rs:103:6
|
LL | &vec![MyOwned],
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:103:6
--> $DIR/check-values-constraints.rs:103:6
|
LL | &vec![MyOwned],
| ^^^^^^^^^^^^^
Expand All @@ -97,15 +97,15 @@ LL | &vec![MyOwned],
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:105:6
--> $DIR/check-values-constraints.rs:105:6
|
LL | &vec![MyOwned],
| ^^^^^^^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [MyOwned]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:105:6
--> $DIR/check-values-constraints.rs:105:6
|
LL | &vec![MyOwned],
| ^^^^^^^^^^^^^
Expand All @@ -115,15 +115,15 @@ LL | &vec![MyOwned],
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:111:31
--> $DIR/check-values-constraints.rs:111:31
|
LL | static STATIC19: Vec<isize> = vec![3];
| ^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:111:31
--> $DIR/check-values-constraints.rs:111:31
|
LL | static STATIC19: Vec<isize> = vec![3];
| ^^^^^^^
Expand All @@ -133,15 +133,15 @@ LL | static STATIC19: Vec<isize> = vec![3];
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0010]: allocations are not allowed in statics
--> $DIR/check-static-values-constraints.rs:117:32
--> $DIR/check-values-constraints.rs:117:32
|
LL | static x: Vec<isize> = vec![3];
| ^^^^^^^ allocation not allowed in statics
|
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0015]: cannot call non-const fn `slice::<impl [isize]>::into_vec::<std::alloc::Global>` in statics
--> $DIR/check-static-values-constraints.rs:117:32
--> $DIR/check-values-constraints.rs:117:32
|
LL | static x: Vec<isize> = vec![3];
| ^^^^^^^
Expand All @@ -151,7 +151,7 @@ LL | static x: Vec<isize> = vec![3];
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of static item `x`
--> $DIR/check-static-values-constraints.rs:119:9
--> $DIR/check-values-constraints.rs:119:9
|
LL | x
| ^ move occurs because `x` has type `Vec<isize>`, which does not implement the `Copy` trait
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d895008

Please sign in to comment.