From 1860f9ab43acb77c9fdd7ca646ef65e9b008b932 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 11 Nov 2019 11:26:57 +0300 Subject: Forbid visibility qualifiers in traits --- crates/ra_syntax/src/syntax_error.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_syntax/src/syntax_error.rs') diff --git a/crates/ra_syntax/src/syntax_error.rs b/crates/ra_syntax/src/syntax_error.rs index d6eca2ad7..1f60a7aab 100644 --- a/crates/ra_syntax/src/syntax_error.rs +++ b/crates/ra_syntax/src/syntax_error.rs @@ -82,6 +82,7 @@ pub enum SyntaxErrorKind { InvalidBlockAttr, InvalidMatchInnerAttr, InvalidTupleIndexFormat, + VisibilityNotAllowed, } impl fmt::Display for SyntaxErrorKind { @@ -99,6 +100,9 @@ impl fmt::Display for SyntaxErrorKind { } ParseError(msg) => write!(f, "{}", msg.0), EscapeError(err) => write!(f, "{}", err), + VisibilityNotAllowed => { + write!(f, "unnecessary visibility qualifier") + } } } } -- cgit v1.2.3