Skip to content

Commit 0bb04c2

Browse files
committed
Rename module astconv to hir_ty_lowering
Split from the main renaming commit to make git generate a proper diff for ease of reviewing.
1 parent aaf428e commit 0bb04c2

File tree

19 files changed

+26
-22
lines changed

19 files changed

+26
-22
lines changed

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ use std::cell::Cell;
4040
use std::iter;
4141
use std::ops::Bound;
4242

43-
use crate::astconv::HirTyLowerer;
4443
use crate::check::intrinsic::intrinsic_operation_unsafety;
4544
use crate::errors;
45+
use crate::hir_ty_lowering::HirTyLowerer;
4646
pub use type_of::test_opaque_hidden_types;
4747

4848
mod generics_of;

compiler/rustc_hir_analysis/src/collect/item_bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::ItemCtxt;
2-
use crate::astconv::{HirTyLowerer, PredicateFilter};
2+
use crate::hir_ty_lowering::{HirTyLowerer, PredicateFilter};
33
use rustc_hir as hir;
44
use rustc_infer::traits::util;
55
use rustc_middle::ty::GenericArgs;

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use crate::astconv::{HirTyLowerer, OnlySelfBounds, PredicateFilter};
21
use crate::bounds::Bounds;
32
use crate::collect::ItemCtxt;
43
use crate::constrained_generic_params as cgp;
4+
use crate::hir_ty_lowering::{HirTyLowerer, OnlySelfBounds, PredicateFilter};
55
use hir::{HirId, Node};
66
use rustc_data_structures::fx::FxIndexSet;
77
use rustc_hir as hir;

compiler/rustc_hir_analysis/src/astconv/bounds.rs renamed to compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use rustc_trait_selection::traits;
1212
use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor};
1313
use smallvec::SmallVec;
1414

15-
use crate::astconv::{HirTyLowerer, OnlySelfBounds, PredicateFilter};
1615
use crate::bounds::Bounds;
1716
use crate::errors;
17+
use crate::hir_ty_lowering::{HirTyLowerer, OnlySelfBounds, PredicateFilter};
1818

1919
impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
2020
/// Add a `Sized` bound to the `bounds` if appropriate.

compiler/rustc_hir_analysis/src/astconv/errors.rs renamed to compiler/rustc_hir_analysis/src/hir_ty_lowering/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use crate::astconv::HirTyLowerer;
21
use crate::errors::{
32
self, AssocTypeBindingNotAllowed, ManualImplementation, MissingTypeParams,
43
ParenthesizedFnTraitExpansion,
54
};
65
use crate::fluent_generated as fluent;
6+
use crate::hir_ty_lowering::HirTyLowerer;
77
use crate::traits::error_reporting::report_object_safety_error;
88
use rustc_data_structures::fx::{FxIndexMap, FxIndexSet};
99
use rustc_data_structures::sorted_map::SortedMap;

compiler/rustc_hir_analysis/src/astconv/generics.rs renamed to compiler/rustc_hir_analysis/src/hir_ty_lowering/generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::IsMethodCall;
2-
use crate::astconv::{
2+
use crate::hir_ty_lowering::{
33
errors::prohibit_assoc_item_binding, ExplicitLateBound, GenericArgCountMismatch,
44
GenericArgCountResult, GenericArgPosition, GenericArgsLowerer,
55
};

compiler/rustc_hir_analysis/src/astconv/mod.rs renamed to compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ pub mod generics;
1919
mod lint;
2020
mod object_safety;
2121

22-
use crate::astconv::errors::prohibit_assoc_item_binding;
23-
use crate::astconv::generics::{check_generic_arg_count, lower_generic_args};
2422
use crate::bounds::Bounds;
2523
use crate::collect::HirPlaceholderCollector;
2624
use crate::errors::AmbiguousLifetimeBound;
25+
use crate::hir_ty_lowering::errors::prohibit_assoc_item_binding;
26+
use crate::hir_ty_lowering::generics::{check_generic_arg_count, lower_generic_args};
2727
use crate::middle::resolve_bound_vars as rbv;
2828
use crate::require_c_abi_if_c_variadic;
2929
use rustc_ast::TraitObjectSyntax;

compiler/rustc_hir_analysis/src/astconv/object_safety.rs renamed to compiler/rustc_hir_analysis/src/hir_ty_lowering/object_safety.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use crate::astconv::{GenericArgCountMismatch, GenericArgCountResult, OnlySelfBounds};
21
use crate::bounds::Bounds;
32
use crate::errors::TraitObjectDeclaredWithNoTraits;
3+
use crate::hir_ty_lowering::{GenericArgCountMismatch, GenericArgCountResult, OnlySelfBounds};
44
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
55
use rustc_errors::{codes::*, struct_span_code_err};
66
use rustc_hir as hir;

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ several major phases:
3030
The type checker is defined into various submodules which are documented
3131
independently:
3232
33-
- astconv: lowers type-system entities from the [HIR][hir] to the
33+
- hir_ty_lowering: lowers type-system entities from the [HIR][hir] to the
3434
[`rustc_middle::ty`] representation.
3535
3636
- collect: computes the types of each top-level item and enters them into
@@ -82,11 +82,11 @@ extern crate rustc_middle;
8282
// These are used by Clippy.
8383
pub mod check;
8484

85-
pub mod astconv;
8685
pub mod autoderef;
8786
mod bounds;
8887
mod check_unused;
8988
mod coherence;
89+
pub mod hir_ty_lowering;
9090
// FIXME: This module shouldn't be public.
9191
pub mod collect;
9292
mod constrained_generic_params;

0 commit comments

Comments
 (0)