We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d204cfd commit 87398f3Copy full SHA for 87398f3
src/librustc/middle/borrowck/gather_loans/lifetime.rs
@@ -170,6 +170,11 @@ impl GuaranteeLifetimeContext {
170
171
fn is_rvalue_or_immutable(&self,
172
cmt: mc::cmt) -> bool {
173
+ //! We can omit the root on an `@T` value if the location
174
+ //! that holds the box is either (1) an rvalue, in which case
175
+ //! is is in a non-user-accessible temporary, or (2) an immutable
176
+ //! lvalue.
177
+
178
cmt.mutbl.is_immutable() || match cmt.guarantor().cat {
179
mc::cat_rvalue => true,
180
_ => false
0 commit comments