mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-01 17:42:47 +00:00
Auto merge of #111290 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] backport This PR backports: - #111015: Remove wrong assertion in match checking. - #110917: only error combining +whole-archive and +bundle for rlibs - #111201: bootstrap: add .gitmodules to the sources r? `@Mark-Simulacrum`
This commit is contained in:
commit
2013813b65
@ -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 {
|
||||
|
@ -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,
|
||||
}
|
||||
};
|
||||
|
@ -976,6 +976,7 @@ impl Step for PlainSourceTarball {
|
||||
"config.example.toml",
|
||||
"Cargo.toml",
|
||||
"Cargo.lock",
|
||||
".gitmodules",
|
||||
];
|
||||
let src_dirs = ["src", "compiler", "library", "tests"];
|
||||
|
||||
|
10
tests/ui/match/guards-parenthesized-and.rs
Normal file
10
tests/ui/match/guards-parenthesized-and.rs
Normal file
@ -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!(),
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user