Skip to content

Commit

Permalink
Update based on Tim's feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgswords committed Aug 23, 2023
1 parent 7f8441c commit 88563a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion external-crates/move/move-compiler/src/parser/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,9 @@ fn parse_visibility(context: &mut Context) -> Result<Visibility, Box<Diagnostic>
_ => {
let msg = format!(
"Invalid visibility modifier. Consider removing it or using '{}', '{}' or '{}'",
Visibility::PUBLIC,
Visibility::FRIEND,
Visibility::PACKAGE,
Visibility::SCRIPT,
);
return Err(Box::new(diag!(Syntax::UnexpectedToken, (loc, msg))));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ error[E01002]: unexpected token
┌─ tests/move_check/parser/function_visibility_empty.move:2:5
2 │ public() fun f() {}
│ ^^^^^^^^ Invalid visibility modifier. Consider removing it or using 'public(friend)', 'public(package)' or 'public(script)'
│ ^^^^^^^^ Invalid visibility modifier. Consider removing it or using 'public', 'public(friend)' or 'public(package)'

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ error[E01002]: unexpected token
┌─ tests/move_check/parser/function_visibility_invalid.move:2:5
2 │ public(invalid_modifier) fun f() {}
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Invalid visibility modifier. Consider removing it or using 'public(friend)', 'public(package)' or 'public(script)'
│ ^^^^^^^^^^^^^^^^^^^^^^^^ Invalid visibility modifier. Consider removing it or using 'public', 'public(friend)' or 'public(package)'

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error[E13001]: feature is not supported in specified edition
┌─ tests/move_check/typing/module_public_package_featuregate.move:2:5
2 │ public(package) fun foo(): u64 { 0 }
│ ^^^^^^^^^^^^^^^ not supported by current edition 'legacy', only '2024.alpha'
│ ^^^^^^^^^^^^^^^ not supported by current edition 'legacy', only '2024.alpha' support this feature
= You can update the edition in the 'Move.toml', or via command line flag if invoking the compiler directly.

0 comments on commit 88563a5

Please sign in to comment.