diff options
author | John Hodge <tpg@mutabah.net> | 2016-09-03 12:35:38 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-09-03 12:35:38 +0800 |
commit | df7bfa80c3cc6f290297b084850c4c56a02a8393 (patch) | |
tree | cc63cfaac15d05bcf9bb06d4a656293f25e32bb7 /src | |
parent | aa33943f6fc268aefc3dd15a7f9bf2a9e36392e0 (diff) | |
download | mrust-df7bfa80c3cc6f290297b084850c4c56a02a8393.tar.gz |
HIR - Convert Literal::BorrowOf to use a full path
Diffstat (limited to 'src')
-rw-r--r-- | src/hir/deserialise.cpp | 2 | ||||
-rw-r--r-- | src/hir/hir.hpp | 2 | ||||
-rw-r--r-- | src/hir/serialise.cpp | 2 | ||||
-rw-r--r-- | src/hir_conv/constant_evaluation.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/hir/deserialise.cpp b/src/hir/deserialise.cpp index 9f8fb439..c19f8621 100644 --- a/src/hir/deserialise.cpp +++ b/src/hir/deserialise.cpp @@ -914,7 +914,7 @@ namespace { _(List, deserialise_vec< ::HIR::Literal>() ) _(Integer, read_u64() ) _(Float, read_double() ) - _(BorrowOf, deserialise_simplepath() ) + _(BorrowOf, deserialise_path() ) _(String, read_string() ) #undef _ default: diff --git a/src/hir/hir.hpp b/src/hir/hir.hpp index 80c18b41..e18f6631 100644 --- a/src/hir/hir.hpp +++ b/src/hir/hir.hpp @@ -51,7 +51,7 @@ TAGGED_UNION(Literal, Invalid, (List, ::std::vector<Literal>), // TODO: Have a variant for repetition lists (Integer, uint64_t), (Float, double), - (BorrowOf, ::HIR::SimplePath), + (BorrowOf, ::HIR::Path), // String = &'static str or &[u8; N] (String, ::std::string) ); diff --git a/src/hir/serialise.cpp b/src/hir/serialise.cpp index ee501256..850f73a7 100644 --- a/src/hir/serialise.cpp +++ b/src/hir/serialise.cpp @@ -475,7 +475,7 @@ namespace { write_double(e); ), (BorrowOf, - serialise_simplepath(e); + serialise_path(e); ), (String, write_string(e); diff --git a/src/hir_conv/constant_evaluation.cpp b/src/hir_conv/constant_evaluation.cpp index abfd21d7..ff03fee4 100644 --- a/src/hir_conv/constant_evaluation.cpp +++ b/src/hir_conv/constant_evaluation.cpp @@ -48,7 +48,7 @@ namespace { return ::HIR::Literal(e); ), (BorrowOf, - return ::HIR::Literal(e); + return ::HIR::Literal(e.clone()); ), (String, return ::HIR::Literal(e); |