1
Fork 0

constify parts of libcore.

This commit is contained in:
Mazdak Farrokhzad 2018-10-23 02:04:14 +02:00
parent b4c046b342
commit 5b89877dda
33 changed files with 84 additions and 112 deletions

View file

@ -416,7 +416,7 @@ impl<Idx> RangeInclusive<Idx> {
/// ```
#[stable(feature = "inclusive_range_methods", since = "1.27.0")]
#[inline]
pub fn start(&self) -> &Idx {
pub const fn start(&self) -> &Idx {
&self.start
}
@ -440,7 +440,7 @@ impl<Idx> RangeInclusive<Idx> {
/// ```
#[stable(feature = "inclusive_range_methods", since = "1.27.0")]
#[inline]
pub fn end(&self) -> &Idx {
pub const fn end(&self) -> &Idx {
&self.end
}