rust/compiler/rustc_lint/src
Michael Goulet 5ce6311f34
Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillot
Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`

The `hir::Map::get_parent_node` function doesn't return a `Node`, and I think that's quite confusing. Let's rename it to something that sounds more like something that gets the parent hir id => `hir::Map::parent_id`. Same with `find_parent_node` => `opt_parent_id`.

Also, combine `hir.get(hir.parent_id(hir_id))` and similar `hir.find(hir.parent_id(hir_id))` function into new functions that actually retrieve the parent node in one call. This last commit is the only one that might need to be looked at closely.
2023-01-04 20:36:28 -08:00
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
builtin.rs get_parent and find_parent 2023-01-04 00:43:13 +00:00
context.rs fix more clippy::style findings 2022-12-25 17:32:26 +01:00
deref_into_dyn_supertrait.rs Use nicer spans for deref_into_dyn_supertrait 2022-11-23 16:12:51 +00:00
early.rs fix dupe word typos 2023-01-03 15:48:16 +08:00
enum_intrinsics_non_enums.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
errors.rs Convert all #[suggestion_*] attributes to #[suggestion(style = "...")] 2022-10-26 15:04:09 +02:00
expect.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
for_loops_over_fallibles.rs use &str / String literals instead of format!() 2022-12-18 16:17:46 +01:00
hidden_unicode_codepoints.rs Inline some hot lint pass functions. 2022-12-07 19:29:31 +11:00
internal.rs get_parent and find_parent 2023-01-04 00:43:13 +00:00
late.rs fix dupe word typos 2023-01-03 15:48:16 +08:00
let_underscore.rs Merge branch 'master' into patch-2 2022-11-15 21:16:11 +01:00
levels.rs A few small cleanups for newtype_index 2022-12-18 21:47:28 +01:00
lib.rs Revert "Implement allow-by-default multiple_supertrait_upcastable lint" 2022-12-29 00:47:23 -08:00
methods.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
non_ascii_idents.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
non_fmt_panic.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
nonstandard_style.rs get_parent and find_parent 2023-01-04 00:43:13 +00:00
noop_method_call.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
opaque_hidden_inferred_bound.rs Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
pass_by_value.rs Rename Rptr to Ref in AST and HIR 2022-12-28 18:52:36 +01:00
passes.rs Reinstate {Early,Late}LintPassObjects. 2022-12-12 08:59:27 +11:00
redundant_semicolon.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs Introduce PredicateKind::Clause 2022-11-25 00:04:54 -03:00
types.rs get_parent and find_parent 2023-01-04 00:43:13 +00:00
unused.rs Address comments 2023-01-04 00:51:50 +00:00