aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-expr.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-04-03 18:51:58 +0300
committerCohenArthur <arthur.cohen@embecosm.com>2023-04-17 08:46:19 +0000
commit3bd09533b321ec7f47c95356e146619e9d861836 (patch)
treee5ccaca3ca2c6ad8dd982d96bb8ac1f6b7e8b082 /gcc/rust/resolve/rust-ast-resolve-expr.h
parentbfd8e24c2ad0034d2ad0ca59d680d0f9c1250691 (diff)
downloadgcc-3bd09533b321ec7f47c95356e146619e9d861836.zip
gcc-3bd09533b321ec7f47c95356e146619e9d861836.tar.gz
gcc-3bd09533b321ec7f47c95356e146619e9d861836.tar.bz2
resolve: Add ResolveExpr::funny_error
...and thread it through the constructors and the ResolveExpr::go () method. This will be used for implementing the "break rust" Easter egg. gcc/rust/ChangeLog: * resolve/rust-ast-resolve-expr.h, resolve/rust-ast-resolve-expr.cc: Add ResolveExpr::funny_error Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.h')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-expr.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.h b/gcc/rust/resolve/rust-ast-resolve-expr.h
index 3c73a89..2011903 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.h
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.h
@@ -31,7 +31,8 @@ class ResolveExpr : public ResolverBase
public:
static void go (AST::Expr *expr, const CanonicalPath &prefix,
- const CanonicalPath &canonical_prefix);
+ const CanonicalPath &canonical_prefix,
+ bool funny_error = false);
void visit (AST::TupleIndexExpr &expr) override;
void visit (AST::TupleExpr &expr) override;
@@ -84,10 +85,11 @@ protected:
private:
ResolveExpr (const CanonicalPath &prefix,
- const CanonicalPath &canonical_prefix);
+ const CanonicalPath &canonical_prefix, bool funny_error);
const CanonicalPath &prefix;
const CanonicalPath &canonical_prefix;
+ bool funny_error;
};
} // namespace Resolver