about summary refs log tree commit diff
path: root/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/deprecation/issue-84637-deprecated-associated-function.rs')
-rw-r--r--tests/ui/deprecation/issue-84637-deprecated-associated-function.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
new file mode 100644
index 00000000000..62bf84aa3ea
--- /dev/null
+++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs
@@ -0,0 +1,9 @@
+// run-rustfix
+
+#![deny(deprecated)]
+
+fn main() {
+    let _foo = str::trim_left("   aoeu"); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
+
+    let _bar = "   aoeu".trim_left(); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated]
+}