Skip to content

Commit e15ce94

Browse files
committed
tests: tighten CHECK-NOTs to make str-to-string-128690.rs less likely to collide with symbol name mangling
1 parent 1805b33 commit e15ce94

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: tests/codegen/issues/str-to-string-128690.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@
22
#![crate_type = "lib"]
33

44
//! Make sure str::to_string is specialized not to use fmt machinery.
5+
//!
6+
//! Note that the `CHECK-NOT`s here try to match on calls to functions under `core::fmt`.
57
68
// CHECK-LABEL: define {{(dso_local )?}}void @one_ref
79
#[no_mangle]
810
pub fn one_ref(input: &str) -> String {
9-
// CHECK-NOT: {{(call|invoke).*}}fmt
11+
// CHECK-NOT: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}}
1012
input.to_string()
1113
}
1214

1315
// CHECK-LABEL: define {{(dso_local )?}}void @two_ref
1416
#[no_mangle]
1517
pub fn two_ref(input: &&str) -> String {
16-
// CHECK-NOT: {{(call|invoke).*}}fmt
18+
// CHECK-NOT: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}}
1719
input.to_string()
1820
}
1921

2022
// CHECK-LABEL: define {{(dso_local )?}}void @thirteen_ref
2123
#[no_mangle]
2224
pub fn thirteen_ref(input: &&&&&&&&&&&&&str) -> String {
23-
// CHECK-NOT: {{(call|invoke).*}}fmt
25+
// CHECK-NOT: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}}
2426
input.to_string()
2527
}
2628

@@ -31,6 +33,6 @@ pub fn thirteen_ref(input: &&&&&&&&&&&&&str) -> String {
3133
// CHECK-LABEL: define {{(dso_local )?}}void @fourteen_ref
3234
#[no_mangle]
3335
pub fn fourteen_ref(input: &&&&&&&&&&&&&&str) -> String {
34-
// CHECK: {{(call|invoke).*}}fmt
36+
// CHECK: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}}
3537
input.to_string()
3638
}

0 commit comments

Comments
 (0)