-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow giving reasons for disallowed_methods
- Loading branch information
Showing
5 changed files
with
69 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
disallowed-methods = [ | ||
# just a string is shorthand for path only | ||
"std::iter::Iterator::sum", | ||
"regex::Regex::is_match", | ||
"regex::Regex::new" | ||
# can give path and reason with an inline table | ||
{ path = "regex::Regex::is_match", reason = "no matching allowed" }, | ||
# can use an inline table but omit reason | ||
{ path = "regex::Regex::new" }, | ||
] |
8 changes: 5 additions & 3 deletions
8
tests/ui-toml/toml_disallowed_method/conf_disallowed_method.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters