File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
library/coretests/tests/panic/___location Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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:: * ;
You can’t perform that action at this time.
0 commit comments