Skip to content

Commit 87f3a99

Browse files
committed
Make build pass
1 parent 85dad03 commit 87f3a99

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
@@ -661,9 +661,6 @@ declare_features! (
661661
(incomplete, unsafe_binders, "1.85.0", Some(130516)),
662662
/// Allows declaring fields `unsafe`.
663663
(incomplete, unsafe_fields, "1.85.0", Some(132922)),
664-
/// Allows const generic parameters to be defined with types that
665-
/// are not `Sized`, e.g. `fn foo<const N: [u8]>() {`.
666-
(incomplete, unsized_const_params, "1.82.0", Some(95174)),
667664
/// Allows unsized fn parameters.
668665
(internal, unsized_fn_params, "1.49.0", Some(48055)),
669666
/// 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
@@ -208,6 +208,7 @@ symbols! {
208208
CoerceUnsized,
209209
Command,
210210
ConstParamTy,
211+
ConstParamTy_,
211212
Context,
212213
Continue,
213214
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
@@ -1097,22 +1097,22 @@ pub macro ConstParamTy($item:item) {
10971097
// FIXME(adt_const_params): handle `ty::FnDef`/`ty::Closure`
10981098
marker_impls! {
10991099
#[unstable(feature = "adt_const_params", issue = "95174")]
1100-
ConstParamTy for
1100+
ConstParamTy_ for
11011101
usize, u8, u16, u32, u64, u128,
11021102
isize, i8, i16, i32, i64, i128,
11031103
bool,
11041104
char,
11051105
(),
1106-
{T: ConstParamTy, const N: usize} [T; N],
1106+
{T: ConstParamTy_, const N: usize} [T; N],
11071107
}
11081108

11091109
marker_impls! {
11101110
#[unstable(feature = "unsized_const_params", issue = "95174")]
11111111
#[unstable_feature_bound(unsized_const_params)]
1112-
ConstParamTy for
1112+
ConstParamTy_ for
11131113
str,
1114-
{T: ConstParamTy} [T],
1115-
{T: ConstParamTy + ?Sized} &T,
1114+
{T: ConstParamTy_} [T],
1115+
{T: ConstParamTy_ + ?Sized} &T,
11161116
}
11171117

11181118
/// 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
@@ -46,7 +46,7 @@ macro_rules! tuple_impls {
4646
$($T)+ @
4747
#[unstable(feature = "adt_const_params", issue = "95174")]
4848
#[unstable_feature_bound(adt_const_params)]
49-
impl<$($T: ConstParamTy),+> ConstParamTy for ($($T,)+)
49+
impl<$($T: ConstParamTy_),+> ConstParamTy_ for ($($T,)+)
5050
{}
5151
}
5252

0 commit comments

Comments
 (0)