title: why can &Box<ListNode> be assigned to &ListNode?
body: <p>I found a variable of type <code>&amp;Box&lt;ListNode&gt;</code> can be assigned to a variable of type <code>&amp;ListNode</code>. They are different types, I don't known the mechanism behind this. I thought it might because of the <code>Deref coercion</code>. But I think <code>Deref corecion</code> only occurs in methold solution or parameter passing. I am not sure. Could someone help me? Thanks you very much.</p>
  <pre><code> pub struct ListNode {
     pub val: i32,
     pub next: Option&lt;Box&lt;ListNode&gt;&gt;
   }
  
   impl ListNode {
     #[inline]
     fn new(val: i32) -&gt; Self {
       ListNode {
         next: None,
         val
       }
     }
   }
  
  fn f1() {
    let node = ListNode::new(0);
    let mut ref_node:&amp;ListNode = &amp;node;
    let mut ref_box :&amp;Box&lt;ListNode&gt;= &amp;Box::new(ListNode::new(10));
  
    // why &amp;Box&lt;ListNode&gt; can be assign to &amp;ListNode?
    ref_node = ref_box; 
  }
  </code></pre>