Skip to content

Commit 0e6615d

Browse files
committed
Add missing files for tests
1 parent 6fa2678 commit 0e6615d

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use core::panic::Location;
2+
3+
// Used for test super::location_{ord, eq}. Must be in a dedicated file.
4+
5+
pub const fn one() -> &'static Location<'static> {
6+
Location::caller()
7+
}
8+
9+
pub const fn two() -> &'static Location<'static> {
10+
Location::caller()
11+
}
12+
13+
pub const fn three() -> &'static Location<'static> {
14+
Location::caller()
15+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use core::panic::Location;
2+
3+
// Used for test super::location_{ord, eq}. Must be in a dedicated file.
4+
5+
pub const fn one() -> &'static Location<'static> {
6+
Location::caller()
7+
}
8+
9+
pub const fn two() -> &'static Location<'static> {
10+
Location::caller()
11+
}
12+
13+
pub const fn three() -> &'static Location<'static> {
14+
Location::caller()
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Used for test super::location_{ord, eq}. Must be in a dedicated file.
2+
3+
// This is used for testing column ordering of Location, hence this ugly one-liner.
4+
// We must fmt skip the entire containing module or else tidy will still complain.
5+
#[rustfmt::skip]
6+
mod no_fmt {
7+
use core::panic::Location;
8+
pub const fn one() -> &'static Location<'static> { Location::caller() } pub const fn two() -> &'static Location<'static> { Location::caller() } pub const fn three() -> &'static Location<'static> { Location::caller() }
9+
}
10+
11+
pub use no_fmt::*;

0 commit comments

Comments
 (0)