Skip to content

Commit c654671

Browse files
committed
a revelation
1 parent d4a7c12 commit c654671

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/rustc_mir_build/src/builder/matches/match_pair.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
152152
) -> MatchPairTree<'pat, 'tcx> {
153153
let tcx = self.tcx;
154154

155-
// TODO: should these be arrays?
156-
let (const_ty, pat_ty) = match src_pat_ty.kind() {
155+
tracing::warn!("source pattern type: {:?}", src_pat_ty);
156+
let (const_ty, pat_ty) = match src_pat_ty.kind() { // wait is source path the wrong thing to care about?
157157
ty::Slice(_) => (
158158
Ty::new_imm_ref(
159159
tcx,
@@ -168,11 +168,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
168168
tcx.lifetimes.re_erased,
169169
Ty::new_array(tcx, elem_ty, subslice_len),
170170
),
171-
Ty::new_array(tcx, elem_ty, subslice_len),
171+
Ty::new_array(tcx, elem_ty, subslice_len), // WRONG TYPE with too short array len for the move
172172
),
173173
_ => todo!(),
174174
};
175175

176+
tracing::warn!("const and new pattern type: {:?}, {:?}", const_ty, pat_ty);
177+
176178
let r#const = ty::Const::new(tcx, ty::ConstKind::Value(const_ty, valtree));
177179
let r#const2 = Const::Ty(const_ty, r#const);
178180

library/core/src/cmp.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#![stable(feature = "rust1", since = "1.0.0")]
2727

2828
mod bytewise;
29+
#[cfg(not(bootstrap))]
2930
mod pattern;
3031
pub(crate) use bytewise::BytewiseEq;
3132

0 commit comments

Comments
 (0)