diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-30 23:08:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-30 23:08:01 +0200 |
| commit | b76a5582273da26bf40e8eb4838860270e9e6e63 (patch) | |
| tree | 923d9e766df4c62445ae2dae281e0b324771c607 /src | |
| parent | f6e43e8100c0e07e0581a3b1ced68460cb11b23a (diff) | |
| parent | e0f73052a93eee54400b7d4f788181b28bb54b4d (diff) | |
| download | rust-b76a5582273da26bf40e8eb4838860270e9e6e63.tar.gz rust-b76a5582273da26bf40e8eb4838860270e9e6e63.zip | |
Rollup merge of #63684 - GrayJack:const_list_new, r=Centril
Constify LinkedList new function Change the `LinkedList::new()` function to become a const fn, allowing the use in constant context.
Diffstat (limited to 'src')
| -rw-r--r-- | src/liballoc/collections/linked_list.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/collections/linked_list.rs b/src/liballoc/collections/linked_list.rs index a14a3fe9994..816a71f2557 100644 --- a/src/liballoc/collections/linked_list.rs +++ b/src/liballoc/collections/linked_list.rs @@ -276,7 +276,7 @@ impl<T> LinkedList<T> { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - pub fn new() -> Self { + pub const fn new() -> Self { LinkedList { head: None, tail: None, |
