1
Fork 0
rust/tests
Matthias Krüger d730f27fc8
Rollup merge of #127022 - adwinwhite:attrs, r=celinval
Support fetching `Attribute` of items.

Fixes [https://github.com/rust-lang/project-stable-mir/issues/83](https://github.com/rust-lang/project-stable-mir/issues/83)

`rustc_ast::ast::Attribute` doesn't impl `Hash` and `Eq`. Thus it cannot be directly used as key of `IndexMap` in `rustc_smir::rustc_smir::Tables` and we cannot define stable `Attribute` as index to `rustc_ast::ast::Attribute` like `Span` and many other stable definitions.

Since an string (or tokens) and its span contain all info about an attribute, I defined a simple `Attribute` struct on stable side.

I choose to fetch attributes via `tcx::get_attrs_by_path()` due to `get_attrs()` is marked as deprecated and `get_attrs_by_name()` cannot handle name of multiple segments like `rustfmt::skip`.

r? `@celinval`
2024-06-28 08:34:09 +02:00
..
assembly Rollup merge of #126555 - beetrees:f16-inline-asm-arm, r=Amanieu 2024-06-22 12:57:18 +02:00
auxiliary
codegen Updated code for changes to RFC, added additional error handling, added 2024-06-25 19:00:02 +02:00
codegen-units
coverage Rollup merge of #126956 - joboet:fmt_no_extern_ty, r=RalfJung 2024-06-28 08:34:08 +02:00
coverage-run-rustdoc
crashes Do not ICE when suggesting dereferencing closure arg 2024-06-24 03:39:54 +00:00
debuginfo Add debuginfo tests for collapse_debuginfo for statics. 2024-06-13 16:04:31 +02:00
incremental Auto merge of #126409 - pacak:incr-uplorry, r=michaelwoerister 2024-06-20 09:06:16 +00:00
mir-opt Auto merge of #126844 - scottmcm:more-ptr-cast-gvn, r=saethlin 2024-06-26 14:22:31 +00:00
pretty
run-make Add ar command in run-make-support 2024-06-27 14:04:46 +02:00
run-pass-valgrind
rustdoc Update tests/rustdoc to new test syntax 2024-06-24 11:08:41 +02:00
rustdoc-gui Update browser-ui-test version to 0.18.0 2024-06-27 00:04:23 +02:00
rustdoc-js rustdoc-search: use lowercase, non-normalized name for type search 2024-06-09 11:56:52 -07:00
rustdoc-js-std
rustdoc-json
rustdoc-ui RFC 2373: Update tests for rustdoc for lint_reasons 2024-06-25 17:50:55 +02:00
ui Rollup merge of #126956 - joboet:fmt_no_extern_ty, r=RalfJung 2024-06-28 08:34:08 +02:00
ui-fulldeps Add method to get all attributes on a definition 2024-06-28 13:24:41 +08:00
COMPILER_TESTS.md