summaryrefslogtreecommitdiff
path: root/src/include/span.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2019-10-26 17:15:23 +0800
committerJohn Hodge <tpg@mutabah.net>2019-10-26 17:15:23 +0800
commit99904636d2e1e335238552cbb5b8b23dd06b7295 (patch)
tree5fd6470fb702b2a26253d380d47d5b6fd232607f /src/include/span.hpp
parent7ca04e2d668fa44a1663158f844cb912e396cb32 (diff)
parentebd8edeb4f1861943cc82d310564b1f592e63272 (diff)
downloadmrust-99904636d2e1e335238552cbb5b8b23dd06b7295.tar.gz
Merge remote-tracking branch 'remotes/origin/master' into nightly-1.29
Diffstat (limited to 'src/include/span.hpp')
-rw-r--r--src/include/span.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/include/span.hpp b/src/include/span.hpp
index 51c3440c..970a2ad0 100644
--- a/src/include/span.hpp
+++ b/src/include/span.hpp
@@ -29,9 +29,9 @@ struct ProtoSpan
unsigned int start_line;
unsigned int start_ofs;
};
-class Span
+struct Span
{
-public:
+//public:
::std::shared_ptr<Span> outer_span; // Expansion target for macros
RcString filename;
@@ -47,10 +47,14 @@ public:
end_line(end_line),
end_ofs(end_ofs)
{}
- Span(const Span& x);
+ Span(const Span& x) = default;
+ Span(Span&& x) = default;
Span(const Position& position);
Span();
+ Span& operator=(const Span& x) = default;
+ Span& operator=(Span&& x) = default;
+
void bug(::std::function<void(::std::ostream&)> msg) const;
void error(ErrorType tag, ::std::function<void(::std::ostream&)> msg) const;
void warning(WarningType tag, ::std::function<void(::std::ostream&)> msg) const;