fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB37 linesraw
1$DIR/auxiliary/inline_always_with_dead_code.rs:
2   LL|       |// compile-flags: -Cinstrument-coverage -Ccodegen-units=4 -Copt-level=0
3   LL|       |
4   LL|       |#![allow(dead_code)]
5   LL|       |
6   LL|       |mod foo {
7   LL|       |    #[inline(always)]
8   LL|      2|    pub fn called() {}
9   LL|       |
10   LL|      0|    fn uncalled() {}
11   LL|       |}
12   LL|       |
13   LL|       |pub mod bar {
14   LL|      1|    pub fn call_me() {
15   LL|      1|        super::foo::called();
16   LL|      1|    }
17   LL|       |}
18   LL|       |
19   LL|       |pub mod baz {
20   LL|      1|    pub fn call_me() {
21   LL|      1|        super::foo::called();
22   LL|      1|    }
23   LL|       |}
24
25$DIR/issue-85461.rs:
26   LL|       |// Regression test for #85461: MSVC sometimes fail to link with dead code and #[inline(always)]
27   LL|       |
28   LL|       |// aux-build:inline_always_with_dead_code.rs
29   LL|       |extern crate inline_always_with_dead_code;
30   LL|       |
31   LL|       |use inline_always_with_dead_code::{bar, baz};
32   LL|       |
33   LL|      1|fn main() {
34   LL|      1|    bar::call_me();
35   LL|      1|    baz::call_me();
36   LL|      1|}
37