about summary refs log tree commit diff
path: root/compiler/rustc_next_trait_solver/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-28 17:22:11 +0000
committerbors <bors@rust-lang.org>2025-04-28 17:22:11 +0000
commit25cdf1f67463c9365d8d83778c933ec7480e940b (patch)
tree3692f9b718b4427606d5f966f253b81328268486 /compiler/rustc_next_trait_solver/src
parent7d65abfe80f9eee93296d1ce08f845c9bf7039f8 (diff)
parentdd3ca71b4e63a2eb167b37879abb2830af45a0b3 (diff)
downloadrust-25cdf1f67463c9365d8d83778c933ec7480e940b.tar.gz
rust-25cdf1f67463c9365d8d83778c933ec7480e940b.zip
Auto merge of #140388 - GuillaumeGomez:rollup-aj9o3ch, r=GuillaumeGomez
Rollup of 7 pull requests

Successful merges:

 - #140056 (Fix a wrong error message in 2024 edition)
 - #140220 (Fix detection of main function if there are expressions around it)
 - #140249 (Remove `weak` alias terminology)
 - #140316 (Introduce `BoxMarker` to improve pretty-printing correctness)
 - #140347 (ci: clean more disk space in codebuild)
 - #140349 (ci: use aws codebuild for the `dist-x86_64-linux` job)
 - #140379 (rustc-dev-guide subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_next_trait_solver/src')
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs2
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs2
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/normalizes_to/free_alias.rs (renamed from compiler/rustc_next_trait_solver/src/solve/normalizes_to/weak_types.rs)12
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs4
-rw-r--r--compiler/rustc_next_trait_solver/src/solve/trait_goals.rs2
5 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs
index 224c44e60fd..101129a231e 100644
--- a/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/assembly/mod.rs
@@ -588,7 +588,7 @@ where
             }
 
             ty::Alias(kind @ (ty::Projection | ty::Opaque), alias_ty) => (kind, alias_ty),
-            ty::Alias(ty::Inherent | ty::Weak, _) => {
+            ty::Alias(ty::Inherent | ty::Free, _) => {
                 self.cx().delay_bug(format!("could not normalize {self_ty:?}, it is not WF"));
                 return;
             }
diff --git a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs
index 1526049719e..035bfff89b5 100644
--- a/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs
@@ -48,7 +48,7 @@ where
 
         ty::Dynamic(..)
         | ty::Param(..)
-        | ty::Alias(ty::Projection | ty::Inherent | ty::Weak, ..)
+        | ty::Alias(ty::Projection | ty::Inherent | ty::Free, ..)
         | ty::Placeholder(..)
         | ty::Bound(..)
         | ty::Infer(_) => {
diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/weak_types.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/free_alias.rs
index 14e68dd52b6..d077f8a9be8 100644
--- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/weak_types.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/free_alias.rs
@@ -1,7 +1,7 @@
 //! Computes a normalizes-to (projection) goal for inherent associated types,
 //! `#![feature(lazy_type_alias)]` and `#![feature(type_alias_impl_trait)]`.
 //!
-//! Since a weak alias is never ambiguous, this just computes the `type_of` of
+//! Since a free alias is never ambiguous, this just computes the `type_of` of
 //! the alias and registers the where-clauses of the type alias.
 
 use rustc_type_ir::{self as ty, Interner};
@@ -14,22 +14,22 @@ where
     D: SolverDelegate<Interner = I>,
     I: Interner,
 {
-    pub(super) fn normalize_weak_type(
+    pub(super) fn normalize_free_alias(
         &mut self,
         goal: Goal<I, ty::NormalizesTo<I>>,
     ) -> QueryResult<I> {
         let cx = self.cx();
-        let weak_ty = goal.predicate.alias;
+        let free_ty = goal.predicate.alias;
 
         // Check where clauses
         self.add_goals(
             GoalSource::Misc,
-            cx.predicates_of(weak_ty.def_id)
-                .iter_instantiated(cx, weak_ty.args)
+            cx.predicates_of(free_ty.def_id)
+                .iter_instantiated(cx, free_ty.args)
                 .map(|pred| goal.with(cx, pred)),
         );
 
-        let actual = cx.type_of(weak_ty.def_id).instantiate(cx, weak_ty.args);
+        let actual = cx.type_of(free_ty.def_id).instantiate(cx, free_ty.args);
         self.instantiate_normalizes_to_term(goal, actual.into());
 
         self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes)
diff --git a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs
index 1625da81b85..f5cad623903 100644
--- a/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs
@@ -1,7 +1,7 @@
 mod anon_const;
+mod free_alias;
 mod inherent;
 mod opaque_types;
-mod weak_types;
 
 use rustc_type_ir::fast_reject::DeepRejectCtxt;
 use rustc_type_ir::inherent::*;
@@ -50,7 +50,7 @@ where
             }
             ty::AliasTermKind::InherentTy => self.normalize_inherent_associated_type(goal),
             ty::AliasTermKind::OpaqueTy => self.normalize_opaque_type(goal),
-            ty::AliasTermKind::WeakTy => self.normalize_weak_type(goal),
+            ty::AliasTermKind::FreeTy => self.normalize_free_alias(goal),
             ty::AliasTermKind::UnevaluatedConst => self.normalize_anon_const(goal),
         }
     }
diff --git a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
index 94e181ae8d8..d19249df387 100644
--- a/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
+++ b/compiler/rustc_next_trait_solver/src/solve/trait_goals.rs
@@ -1140,7 +1140,7 @@ where
             ty::Dynamic(..)
             | ty::Param(..)
             | ty::Foreign(..)
-            | ty::Alias(ty::Projection | ty::Weak | ty::Inherent, ..)
+            | ty::Alias(ty::Projection | ty::Free | ty::Inherent, ..)
             | ty::Placeholder(..) => Some(Err(NoSolution)),
 
             ty::Infer(_) | ty::Bound(_, _) => panic!("unexpected type `{self_ty:?}`"),