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
This commit is contained in:
commit
06a87e91c9
6 changed files with 9 additions and 9 deletions
|
|
@ -451,7 +451,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
|
|||
// FIXME(const_trait_impl, fee1-dead) revert to const destruct once it works again
|
||||
#[expect(unused)]
|
||||
fn is_ty_const_destruct_unused<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>) -> bool {
|
||||
// If this doesn't need drop at all, then don't select `~const Destruct`.
|
||||
// If this doesn't need drop at all, then don't select `[const] Destruct`.
|
||||
if !ty.needs_drop(tcx, body.typing_env(tcx)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ mod issue14871 {
|
|||
|
||||
impl<T> const NumberConstants for T
|
||||
where
|
||||
T: Number + ~const core::ops::Add,
|
||||
T: Number + [const] core::ops::Add,
|
||||
{
|
||||
fn constant(value: usize) -> Self {
|
||||
let mut res = Self::ZERO;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ mod issue14871 {
|
|||
|
||||
impl<T> const NumberConstants for T
|
||||
where
|
||||
T: Number + ~const core::ops::Add,
|
||||
T: Number + [const] core::ops::Add,
|
||||
{
|
||||
fn constant(value: usize) -> Self {
|
||||
let mut res = Self::ZERO;
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ where
|
|||
// #13476
|
||||
#[const_trait]
|
||||
trait ConstTrait {}
|
||||
const fn const_trait_bounds_good<T: ConstTrait + ~const ConstTrait>() {}
|
||||
const fn const_trait_bounds_good<T: ConstTrait + [const] ConstTrait>() {}
|
||||
|
||||
const fn const_trait_bounds_bad<T: ~const ConstTrait>() {}
|
||||
const fn const_trait_bounds_bad<T: [const] ConstTrait>() {}
|
||||
//~^ trait_duplication_in_bounds
|
||||
|
||||
fn projections<T, U, V>()
|
||||
|
|
|
|||
|
|
@ -169,9 +169,9 @@ where
|
|||
// #13476
|
||||
#[const_trait]
|
||||
trait ConstTrait {}
|
||||
const fn const_trait_bounds_good<T: ConstTrait + ~const ConstTrait>() {}
|
||||
const fn const_trait_bounds_good<T: ConstTrait + [const] ConstTrait>() {}
|
||||
|
||||
const fn const_trait_bounds_bad<T: ~const ConstTrait + ~const ConstTrait>() {}
|
||||
const fn const_trait_bounds_bad<T: [const] ConstTrait + [const] ConstTrait>() {}
|
||||
//~^ trait_duplication_in_bounds
|
||||
|
||||
fn projections<T, U, V>()
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ LL | fn bad_trait_object(arg0: &(dyn Any + Send + Send)) {
|
|||
error: these bounds contain repeated elements
|
||||
--> tests/ui/trait_duplication_in_bounds.rs:174:36
|
||||
|
|
||||
LL | const fn const_trait_bounds_bad<T: ~const ConstTrait + ~const ConstTrait>() {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `~const ConstTrait`
|
||||
LL | const fn const_trait_bounds_bad<T: [const] ConstTrait + [const] ConstTrait>() {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `[const] ConstTrait`
|
||||
|
||||
error: these where clauses contain repeated elements
|
||||
--> tests/ui/trait_duplication_in_bounds.rs:181:8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue