Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move option_env! and env! tests to the env-macro directory #122657

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/tools/tidy/src/issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,6 @@
"ui/errors/issue-89280-emitter-overflow-splice-lines.rs",
"ui/errors/issue-99572-impl-trait-on-pointer.rs",
"ui/expr/if/issue-4201.rs",
"ui/extenv/issue-110547.rs",
"ui/extenv/issue-55897.rs",
"ui/extern/auxiliary/issue-80074-macro-2.rs",
"ui/extern/auxiliary/issue-80074-macro.rs",
"ui/extern/issue-10025.rs",
Expand Down
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 @@ -18,7 +18,7 @@ const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.

const ISSUES_ENTRY_LIMIT: usize = 1750;
const ROOT_ENTRY_LIMIT: usize = 866;
const ROOT_ENTRY_LIMIT: usize = 859;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: expected string literal
--> $DIR/extenv-arg-2-not-string-literal.rs:1:25
--> $DIR/env-arg-2-not-string-literal.rs:1:25
|
LL | fn main() { env!("one", 10); }
| ^^
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: environment variable `\t` not defined at compile time
--> $DIR/extenv-escaped-var.rs:2:5
--> $DIR/env-escaped-var.rs:2:5
|
LL | env!("\t");
| ^^^^^^^^^^
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `env!()` takes 1 or 2 arguments
--> $DIR/extenv-no-args.rs:1:13
--> $DIR/env-no-args.rs:1:13
|
LL | fn main() { env!(); }
| ^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: my error message
--> $DIR/extenv-not-defined-custom.rs:1:13
--> $DIR/env-not-defined-custom.rs:1:13
|
LL | fn main() { env!("__HOPEFULLY_NOT_DEFINED__", "my error message"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: environment variable `CARGO__HOPEFULLY_NOT_DEFINED__` not defined at compile time
--> $DIR/extenv-not-defined-default.rs:2:5
--> $DIR/env-not-defined-default.rs:2:5
|
LL | env!("CARGO__HOPEFULLY_NOT_DEFINED__");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: expected string literal
--> $DIR/extenv-not-string-literal.rs:1:18
--> $DIR/env-not-string-literal.rs:1:18
|
LL | fn main() { env!(10, "two"); }
| ^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `env!()` takes 1 or 2 arguments
--> $DIR/extenv-too-many-args.rs:1:13
--> $DIR/env-too-many-args.rs:1:13
|
LL | fn main() { env!("one", "two", "three"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: environment variable `NON_EXISTENT` not defined at compile time
--> $DIR/issue-55897.rs:10:22
--> $DIR/error-recovery-issue-55897.rs:10:22
|
LL | include!(concat!(env!("NON_EXISTENT"), "/data.rs"));
| ^^^^^^^^^^^^^^^^^^^^
Expand All @@ -8,13 +8,13 @@ LL | include!(concat!(env!("NON_EXISTENT"), "/data.rs"));
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: suffixes on string literals are invalid
--> $DIR/issue-55897.rs:15:22
--> $DIR/error-recovery-issue-55897.rs:15:22
|
LL | include!(concat!("NON_EXISTENT"suffix, "/data.rs"));
| ^^^^^^^^^^^^^^^^^^^^ invalid suffix `suffix`

error[E0432]: unresolved import `prelude`
--> $DIR/issue-55897.rs:1:5
--> $DIR/error-recovery-issue-55897.rs:1:5
|
LL | use prelude::*;
| ^^^^^^^
Expand All @@ -23,7 +23,7 @@ LL | use prelude::*;
| help: a similar path exists: `std::prelude`

error[E0432]: unresolved import `env`
--> $DIR/issue-55897.rs:4:9
--> $DIR/error-recovery-issue-55897.rs:4:9
|
LL | use env;
| ^^^ no `env` in the root
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: environment variable `\t` not defined at compile time
--> $DIR/issue-110547.rs:4:5
--> $DIR/name-whitespace-issue-110547.rs:4:5
|
LL | env!{"\t"};
| ^^^^^^^^^^
Expand All @@ -8,7 +8,7 @@ LL | env!{"\t"};
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: environment variable `\t` not defined at compile time
--> $DIR/issue-110547.rs:5:5
--> $DIR/name-whitespace-issue-110547.rs:5:5
|
LL | env!("\t");
| ^^^^^^^^^^
Expand All @@ -17,7 +17,7 @@ LL | env!("\t");
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)

error: environment variable `\u{2069}` not defined at compile time
--> $DIR/issue-110547.rs:6:5
--> $DIR/name-whitespace-issue-110547.rs:6:5
|
LL | env!("\u{2069}");
| ^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: option_env! takes 1 argument
--> $DIR/extoption_env-no-args.rs:1:13
--> $DIR/option_env-no-args.rs:1:13
|
LL | fn main() { option_env!(); }
| ^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: argument must be a string literal
--> $DIR/extoption_env-not-string-literal.rs:1:25
--> $DIR/option_env-not-string-literal.rs:1:25
|
LL | fn main() { option_env!(10); }
| ^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: option_env! takes 1 argument
--> $DIR/extoption_env-too-many-args.rs:1:13
--> $DIR/option_env-too-many-args.rs:1:13
|
LL | fn main() { option_env!("one", "two"); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading