mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Remove env macro use from ui tests. (#16580)
`env` requires that the test machine has the variable defined. changelog: none
This commit is contained in:
@@ -114,6 +114,12 @@ fn issue16322(item: String) {
|
||||
}
|
||||
|
||||
fn issue16458() {
|
||||
macro_rules! m {
|
||||
() => {
|
||||
""
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! partly_comes_from_macro {
|
||||
($i:ident: $ty:ty, $def:expr) => {
|
||||
let _ = {
|
||||
@@ -125,7 +131,7 @@ fn issue16458() {
|
||||
}
|
||||
|
||||
partly_comes_from_macro! {
|
||||
required_version: String, env!("HOME").to_string()
|
||||
required_version: String, m!().to_string()
|
||||
}
|
||||
|
||||
macro_rules! all_comes_from_macro {
|
||||
@@ -141,6 +147,6 @@ fn issue16458() {
|
||||
};
|
||||
}
|
||||
all_comes_from_macro! {
|
||||
required_version: String, env!("HOME").to_string();
|
||||
required_version: String, m!().to_string();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,6 +114,12 @@ fn issue16322(item: String) {
|
||||
}
|
||||
|
||||
fn issue16458() {
|
||||
macro_rules! m {
|
||||
() => {
|
||||
""
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! partly_comes_from_macro {
|
||||
($i:ident: $ty:ty, $def:expr) => {
|
||||
let _ = {
|
||||
@@ -125,7 +131,7 @@ macro_rules! partly_comes_from_macro {
|
||||
}
|
||||
|
||||
partly_comes_from_macro! {
|
||||
required_version: String, env!("HOME").to_string()
|
||||
required_version: String, m!().to_string()
|
||||
}
|
||||
|
||||
macro_rules! all_comes_from_macro {
|
||||
@@ -141,6 +147,6 @@ macro_rules! all_comes_from_macro {
|
||||
};
|
||||
}
|
||||
all_comes_from_macro! {
|
||||
required_version: String, env!("HOME").to_string();
|
||||
required_version: String, m!().to_string();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,13 +56,13 @@ LL | if item == t!(frohes_neu_Jahr).to_string() {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `t!(frohes_neu_Jahr)`
|
||||
|
||||
error: this creates an owned instance just for comparison
|
||||
--> tests/ui/cmp_owned/with_suggestion.rs:135:51
|
||||
--> tests/ui/cmp_owned/with_suggestion.rs:141:51
|
||||
|
|
||||
LL | let res = <$ty>::default() == "$def".to_string();
|
||||
| ^^^^^^^^^^^^^^^^^^ help: try: `"$def"`
|
||||
...
|
||||
LL | / all_comes_from_macro! {
|
||||
LL | | required_version: String, env!("HOME").to_string();
|
||||
LL | | required_version: String, m!().to_string();
|
||||
LL | | }
|
||||
| |_____- in this macro invocation
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user