rust/compiler/rustc_hir/src
bors 574830f573 Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors
Begin fixing all the broken doctests in `compiler/`

Begins to fix #95994.
All of them pass now but 24 of them I've marked with `ignore HELP (<explanation>)` (asking for help) as I'm unsure how to get them to work / if we should leave them as they are.
There are also a few that I marked `ignore` that could maybe be made to work but seem less important.
Each `ignore` has a rough "reason" for ignoring after it parentheses, with

- `(pseudo-rust)` meaning "mostly rust-like but contains foreign syntax"
- `(illustrative)` a somewhat catchall for either a fragment of rust that doesn't stand on its own (like a lone type), or abbreviated rust with ellipses and undeclared types that would get too cluttered if made compile-worthy.
- `(not-rust)` stuff that isn't rust but benefits from the syntax highlighting, like MIR.
- `(internal)` uses `rustc_*` code which would be difficult to make work with the testing setup.

Those reason notes are a bit inconsistently applied and messy though. If that's important I can go through them again and try a more principled approach. When I run `rg '```ignore \(' .` on the repo, there look to be lots of different conventions other people have used for this sort of thing. I could try unifying them all if that would be helpful.

I'm not sure if there was a better existing way to do this but I wrote my own script to help me run all the doctests and wade through the output. If that would be useful to anyone else, I put it here: https://github.com/Elliot-Roberts/rust_doctest_fixing_tool
2022-05-07 06:30:29 +00:00
..
arena.rs Box HIR Generics and Impl. 2022-04-30 13:51:49 +02:00
def_path_hash_map.rs Use on-disk-hash-table format for DefPathHashMap in hir::definitions. 2021-09-14 13:54:41 +02:00
def.rs Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
definitions.rs Stop using CRATE_DEF_INDEX. 2022-04-17 12:14:42 +02:00
diagnostic_items.rs Introduce get_diagnostic_name 2021-10-06 08:40:28 -05:00
hir_id.rs Auto merge of #96082 - michaelwoerister:less_impl_stable_hash_via_hash, r=compiler-errors 2022-04-20 03:51:09 +00:00
hir.rs Auto merge of #96094 - Elliot-Roberts:fix_doctests, r=compiler-errors 2022-05-07 06:30:29 +00:00
intravisit.rs Update intravisit docs 2022-04-30 12:27:27 -05:00
itemlikevisit.rs Update intravisit docs 2022-04-30 12:27:27 -05:00
lang_items.rs generalize "incoherent impls" impl for custom types 2022-05-05 10:53:00 +02:00
lib.rs add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
pat_util.rs Simplify for loop desugar 2021-11-21 08:15:21 -06:00
stable_hash_impls.rs Remove NodeIdHashingMode. 2022-04-12 19:59:32 +02:00
target.rs add comment about restriction of Target::from_def_kind 2022-04-09 16:03:16 -04:00
tests.rs Revert "Revert "Fix test"" 2021-07-06 11:28:06 +02:00
weak_lang_items.rs Clean up lang_items::extract 2022-01-09 13:41:04 -08:00