diff options
| author | lcnr <rust@lcnr.de> | 2022-05-02 09:31:56 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-05-10 12:07:35 +0200 |
| commit | 6c8265dc56d221dce7f3535ecf8cdee6b9d2d618 (patch) | |
| tree | 7200aad6861c9464113121f124b093c69038c2cb /compiler/rustc_interface/src/queries.rs | |
| parent | fc128b67647533258e0bc52cc935438e6480732d (diff) | |
| download | rust-6c8265dc56d221dce7f3535ecf8cdee6b9d2d618.tar.gz rust-6c8265dc56d221dce7f3535ecf8cdee6b9d2d618.zip | |
only_local: always check for misuse
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index 22ab62ac372..136f0443fa0 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -258,10 +258,7 @@ impl<'tcx> Queries<'tcx> { /// an error. fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) { let Some((def_id, _)) = tcx.entry_fn(()) else { return }; - - let attrs = &*tcx.get_attrs(def_id); - let attrs = attrs.iter().filter(|attr| attr.has_name(sym::rustc_error)); - for attr in attrs { + for attr in tcx.get_attrs(def_id, sym::rustc_error) { match attr.meta_item_list() { // Check if there is a `#[rustc_error(delay_span_bug_from_inside_query)]`. Some(list) |
