Skip to content

Commit 06a87e9

Browse files
committed
Auto merge of #143116 - matthiaskrgr:rollup-zy9ez06, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - rust-lang/rust#139858 (New const traits syntax) - rust-lang/rust#140809 (Reduce special casing for the panic runtime) - rust-lang/rust#142730 (suggest declaring modules when file found but module not defined) - rust-lang/rust#142806 (Normalize before computing ConstArgHasType goal in new solver) - rust-lang/rust#143046 (const validation: properly ignore zero-sized UnsafeCell) - rust-lang/rust#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - rust-lang/rust#143096 (tag_for_variant: properly pass TypingEnv) - rust-lang/rust#143104 (hir_analysis: prohibit `dyn PointeeSized`) - rust-lang/rust#143106 (gce: don't ICE on non-local const) Failed merges: - rust-lang/rust#143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 4a8eec3 + a19d621 commit 06a87e9

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
451451
// FIXME(const_trait_impl, fee1-dead) revert to const destruct once it works again
452452
#[expect(unused)]
453453
fn is_ty_const_destruct_unused<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>) -> bool {
454-
// If this doesn't need drop at all, then don't select `~const Destruct`.
454+
// If this doesn't need drop at all, then don't select `[const] Destruct`.
455455
if !ty.needs_drop(tcx, body.typing_env(tcx)) {
456456
return false;
457457
}

tests/ui/assign_ops.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mod issue14871 {
9191

9292
impl<T> const NumberConstants for T
9393
where
94-
T: Number + ~const core::ops::Add,
94+
T: Number + [const] core::ops::Add,
9595
{
9696
fn constant(value: usize) -> Self {
9797
let mut res = Self::ZERO;

tests/ui/assign_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ mod issue14871 {
9191

9292
impl<T> const NumberConstants for T
9393
where
94-
T: Number + ~const core::ops::Add,
94+
T: Number + [const] core::ops::Add,
9595
{
9696
fn constant(value: usize) -> Self {
9797
let mut res = Self::ZERO;

tests/ui/trait_duplication_in_bounds.fixed

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ where
169169
// #13476
170170
#[const_trait]
171171
trait ConstTrait {}
172-
const fn const_trait_bounds_good<T: ConstTrait + ~const ConstTrait>() {}
172+
const fn const_trait_bounds_good<T: ConstTrait + [const] ConstTrait>() {}
173173

174-
const fn const_trait_bounds_bad<T: ~const ConstTrait>() {}
174+
const fn const_trait_bounds_bad<T: [const] ConstTrait>() {}
175175
//~^ trait_duplication_in_bounds
176176

177177
fn projections<T, U, V>()

tests/ui/trait_duplication_in_bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ where
169169
// #13476
170170
#[const_trait]
171171
trait ConstTrait {}
172-
const fn const_trait_bounds_good<T: ConstTrait + ~const ConstTrait>() {}
172+
const fn const_trait_bounds_good<T: ConstTrait + [const] ConstTrait>() {}
173173

174-
const fn const_trait_bounds_bad<T: ~const ConstTrait + ~const ConstTrait>() {}
174+
const fn const_trait_bounds_bad<T: [const] ConstTrait + [const] ConstTrait>() {}
175175
//~^ trait_duplication_in_bounds
176176

177177
fn projections<T, U, V>()

tests/ui/trait_duplication_in_bounds.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ LL | fn bad_trait_object(arg0: &(dyn Any + Send + Send)) {
6161
error: these bounds contain repeated elements
6262
--> tests/ui/trait_duplication_in_bounds.rs:174:36
6363
|
64-
LL | const fn const_trait_bounds_bad<T: ~const ConstTrait + ~const ConstTrait>() {}
65-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `~const ConstTrait`
64+
LL | const fn const_trait_bounds_bad<T: [const] ConstTrait + [const] ConstTrait>() {}
65+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `[const] ConstTrait`
6666

6767
error: these where clauses contain repeated elements
6868
--> tests/ui/trait_duplication_in_bounds.rs:181:8

0 commit comments

Comments
 (0)