Skip to content

Rollup of 6 pull requests #133259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
26c4893
Mark 'get_mut' and 'set_position' in 'std::io::Cursor' as const;
bjoernager Sep 24, 2024
3727a8c
uefi: process: Add args support
Ayush1325 Aug 31, 2024
1709a85
Store resolution for self and crate root module segments
compiler-errors Oct 27, 2024
ba12a99
we should not be reporting generic error if there is not a segment to…
compiler-errors Oct 26, 2024
ff2f7a7
Point at `const` definition when used instead of a binding in a `let`…
estebank Nov 6, 2024
c25b44b
Fold `PatKind::NamedConstant` into `PatKind::Constant`
estebank Nov 6, 2024
6dc79f6
Use `item_name` instead of a span snippet when talking about const pa…
estebank Nov 6, 2024
a5b4d45
Point at const when intended binding fall-through pattern is a const
estebank Nov 7, 2024
f563efe
Unify expanded constants and named constants in `PatKind`
estebank Nov 7, 2024
f1772d5
Make suggestion verbose
estebank Nov 7, 2024
bb37e5d
review comments
estebank Nov 12, 2024
6480b76
review comments
estebank Nov 13, 2024
912ee65
review comment: modify doc comment
estebank Nov 17, 2024
29acf8b
Account for `ExpandedConstant` in `parse_match`
estebank Nov 17, 2024
f37d021
Account for `wasm32v1-none` when exporting TLS symbols
daxpedda Nov 20, 2024
06e66d7
Rip out built-in PointerLike impl
compiler-errors Nov 19, 2024
228068b
Make PointerLike opt-in as a trait
compiler-errors Nov 20, 2024
8a8069a
Rollup merge of #129838 - Ayush1325:uefi-process-args, r=joboet
matthiaskrgr Nov 20, 2024
ce1543f
Rollup merge of #130800 - bjoernager:const-mut-cursor, r=joshtriplett
matthiaskrgr Nov 20, 2024
edf0995
Rollup merge of #132207 - compiler-errors:tweak-res-mod-segment, r=pe…
matthiaskrgr Nov 20, 2024
4f53fa2
Rollup merge of #132708 - estebank:const-as-binding, r=Nadrieril
matthiaskrgr Nov 20, 2024
eb9fbb0
Rollup merge of #133226 - compiler-errors:opt-in-pointer-like, r=lcnr
matthiaskrgr Nov 20, 2024
6199e01
Rollup merge of #133244 - daxpedda:wasm32v1-none-atomic, r=alexcrichton
matthiaskrgr Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Account for ExpandedConstant in parse_match
  • Loading branch information
estebank committed Nov 17, 2024
commit 29acf8b422ab446fa4cd51fbb0e5a145f30c1cfc
20 changes: 14 additions & 6 deletions compiler/rustc_mir_build/src/build/custom/parse/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,20 @@ impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
let mut targets = Vec::new();
for arm in rest {
let arm = &self.thir[*arm];
let PatKind::Constant { value } = arm.pattern.kind else {
return Err(ParseError {
span: arm.pattern.span,
item_description: format!("{:?}", arm.pattern.kind),
expected: "constant pattern".to_string(),
});
let value = match arm.pattern.kind {
PatKind::Constant { value } => value,
PatKind::ExpandedConstant { ref subpattern, def_id: _, is_inline: false }
if let PatKind::Constant { value } = subpattern.kind =>
{
value
}
_ => {
return Err(ParseError {
span: arm.pattern.span,
item_description: format!("{:?}", arm.pattern.kind),
expected: "constant pattern".to_string(),
});
}
};
values.push(value.eval_bits(self.tcx, self.param_env));
targets.push(self.parse_block(arm.body)?);
Expand Down
Loading