Skip to content

Commit 2013813

Browse files
committed
Auto merge of rust-lang#111290 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] backport This PR backports: - rust-lang#111015: Remove wrong assertion in match checking. - rust-lang#110917: only error combining +whole-archive and +bundle for rlibs - rust-lang#111201: bootstrap: add .gitmodules to the sources r? `@Mark-Simulacrum`
2 parents cc38d9f + c11cc10 commit 2013813

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,10 @@ fn link_rlib<'a>(
349349
let NativeLibKind::Static { bundle: None | Some(true), whole_archive } = lib.kind else {
350350
continue;
351351
};
352-
if whole_archive == Some(true) && !codegen_results.crate_info.feature_packed_bundled_libs {
352+
if whole_archive == Some(true)
353+
&& flavor == RlibFlavor::Normal
354+
&& !codegen_results.crate_info.feature_packed_bundled_libs
355+
{
353356
sess.emit_err(errors::IncompatibleLinkingModifiers);
354357
}
355358
if flavor == RlibFlavor::Normal && let Some(filename) = lib.filename {

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

-3
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,6 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
334334
let refutable = !is_let_irrefutable(&mut ncx, local_lint_level, tpat);
335335
Some((expr.span, refutable))
336336
}
337-
ExprKind::LogicalOp { op: LogicalOp::And, .. } => {
338-
bug!()
339-
}
340337
_ => None,
341338
}
342339
};

src/bootstrap/dist.rs

+1
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ impl Step for PlainSourceTarball {
976976
"config.example.toml",
977977
"Cargo.toml",
978978
"Cargo.lock",
979+
".gitmodules",
979980
];
980981
let src_dirs = ["src", "compiler", "library", "tests"];
981982

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// check-pass
2+
3+
fn main() {
4+
let c = 1;
5+
let w = "T";
6+
match Some(5) {
7+
None if c == 1 && (w != "Y" && w != "E") => {}
8+
_ => panic!(),
9+
}
10+
}

0 commit comments

Comments
 (0)