Skip to content

Commit a23ab7e

Browse files
committed
Make build pass
1 parent 9a52da8 commit a23ab7e

File tree

8 files changed

+13
-15
lines changed

8 files changed

+13
-15
lines changed

compiler/rustc_builtin_macros/src/deriving/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub(crate) fn expand_deriving_const_param_ty(
3939
) {
4040
let trait_def = TraitDef {
4141
span,
42-
path: path_std!(marker::ConstParamTy),
42+
path: path_std!(marker::ConstParamTy_),
4343
skip_path_as_bound: false,
4444
needs_copy_as_bound_if_packed: false,
4545
additional_bounds: vec![ty::Ty::Path(path_std!(cmp::Eq))],

compiler/rustc_feature/src/unstable.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,6 @@ declare_features! (
667667
(incomplete, unsafe_binders, "1.85.0", Some(130516)),
668668
/// Allows declaring fields `unsafe`.
669669
(incomplete, unsafe_fields, "1.85.0", Some(132922)),
670-
/// Allows const generic parameters to be defined with types that
671-
/// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
672-
(incomplete, unsized_const_params, "1.82.0", Some(95174)),
673670
/// Allows unsized fn parameters.
674671
(internal, unsized_fn_params, "1.49.0", Some(48055)),
675672
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.

compiler/rustc_hir_analysis/src/coherence/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn visit_implementation_of_const_param_ty(
139139
checker: &Checker<'_>,
140140
kind: LangItem,
141141
) -> Result<(), ErrorGuaranteed> {
142-
assert_matches!(kind, LangItem::ConstParamTy | LangItem::UnsizedConstParamTy);
142+
assert_matches!(kind, LangItem::ConstParamTy);
143143

144144
let tcx = checker.tcx;
145145
let header = checker.impl_header;

compiler/rustc_span/src/symbol.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ symbols! {
207207
CoerceUnsized,
208208
Command,
209209
ConstParamTy,
210+
ConstParamTy_,
210211
Context,
211212
Continue,
212213
ControlFlow,

compiler/rustc_trait_selection/src/traits/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub fn type_allowed_to_implement_const_param_ty<'tcx>(
103103
parent_cause: ObligationCause<'tcx>,
104104
) -> Result<(), ConstParamTyImplementationError<'tcx>> {
105105
// FIXME: core panics if remove unsizedconstparamty, figure out why
106-
assert_matches!(lang_item, LangItem::ConstParamTy | LangItem::UnsizedConstParamTy);
106+
assert_matches!(lang_item, LangItem::ConstParamTy);
107107
let mut need_unstable_feature_bound = false;
108108

109109
let inner_tys: Vec<_> = match *self_type.kind() {

library/core/src/marker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,22 +1096,22 @@ pub macro ConstParamTy($item:item) {
10961096
// FIXME(adt_const_params): handle `ty::FnDef`/`ty::Closure`
10971097
marker_impls! {
10981098
#[unstable(feature = "adt_const_params", issue = "95174")]
1099-
ConstParamTy for
1099+
ConstParamTy_ for
11001100
usize, u8, u16, u32, u64, u128,
11011101
isize, i8, i16, i32, i64, i128,
11021102
bool,
11031103
char,
11041104
(),
1105-
{T: ConstParamTy, const N: usize} [T; N],
1105+
{T: ConstParamTy_, const N: usize} [T; N],
11061106
}
11071107

11081108
marker_impls! {
11091109
#[unstable(feature = "unsized_const_params", issue = "95174")]
11101110
#[unstable_feature_bound(unsized_const_params)]
1111-
ConstParamTy for
1111+
ConstParamTy_ for
11121112
str,
1113-
{T: ConstParamTy} [T],
1114-
{T: ConstParamTy + ?Sized} &T,
1113+
{T: ConstParamTy_} [T],
1114+
{T: ConstParamTy_ + ?Sized} &T,
11151115
}
11161116

11171117
/// A common trait implemented by all function pointers.

library/core/src/mem/transmutability.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::marker::ConstParamTy;
1+
use crate::marker::ConstParamTy_;
22

33
/// Marks that `Src` is transmutable into `Self`.
44
///
@@ -290,7 +290,7 @@ pub struct Assume {
290290

291291
#[unstable(feature = "transmutability", issue = "99571")]
292292
#[unstable_feature_bound(transmutability)]
293-
impl ConstParamTy for Assume {}
293+
impl ConstParamTy_ for Assume {}
294294

295295
impl Assume {
296296
/// With this, [`TransmuteFrom`] does not assume you have ensured any safety

library/core/src/tuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// See core/src/primitive_docs.rs for documentation.
22

33
use crate::cmp::Ordering::{self, *};
4-
use crate::marker::{ConstParamTy, StructuralPartialEq};
4+
use crate::marker::{ConstParamTy_, StructuralPartialEq};
55
use crate::ops::ControlFlow::{self, Break, Continue};
66

77
// Recursive macro for implementing n-ary tuple functions and operations
@@ -48,7 +48,7 @@ macro_rules! tuple_impls {
4848
$($T)+ @
4949
#[unstable(feature = "adt_const_params", issue = "95174")]
5050
#[unstable_feature_bound(adt_const_params)]
51-
impl<$($T: ConstParamTy),+> ConstParamTy for ($($T,)+)
51+
impl<$($T: ConstParamTy_),+> ConstParamTy_ for ($($T,)+)
5252
{}
5353
}
5454

0 commit comments

Comments
 (0)