summaryrefslogtreecommitdiffstats
path: root/tests/ui/deprecation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/deprecation')
-rw-r--r--tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed2
-rw-r--r--tests/ui/deprecation/issue-84637-deprecated-associated-function.rs2
-rw-r--r--tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr13
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed
index 85e882870..659b54655 100644
--- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed
+++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed
@@ -6,4 +6,6 @@ fn main() {
let _foo = str::trim_start(" aoeu"); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
let _bar = " aoeu".trim_start(); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
+
+ let _baz = ["a", "b"].join(" "); //~ ERROR use of deprecated method `std::slice::<impl [T]>::connect`: renamed to join [deprecated]
}
diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
index 246de2f5e..cfc6c4450 100644
--- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
+++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
@@ -6,4 +6,6 @@ fn main() {
let _foo = str::trim_left(" aoeu"); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
let _bar = " aoeu".trim_left(); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
+
+ let _baz = ["a", "b"].connect(" "); //~ ERROR use of deprecated method `std::slice::<impl [T]>::connect`: renamed to join [deprecated]
}
diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr b/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr
index 3b518d180..d1f5ea360 100644
--- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr
+++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr
@@ -25,5 +25,16 @@ help: replace the use of the deprecated method
LL | let _bar = " aoeu".trim_start();
| ~~~~~~~~~~
-error: aborting due to 2 previous errors
+error: use of deprecated method `std::slice::<impl [T]>::connect`: renamed to join
+ --> $DIR/issue-84637-deprecated-associated-function.rs:10:27
+ |
+LL | let _baz = ["a", "b"].connect(" ");
+ | ^^^^^^^
+ |
+help: replace the use of the deprecated method
+ |
+LL | let _baz = ["a", "b"].join(" ");
+ | ~~~~
+
+error: aborting due to 3 previous errors