1
Fork 0

Auto merge of #137397 - matthiaskrgr:rollup-ls2pilo, r=matthiaskrgr

Rollup of 10 pull requests

Successful merges:

 - #132876 (rustdoc book: acknowledge --document-hidden-items)
 - #136148 (Optionally add type names to `TypeId`s.)
 - #136609 (libcore/net: `IpAddr::as_octets()`)
 - #137336 (Stabilise `os_str_display`)
 - #137350 (Move methods from Map to TyCtxt, part 3.)
 - #137353 (Implement `read_buf` for WASI stdin)
 - #137361 (Refactor `OperandRef::extract_field` to prep for MCP838)
 - #137367 (Do not exempt nonexistent platforms from platform policy)
 - #137374 (Stacker now handles miri using a noop impl itself)
 - #137392 (remove few unused fields)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2025-02-21 19:57:50 +00:00
commit 794c12416b
126 changed files with 422 additions and 351 deletions

View file

@ -751,7 +751,7 @@ impl UnsafeOpKind {
span: Span,
suggest_unsafe_block: bool,
) {
let parent_id = tcx.hir().get_parent_item(hir_id);
let parent_id = tcx.hir_get_parent_item(hir_id);
let parent_owner = tcx.hir_owner_node(parent_id);
let should_suggest = parent_owner.fn_sig().is_some_and(|sig| {
// Do not suggest for safe target_feature functions
@ -921,7 +921,7 @@ impl UnsafeOpKind {
hir_context: HirId,
unsafe_op_in_unsafe_fn_allowed: bool,
) {
let note_non_inherited = tcx.hir().parent_iter(hir_context).find(|(id, node)| {
let note_non_inherited = tcx.hir_parent_iter(hir_context).find(|(id, node)| {
if let hir::Node::Expr(block) = node
&& let hir::ExprKind::Block(block, _) = block.kind
&& let hir::BlockCheckMode::UnsafeBlock(_) = block.rules

View file

@ -1041,7 +1041,7 @@ fn find_fallback_pattern_typo<'tcx>(
let mut imported = vec![];
let mut imported_spans = vec![];
let (infcx, param_env) = cx.tcx.infer_ctxt().build_with_typing_env(cx.typing_env);
let parent = cx.tcx.hir().get_parent_item(hir_id);
let parent = cx.tcx.hir_get_parent_item(hir_id);
for item in cx.tcx.hir_crate_items(()).free_items() {
if let DefKind::Use = cx.tcx.def_kind(item.owner_id) {
@ -1137,7 +1137,7 @@ fn find_fallback_pattern_typo<'tcx>(
} else {
// Look for local bindings for people that might have gotten confused with how
// `let` and `const` works.
for (_, node) in cx.tcx.hir().parent_iter(hir_id) {
for (_, node) in cx.tcx.hir_parent_iter(hir_id) {
match node {
hir::Node::Stmt(hir::Stmt { kind: hir::StmtKind::Let(let_stmt), .. }) => {
if let hir::PatKind::Binding(_, _, binding_name, _) = let_stmt.pat.kind {