]> git.lizzy.rs Git - rust.git/blob - src/test/ui/backtrace-debuginfo-aux.rs
Rollup merge of #89468 - FabianWolff:issue-89358, r=jackh726
[rust.git] / src / test / ui / backtrace-debuginfo-aux.rs
1 // run-pass
2 // ignore-test: not a test, used by backtrace-debuginfo.rs to test file!()
3
4 #[inline(never)]
5 pub fn callback<F>(f: F) where F: FnOnce((&'static str, u32)) {
6     f((file!(), line!()))
7 }
8
9 // We emit the wrong location for the caller here when inlined on MSVC
10 #[cfg_attr(not(target_env = "msvc"), inline(always))]
11 #[cfg_attr(target_env = "msvc", inline(never))]
12 pub fn callback_inlined<F>(f: F) where F: FnOnce((&'static str, u32)) {
13     f((file!(), line!()))
14 }