-
Notifications
You must be signed in to change notification settings - Fork 13.8k
remove unnecessary structurally_resolve_type
#146637
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
base: master
Are you sure you want to change the base?
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
remove unnecessary `structurally_resolve_type`
a6ae1f4
to
c7e140b
Compare
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7b0b20b): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.8%, secondary -1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 473.048s -> 473.468s (0.09%) |
index_ty: Ty<'tcx>, | ||
index_expr: &hir::Expr<'_>, | ||
) -> Option<(/*index type*/ Ty<'tcx>, /*element type*/ Ty<'tcx>)> { | ||
let adjusted_ty = self.structurally_resolve_type(autoderef.span(), autoderef.final_ty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this means we no longer eagerly error on infer vars here. surprised we don't have a test for it. needs test + check for infer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think
fn foo() {
let x = &Default::default();
x[1];
let _: &Vec<()> = x;
}
``` would work
☔ The latest upstream changes (presumably #146885) made this pull request unmergeable. Please resolve the merge conflicts. |
the types returned by
Autoderef
are always structurally resolved, cc #145990.r? @BoxyUwU