Skip to content

Commit

Permalink
Auto merge of rust-lang#111290 - Mark-Simulacrum:beta-backport, r=Mar…
Browse files Browse the repository at this point in the history
…k-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`
  • Loading branch information
bors committed May 7, 2023
2 parents cc38d9f + c11cc10 commit 2013813
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,10 @@ fn link_rlib<'a>(
let NativeLibKind::Static { bundle: None | Some(true), whole_archive } = lib.kind else {
continue;
};
if whole_archive == Some(true) && !codegen_results.crate_info.feature_packed_bundled_libs {
if whole_archive == Some(true)
&& flavor == RlibFlavor::Normal
&& !codegen_results.crate_info.feature_packed_bundled_libs
{
sess.emit_err(errors::IncompatibleLinkingModifiers);
}
if flavor == RlibFlavor::Normal && let Some(filename) = lib.filename {
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx> {
let refutable = !is_let_irrefutable(&mut ncx, local_lint_level, tpat);
Some((expr.span, refutable))
}
ExprKind::LogicalOp { op: LogicalOp::And, .. } => {
bug!()
}
_ => None,
}
};
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ impl Step for PlainSourceTarball {
"config.example.toml",
"Cargo.toml",
"Cargo.lock",
".gitmodules",
];
let src_dirs = ["src", "compiler", "library", "tests"];

Expand Down
10 changes: 10 additions & 0 deletions tests/ui/match/guards-parenthesized-and.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// check-pass

fn main() {
let c = 1;
let w = "T";
match Some(5) {
None if c == 1 && (w != "Y" && w != "E") => {}
_ => panic!(),
}
}

0 comments on commit 2013813

Please sign in to comment.