From da57d1501bfef603a63467ec2b05b7e1acba693a Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Wed, 25 Sep 2024 21:37:48 -0700 Subject: [PATCH] [starlark] Rename Error::new -> new_kind Summary: To free the `new` name for "default" constructor. That should be `ErrorKind::Other` or `ErrorKind::Native`? Test Plan: CI Reviewed By: JakobDegen Differential Revision: D63304734 fbshipit-source-id: 55c49781a8b05f18824ff8952bb5ebe8e851497b --- antlir/bzl/shape2/bzl2ir.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antlir/bzl/shape2/bzl2ir.rs b/antlir/bzl/shape2/bzl2ir.rs index 0e62a1313c9..834dc498788 100644 --- a/antlir/bzl/shape2/bzl2ir.rs +++ b/antlir/bzl/shape2/bzl2ir.rs @@ -130,9 +130,9 @@ impl<'v> StarlarkValue<'v> for TypeId { args.no_named_args()?; args.positional1(eval.heap()) } - _ => Err(starlark::Error::new(starlark::ErrorKind::Other(anyhow!( + _ => Err(starlark::Error::new_other(anyhow!( "only structs and enums are callable, not ({ty:#?})" - )))), + ))), } } }