# Importing associated "static" struct functions

**URL:** <https://internals.rust-lang.org/t/importing-associated-static-struct-functions/18978>\
**Category:** language design\
**Created:** [June 13, 2023, 4:02pm UTC](https://internals.rust-lang.org/t/importing-associated-static-struct-functions/18978 "2023-06-13T16:02:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![softstream-link](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/softstream-link/32/10952_2.png) [@softstream-link](https://internals.rust-lang.org/u/softstream-link)\
**Post date:** [June 13, 2023, 4:02pm UTC](https://internals.rust-lang.org/t/importing-associated-static-struct-functions/18978/1 "2023-06-13T16:02:25Z")

</div>

Ability to refer to "static" associated functions seems like win/win. This would makes code less verbose but not currently possible due to the following compiler error

use std::time::Duration::from\_secs;

error[E0432]: unresolved import `std::time::Duration` --\> ... | 9 | use std::time::Duration::from\_secs; | ^^^^^^^^ `Duration` is a struct, not a module

---

<div class="post-metadata">

**Author:** ![Heliozoa](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/heliozoa/32/7029_2.png) [@Heliozoa](https://internals.rust-lang.org/u/Heliozoa)\
**Post date:** [June 13, 2023, 4:37pm UTC](https://internals.rust-lang.org/t/importing-associated-static-struct-functions/18978/2 "2023-06-13T16:37:10Z")

</div>

Previous discussion: [Allow importing assoicated methods](https://internals.rust-lang.org/t/allow-importing-assoicated-methods/18131)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [September 11, 2023, 4:37pm UTC](https://internals.rust-lang.org/t/importing-associated-static-struct-functions/18978/3 "2023-09-11T16:37:27Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
