Skip to content

Commit

Permalink
Drop forget_guarantee, introduced only on master
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Mar 14, 2022
1 parent 9d7e021 commit 12cae30
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_builtin_macros/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ pub fn expand_test_or_bench(
// These were a warning before #92959 and need to continue being that to avoid breaking
// stable user code (#94508).
ast::ItemKind::MacCall(_) => diag.struct_span_warn(attr_sp, msg),
// `.forget_guarantee()` needed to get these two arms to match types. Because of how
// locally close the `.emit()` call is I'm comfortable with it, but if it can be
// reworked in the future to not need it, it'd be nice.
_ => diag.struct_span_err(attr_sp, msg).forget_guarantee(),
_ => diag.struct_span_err(attr_sp, msg),
};
err.span_label(attr_sp, "the `#[test]` macro causes a a function to be run on a test and has no effect on non-functions")
.span_label(item.span, format!("expected a non-associated function, found {} {}", item.kind.article(), item.kind.descr()))
Expand Down

0 comments on commit 12cae30

Please sign in to comment.