Skip to content

Commit 3e1e308

Browse files
committed
Rename module astconv to lowering
1 parent 904c6be commit 3e1e308

File tree

20 files changed

+26
-26
lines changed

20 files changed

+26
-26
lines changed

compiler/rustc_hir_analysis/src/collect.rs

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

42-
use crate::astconv::HirTyLowerer;
4342
use crate::check::intrinsic::intrinsic_operation_unsafety;
4443
use crate::errors;
44+
use crate::lowering::HirTyLowerer;
4545
pub use type_of::test_opaque_hidden_types;
4646

4747
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::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::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/collect/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use rustc_middle::ty::{self, ImplTraitInTraitData, IsSuggestable, Ty, TyCtxt, Ty
99
use rustc_span::symbol::Ident;
1010
use rustc_span::{Span, DUMMY_SP};
1111

12-
use crate::astconv::HirTyLowerer;
1312
use crate::errors::TypeofReservedKeywordUsed;
13+
use crate::lowering::HirTyLowerer;
1414

1515
use super::bad_placeholder;
1616
use super::ItemCtxt;

compiler/rustc_hir_analysis/src/lib.rs

Lines changed: 3 additions & 3 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 HIR to `rustc_middle::ty`
33+
- lowering: lowers type-system entities from HIR to `rustc_middle::ty`
3434
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 lowering;
9090
// FIXME: This module shouldn't be public.
9191
pub mod collect;
9292
mod constrained_generic_params;
@@ -108,8 +108,8 @@ use rustc_span::{symbol::sym, Span, DUMMY_SP};
108108
use rustc_target::spec::abi::Abi;
109109
use rustc_trait_selection::traits;
110110

111-
use astconv::{HirTyLowerer, OnlySelfBounds};
112111
use bounds::Bounds;
112+
use lowering::{HirTyLowerer, OnlySelfBounds};
113113
use rustc_hir::def::DefKind;
114114

115115
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ use rustc_span::{ErrorGuaranteed, Span};
99
use rustc_trait_selection::traits;
1010
use smallvec::SmallVec;
1111

12-
use crate::astconv::{
13-
HirTyLowerer, LoweredBinding, LoweredBindingKind, OnlySelfBounds, PredicateFilter,
14-
};
1512
use crate::bounds::Bounds;
1613
use crate::errors;
14+
use crate::lowering::{
15+
HirTyLowerer, LoweredBinding, LoweredBindingKind, OnlySelfBounds, PredicateFilter,
16+
};
1717

1818
impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
1919
/// Adds a `Sized` bound to the list of `bounds` unless the HIR bounds contain any of

compiler/rustc_hir_analysis/src/astconv/errors.rs renamed to compiler/rustc_hir_analysis/src/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, LoweredBindingKind};
21
use crate::errors::{
32
self, AssocTypeBindingNotAllowed, ManualImplementation, MissingTypeParams,
43
ParenthesizedFnTraitExpansion,
54
};
65
use crate::fluent_generated as fluent;
6+
use crate::lowering::{HirTyLowerer, LoweredBindingKind};
77
use crate::traits::error_reporting::report_object_safety_error;
88
use rustc_data_structures::fx::{FxHashMap, 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/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::lowering::{
33
errors::prohibit_assoc_ty_binding, ExplicitLateBound, GenericArgCountMismatch,
44
GenericArgCountResult, GenericArgPosition, GenericArgsLowerer,
55
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ pub mod generics;
1111
mod lint;
1212
mod object_safety;
1313

14-
use crate::astconv::errors::prohibit_assoc_ty_binding;
15-
use crate::astconv::generics::{check_generic_arg_count, create_args_for_parent_generic_args};
1614
use crate::bounds::Bounds;
1715
use crate::collect::HirPlaceholderCollector;
1816
use crate::errors::AmbiguousLifetimeBound;
17+
use crate::lowering::errors::prohibit_assoc_ty_binding;
18+
use crate::lowering::generics::{check_generic_arg_count, create_args_for_parent_generic_args};
1919
use crate::middle::resolve_bound_vars as rbv;
2020
use crate::require_c_abi_if_c_variadic;
2121
use rustc_ast::TraitObjectSyntax;

0 commit comments

Comments
 (0)