@@ -77,6 +77,7 @@ impl<S: PageSize> Page<S> {
77
77
Ok ( Page :: containing_address ( address) )
78
78
}
79
79
80
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
80
81
const_fn ! {
81
82
/// Returns the page that starts at the given virtual address.
82
83
///
@@ -101,6 +102,7 @@ impl<S: PageSize> Page<S> {
101
102
}
102
103
}
103
104
105
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
104
106
const_fn ! {
105
107
/// Returns the start address of the page.
106
108
#[ inline]
@@ -109,6 +111,7 @@ impl<S: PageSize> Page<S> {
109
111
}
110
112
}
111
113
114
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
112
115
const_fn ! {
113
116
/// Returns the size the page (4KB, 2MB or 1GB).
114
117
#[ inline]
@@ -117,6 +120,7 @@ impl<S: PageSize> Page<S> {
117
120
}
118
121
}
119
122
123
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
120
124
const_fn ! {
121
125
/// Returns the level 4 page table index of this page.
122
126
#[ inline]
@@ -125,6 +129,7 @@ impl<S: PageSize> Page<S> {
125
129
}
126
130
}
127
131
132
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
128
133
const_fn ! {
129
134
/// Returns the level 3 page table index of this page.
130
135
#[ inline]
@@ -133,6 +138,7 @@ impl<S: PageSize> Page<S> {
133
138
}
134
139
}
135
140
141
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
136
142
const_fn ! {
137
143
/// Returns the table index of this page at the specified level.
138
144
#[ inline]
@@ -141,6 +147,7 @@ impl<S: PageSize> Page<S> {
141
147
}
142
148
}
143
149
150
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
144
151
const_fn ! {
145
152
/// Returns a range of pages, exclusive `end`.
146
153
#[ inline]
@@ -149,6 +156,7 @@ impl<S: PageSize> Page<S> {
149
156
}
150
157
}
151
158
159
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
152
160
const_fn ! {
153
161
/// Returns a range of pages, inclusive `end`.
154
162
#[ inline]
@@ -159,6 +167,7 @@ impl<S: PageSize> Page<S> {
159
167
}
160
168
161
169
impl < S : NotGiantPageSize > Page < S > {
170
+ // TODO: Remove const_fn! when our minimum supported stable Rust version is 1.61
162
171
const_fn ! {
163
172
/// Returns the level 2 page table index of this page.
164
173
#[ inline]
0 commit comments