diff options
author | John Hodge <tpg@ucc.asn.au> | 2017-03-18 13:56:56 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2017-03-18 13:56:56 +0800 |
commit | aa50d1f30eac5dd9264e99c9588b2ca3871a9de0 (patch) | |
tree | c4b8c569ff98564496be9d86f09b21b5fc6b1d47 /src/mir/from_hir.hpp | |
parent | 6d29b4448479ac1f6299e9c4e73625e74cdb4581 (diff) | |
download | mrust-aa50d1f30eac5dd9264e99c9588b2ca3871a9de0.tar.gz |
MIR Gen - Extend lifetimes of variables borrowed in let bindings
Diffstat (limited to 'src/mir/from_hir.hpp')
-rw-r--r-- | src/mir/from_hir.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mir/from_hir.hpp b/src/mir/from_hir.hpp index c8d34151..9ee7b733 100644 --- a/src/mir/from_hir.hpp +++ b/src/mir/from_hir.hpp @@ -36,6 +36,11 @@ public: ScopeHandle& operator=(const ScopeHandle& x) = delete; ScopeHandle& operator=(ScopeHandle&& x) = delete; ~ScopeHandle(); + + friend ::std::ostream& operator<<(::std::ostream& os, const ScopeHandle& x) { + os << x.idx; + return os; + } }; // - Needs to handle future DerefMove (which can't use the Box hack) |