Skip to content

Handle discriminant in DataflowConstProp #107411

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

Merged
merged 8 commits into from
Feb 15, 2023
Merged
Changes from 1 commit
Commits
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
Next Next commit
Remove redundant test.
  • Loading branch information
cjgillot committed Feb 6, 2023
commit 0d59b8c997e31095732c9f9864e10d76daaeb42e
3 changes: 1 addition & 2 deletions compiler/rustc_mir_dataflow/src/value_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,7 @@ impl Map {
ty: Ty<'tcx>,
filter: &mut impl FnMut(Ty<'tcx>) -> bool,
) {
// Note: The framework supports only scalars for now.
if filter(ty) && ty.is_scalar() {
if filter(ty) {
// We know that the projection only contains trackable elements.
let place = self.make_place(local, projection).unwrap();

Expand Down