File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 2
2
#![ crate_type = "lib" ]
3
3
4
4
//! 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`.
5
7
6
8
// CHECK-LABEL: define {{(dso_local )?}}void @one_ref
7
9
#[ no_mangle]
8
10
pub fn one_ref ( input : & str ) -> String {
9
- // CHECK-NOT: {{(call|invoke).*}}fmt
11
+ // CHECK-NOT: {{(call|invoke)}}{{ .*}}@{{.*}}core{{.*}} fmt{{.*}}
10
12
input. to_string ( )
11
13
}
12
14
13
15
// CHECK-LABEL: define {{(dso_local )?}}void @two_ref
14
16
#[ no_mangle]
15
17
pub fn two_ref ( input : & & str ) -> String {
16
- // CHECK-NOT: {{(call|invoke).*}}fmt
18
+ // CHECK-NOT: {{(call|invoke)}}{{ .*}}@{{.*}}core{{.*}} fmt{{.*}}
17
19
input. to_string ( )
18
20
}
19
21
20
22
// CHECK-LABEL: define {{(dso_local )?}}void @thirteen_ref
21
23
#[ no_mangle]
22
24
pub fn thirteen_ref ( input : & & & & & & & & & & & & & str ) -> String {
23
- // CHECK-NOT: {{(call|invoke).*}}fmt
25
+ // CHECK-NOT: {{(call|invoke)}}{{ .*}}@{{.*}}core{{.*}} fmt{{.*}}
24
26
input. to_string ( )
25
27
}
26
28
@@ -31,6 +33,6 @@ pub fn thirteen_ref(input: &&&&&&&&&&&&&str) -> String {
31
33
// CHECK-LABEL: define {{(dso_local )?}}void @fourteen_ref
32
34
#[ no_mangle]
33
35
pub fn fourteen_ref ( input : & & & & & & & & & & & & & & str ) -> String {
34
- // CHECK: {{(call|invoke).*}}fmt
36
+ // CHECK: {{(call|invoke)}}{{ .*}}@{{.*}}core{{.*}} fmt{{.*}}
35
37
input. to_string ( )
36
38
}
You can’t perform that action at this time.
0 commit comments