Add UI tests for the expect attribute (RFC-2383)

* Add UI tests with macros for the `expect` attribute (RFC-2383)
* Addressed review comments - mostly UI test updates (RFC-2383)
* Documented lint level attribute on macro not working bug (RFC-2383)
  See `rust#87391`
This commit is contained in:
xFrednet 2021-08-06 23:38:09 +02:00
parent 33a5945069
commit a9bf9eaef5
No known key found for this signature in database
GPG key ID: FCDCBF29AF64D601
18 changed files with 424 additions and 4 deletions

View file

@ -16,11 +16,9 @@ pub fn check_expectations(tcx: TyCtxt<'_>) {
&tcx.lint_levels(()).lint_expectations;
for (id, expectation) in lint_expectations {
if fulfilled_expectations.contains(id) {
continue;
if !fulfilled_expectations.contains(id) {
emit_unfulfilled_expectation_lint(tcx, expectation);
}
emit_unfulfilled_expectation_lint(tcx, expectation);
}
}