]> git.lizzy.rs Git - rust.git/blob - tests/ui/optimization-remark.rs
Rollup merge of #106797 - FawazTirmizi:dev/issues/104284, r=bjorn3
[rust.git] / tests / ui / optimization-remark.rs
1 // build-pass
2 // ignore-pass
3 // min-llvm-version: 14.0.0
4 // revisions: all inline merge1 merge2
5 // compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2
6 //
7 // Check that remarks can be enabled individually or with "all":
8 //
9 // [all]    compile-flags: -Cremark=all
10 // [inline] compile-flags: -Cremark=inline
11 //
12 // Check that values of -Cremark flag are accumulated:
13 //
14 // [merge1] compile-flags: -Cremark=all    -Cremark=giraffe
15 // [merge2] compile-flags: -Cremark=inline -Cremark=giraffe
16 //
17 // error-pattern: inline: 'f' not inlined into 'g'
18 // dont-check-compiler-stderr
19
20 #[no_mangle]
21 #[inline(never)]
22 pub fn f() {
23 }
24
25 #[no_mangle]
26 pub fn g() {
27     f();
28 }