title: Cannot get a 'static Lifetime reference from MutexGuard
body: <p>I have codes like below:</p>
  <pre><code>fn worker_table(
  ) -&gt; MutexGuard&lt;'static, HashMap&lt;WorkerId, Worker&gt;&gt; {
    static TABLE: OnceCell&lt;Mutex&lt;HashMap&lt;WorkerId, Worker&gt;&gt;&gt; =
      OnceCell::new();
    TABLE
      .get_or_init(|| {
        let m: HashMap&lt;WorkerId, Worker&gt; = HashMap::new();
        RwLock::new(m)
      })
      .lock()
      .unwrap()
  }
  
  fn run_workers(&amp;self) -&gt; Vec&lt;impl Future&lt;Output = ()&gt;&gt; {
    let table = worker_table();
    let mut ret = vec![];
  
    for wid in &amp;self.worker_ids {
      if let Some(worker) = table.get(&amp;wid) {
        ret.push(worker.run());
      }
    }
  
    ret
  }
  </code></pre>
  <p>and cargo check complaint: <code>'table' does not live long enough</code></p>
  <p>I don't know how to make a <code>'static lifetime table</code> to resolve the problem.</p>