Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit 6972b5d

Browse files
David Tolnayfacebook-github-bot
authored andcommitted
Update to 1.61.0 in fbcode and xplat (2nd attempt)
Summary: This diff consists of `hg backout D37023453 (https://github.com/facebookincubator/gazebo_lint/commit/63bb3ebe9b297130c8277dbd543989d2652cf51e)` ({D37023453 (63bb3eb)}) + `tp2_update_fbcode rust` to pick up {D37030185}. See summary of D37030185 for a description of the regression in the first 1.61.0 upgrade. In brief, rustc switching from `num_cpus` to `available_parallelism` resulted in misidentifying the number of available CPUs in some environments including Remote Execution, resulting in enormously increased memory usage and failing builds. I simply reverted that to go back to `num_cpus`, same as what was used in all prior Rust versions. Reviewed By: zertosh, diliop Differential Revision: D37036063 fbshipit-source-id: 9520b93b07620fbb35ab7902b8975be9ac329a11
1 parent 63bb3eb commit 6972b5d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gazebo_lint/src/clippy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ pub fn match_def_path(cx: &LateContext, did: DefId, syms: &[&str]) -> bool {
190190
/// Matches the given `ty` with generics to the given types and generic types
191191
pub fn match_ty_path(cx: &LateContext, ty: Ty, ty_path: &[&str], generic_tys: &[&[&str]]) -> bool {
192192
if let TyKind::Adt(ty, subst) = ty.kind() {
193-
if match_def_path(cx, ty.did, ty_path) {
193+
if match_def_path(cx, ty.did(), ty_path) {
194194
let mut i = 0;
195195
while i < generic_tys.len() {
196196
if let Some(ty_param) = subst.type_at(i).ty_adt_def() {
197-
if !match_def_path(cx, ty_param.did, generic_tys[i]) {
197+
if !match_def_path(cx, ty_param.did(), generic_tys[i]) {
198198
return false;
199199
} else {
200200
i += 1;

gazebo_lint/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ fn check_impl_dupe(cx: &LateContext, item: &Item) {
428428
) -> bool {
429429
match self_tys.kind() {
430430
TyKind::Adt(self_adt, sub) => {
431-
for variant in self_adt.variants.iter() {
431+
for variant in self_adt.variants() {
432432
let mut fields = variant.fields.iter();
433433
if let Some(field) = fields.next() {
434434
if fields.next().is_some() {

0 commit comments

Comments
 (0)