Skip to content

Update Clippy #95273

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 71 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
ce841fe
Format with `rustfmt_if_chain`
smoelius Mar 5, 2022
1a95590
Fix #8507
smoelius Mar 6, 2022
840dc10
Update clippy to new ExprUseVisitor delegate
eholk Feb 26, 2022
05008fe
Remove is_autoref parameter
eholk Mar 11, 2022
d1b087f
Merge commit 'dc5423ad448877e33cca28db2f1445c9c4473c75' into clippyup
flip1995 Mar 14, 2022
fc5540a
Make `search_is_some`s suggestion `MachineApplicable`
xFrednet Mar 14, 2022
2ee5372
Allow `single_component_path_imports` for all macros
xFrednet Mar 14, 2022
0e1311b
Auto merge of #8536 - xFrednet:8062-applicability-search-is-some, r=c…
bors Mar 14, 2022
9a1f6a9
Auto merge of #8537 - xFrednet:7923-single-component-path-imports-for…
bors Mar 14, 2022
5ed4022
fix typos
Dylan-DPC Mar 15, 2022
71ecbc4
Auto merge of #8509 - smoelius:fix-8507, r=giraffate
bors Mar 15, 2022
b981748
Move iter_with_drain to nursery
flip1995 Mar 15, 2022
b83c632
Auto merge of #8541 - flip1995:iter_with_drain_ambulance, r=giraffate
bors Mar 15, 2022
6a3dbe4
`unnecessary_lazy_eval` show suggestions on multiline lint
dswij Mar 15, 2022
5c1843d
Moved lint to `restriction`
Mar 15, 2022
a39d649
Lint list updated
p-gentili Mar 15, 2022
fc5cbba
fix typo in code-block kind specifier
KisaragiEffective Mar 15, 2022
9f95e76
fix typo in code-block kind specifier
KisaragiEffective Mar 16, 2022
e71ac41
Fix `transmute_undefined_repr` for single element tuples
Jarcho Mar 16, 2022
442d4ce
Don't lint fat pointer to `(usize, usize)` conversion in `transmute_u…
Jarcho Mar 16, 2022
7fd52b5
Small simplification to `transmute_undefined_repr`
Jarcho Mar 16, 2022
911e105
Don't lint `transmute_undefined_repr` on unions.
Jarcho Mar 16, 2022
47c9ed6
Fix checking transmutes with adjusted types
Jarcho Mar 16, 2022
d6a3fbf
Auto merge of #8546 - KisaragiEffective:patch-1, r=llogiq
bors Mar 16, 2022
2b0e730
Auto merge of #8547 - Jarcho:transmute_8501, r=flip1995
bors Mar 16, 2022
d23ddab
Auto merge of #8544 - nellorocca:dev/5757, r=flip1995
bors Mar 16, 2022
4beda1b
resolve the conflict in compiler/rustc_session/src/parse.rs
codehorseman Mar 16, 2022
851e715
Don't lint `ptr_arg` on `&mut Cow<_>`
Jarcho Mar 16, 2022
8e5208c
Don't lint `transmute_undefined_repr` when changing the type of gener…
Jarcho Mar 16, 2022
b37317b
Check if there are any overlapping patterns between equal arm bodies …
Jarcho Jan 6, 2022
5508f46
Use `DroplessArena` when allocating `ResolvedPat`s
Jarcho Jan 6, 2022
4f8f4b4
Handle slice patterns in `match_same_arms`
Jarcho Jan 6, 2022
08a7157
Improve message for `match_single_arms`
Jarcho Jan 22, 2022
65e5cd0
Auto merge of #8553 - Jarcho:transmute_undefined_8499, r=llogiq
bors Mar 16, 2022
773d203
Fix mixed enum variant kinds + code cleanup
Jarcho Mar 17, 2022
bd888d4
Add some comments
dswij Mar 17, 2022
3ede557
Fix typo in bug report
pickfire Mar 17, 2022
8d5c0ea
Auto merge of #8552 - Jarcho:ptr_arg_8495, r=xFrednet
bors Mar 17, 2022
f49a2c3
feat: add use_unwrap_or
FoseFx Mar 17, 2022
3f00f07
fix: fix tests
FoseFx Mar 17, 2022
747bb24
fix: fix broken dogfood tests
FoseFx Mar 17, 2022
c22ff6c
fix: fix clippy_lints
FoseFx Mar 17, 2022
59dd179
Rollup merge of #94309 - eholk:issue-57017, r=tmandry
Dylan-DPC Mar 17, 2022
1f069c0
Rollup merge of #94960 - codehorseman:master, r=oli-obk
Dylan-DPC Mar 17, 2022
4493fc7
refactor: use pattern matching for MethodCall arguments
FoseFx Mar 17, 2022
17ff850
feat: rename variable in example
FoseFx Mar 17, 2022
44c62c9
feat: add tests and fix existing ones
FoseFx Mar 17, 2022
39329d1
Add lint `cast_enum_constructor`
Jarcho Mar 17, 2022
05e05ea
refactor: rename lint to or_then_unwrap
FoseFx Mar 18, 2022
3c4192f
fix: ran update_lints
FoseFx Mar 18, 2022
9fd3c2d
Auto merge of #8543 - dswij:8393, r=giraffate
bors Mar 18, 2022
fd2c860
feat: add comment
FoseFx Mar 18, 2022
a31dcb7
Auto merge of #8562 - Jarcho:enum_tuple_variant_as_int, r=Manishearth
bors Mar 18, 2022
34ad33c
refactor: move into methods module
FoseFx Mar 18, 2022
f00e844
feat: use span_lint_and_sugg
FoseFx Mar 18, 2022
895de1f
feat: make fixable
FoseFx Mar 18, 2022
20c352a
test: add method chain test
FoseFx Mar 19, 2022
47b93ea
Auto merge of #8559 - pickfire:patch-1, r=xFrednet
bors Mar 20, 2022
0f83753
feat: change error message
FoseFx Mar 20, 2022
4580c8a
refactor: use is_lang_ctor()
FoseFx Mar 20, 2022
765cce1
refactor: remove need for MethodCall matching
FoseFx Mar 20, 2022
5b6295d
allowing [`map_flatten`] to split long suggestions
J-ZhengLi Mar 21, 2022
ff0a368
Auto merge of #8520 - J-ZhengLi:issue8506, r=xFrednet
bors Mar 21, 2022
4a07662
Auto merge of #8561 - FoseFx:use_unwrap_or, r=xFrednet
bors Mar 21, 2022
f07ee8a
Auto merge of #8232 - Jarcho:match_same_arm_860, r=xFrednet
bors Mar 21, 2022
b60a7fb
`unnecessary_join` lint
yoav-lavi Mar 24, 2022
e29b3b5
Auto merge of #8579 - yoav-lavi:squashed-master, r=flip1995
bors Mar 24, 2022
1147b2c
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Mar 24, 2022
c995a8b
Bump nightly version -> 2022-03-24
flip1995 Mar 24, 2022
d0cf348
Auto merge of #8580 - flip1995:rustup, r=flip1995
bors Mar 24, 2022
3365e9a
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
flip1995 Mar 24, 2022
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
2 changes: 1 addition & 1 deletion src/tools/clippy/.github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
id: reproducer
attributes:
label: Reproducer
description: Please provide the code and steps to repoduce the bug
description: Please provide the code and steps to reproduce the bug
value: |
I tried this code:

Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3069,6 +3069,7 @@ Released 2018-09-13
[`bytes_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#bytes_nth
[`cargo_common_metadata`]: https://rust-lang.github.io/rust-clippy/master/index.html#cargo_common_metadata
[`case_sensitive_file_extension_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#case_sensitive_file_extension_comparisons
[`cast_enum_constructor`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_enum_constructor
[`cast_enum_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_enum_truncation
[`cast_lossless`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless
[`cast_possible_truncation`]: https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
Expand Down Expand Up @@ -3366,6 +3367,7 @@ Released 2018-09-13
[`option_map_unit_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
[`option_option`]: https://rust-lang.github.io/rust-clippy/master/index.html#option_option
[`or_fun_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
[`or_then_unwrap`]: https://rust-lang.github.io/rust-clippy/master/index.html#or_then_unwrap
[`out_of_bounds_indexing`]: https://rust-lang.github.io/rust-clippy/master/index.html#out_of_bounds_indexing
[`overflow_check_conditional`]: https://rust-lang.github.io/rust-clippy/master/index.html#overflow_check_conditional
[`panic`]: https://rust-lang.github.io/rust-clippy/master/index.html#panic
Expand Down Expand Up @@ -3506,6 +3508,7 @@ Released 2018-09-13
[`unnecessary_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
[`unnecessary_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_find_map
[`unnecessary_fold`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold
[`unnecessary_join`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_join
[`unnecessary_lazy_evaluations`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
[`unnecessary_mut_passed`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
[`unnecessary_operation`]: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_operation
Expand Down
21 changes: 21 additions & 0 deletions src/tools/clippy/clippy_lints/src/casts/cast_enum_constructor.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use clippy_utils::diagnostics::span_lint;
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
use rustc_hir::{Expr, ExprKind};
use rustc_lint::LateContext;
use rustc_middle::ty::{self, Ty};

use super::CAST_ENUM_CONSTRUCTOR;

pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_from: Ty<'_>) {
if matches!(cast_from.kind(), ty::FnDef(..))
&& let ExprKind::Path(path) = &cast_expr.kind
&& let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Fn), _) = cx.qpath_res(path, cast_expr.hir_id)
{
span_lint(
cx,
CAST_ENUM_CONSTRUCTOR,
expr.span,
"cast of an enum tuple constructor to an integer",
);
}
}
21 changes: 21 additions & 0 deletions src/tools/clippy/clippy_lints/src/casts/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod cast_enum_constructor;
mod cast_lossless;
mod cast_possible_truncation;
mod cast_possible_wrap;
Expand Down Expand Up @@ -454,6 +455,24 @@ declare_clippy_lint! {
"casting using `as` between raw pointers to slices of types with different sizes"
}

declare_clippy_lint! {
/// ### What it does
/// Checks for casts from an enum tuple constructor to an integer.
///
/// ### Why is this bad?
/// The cast is easily confused with casting a c-like enum value to an integer.
///
/// ### Example
/// ```rust
/// enum E { X(i32) };
/// let _ = E::X as usize;
/// ```
#[clippy::version = "1.61.0"]
pub CAST_ENUM_CONSTRUCTOR,
suspicious,
"casts from an enum tuple constructor to an integer"
}

pub struct Casts {
msrv: Option<RustcVersion>,
}
Expand Down Expand Up @@ -481,6 +500,7 @@ impl_lint_pass!(Casts => [
CHAR_LIT_AS_U8,
PTR_AS_PTR,
CAST_ENUM_TRUNCATION,
CAST_ENUM_CONSTRUCTOR
]);

impl<'tcx> LateLintPass<'tcx> for Casts {
Expand Down Expand Up @@ -518,6 +538,7 @@ impl<'tcx> LateLintPass<'tcx> for Casts {
cast_sign_loss::check(cx, expr, cast_expr, cast_from, cast_to);
}
cast_lossless::check(cx, expr, cast_expr, cast_from, cast_to, &self.msrv);
cast_enum_constructor::check(cx, expr, cast_expr, cast_from);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/clippy_lints/src/collapsible_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ declare_clippy_lint! {
///
/// Should be written:
///
/// ```rust.ignore
/// ```rust,ignore
/// if x && y {
/// …
/// }
Expand Down Expand Up @@ -76,7 +76,7 @@ declare_clippy_lint! {
///
/// Should be written:
///
/// ```rust.ignore
/// ```rust,ignore
/// if x {
/// …
/// } else if y {
Expand Down
15 changes: 7 additions & 8 deletions src/tools/clippy/clippy_lints/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,12 +637,6 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
loop {
match parser.parse_item(ForceCollect::No) {
Ok(Some(item)) => match &item.kind {
// Tests with one of these items are ignored
ItemKind::Static(..)
| ItemKind::Const(..)
| ItemKind::ExternCrate(..)
| ItemKind::ForeignMod(..) => return false,
// We found a main function ...
ItemKind::Fn(box Fn {
sig, body: Some(block), ..
}) if item.ident.name == sym::main => {
Expand All @@ -661,8 +655,13 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
return false;
}
},
// Another function was found; this case is ignored too
ItemKind::Fn(..) => return false,
// Tests with one of these items are ignored
ItemKind::Static(..)
| ItemKind::Const(..)
| ItemKind::ExternCrate(..)
| ItemKind::ForeignMod(..)
// Another function was found; this case is ignored
| ItemKind::Fn(..) => return false,
_ => {},
},
Ok(None) => break,
Expand Down
4 changes: 2 additions & 2 deletions src/tools/clippy/clippy_lints/src/lib.register_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(bool_assert_comparison::BOOL_ASSERT_COMPARISON),
LintId::of(booleans::LOGIC_BUG),
LintId::of(booleans::NONMINIMAL_BOOL),
LintId::of(casts::CAST_ENUM_CONSTRUCTOR),
LintId::of(casts::CAST_ENUM_TRUNCATION),
LintId::of(casts::CAST_REF_TO_MUT),
LintId::of(casts::CAST_SLICE_DIFFERENT_SIZES),
Expand Down Expand Up @@ -166,7 +167,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(methods::ITER_NTH_ZERO),
LintId::of(methods::ITER_OVEREAGER_CLONED),
LintId::of(methods::ITER_SKIP_NEXT),
LintId::of(methods::ITER_WITH_DRAIN),
LintId::of(methods::MANUAL_FILTER_MAP),
LintId::of(methods::MANUAL_FIND_MAP),
LintId::of(methods::MANUAL_SATURATING_ARITHMETIC),
Expand All @@ -182,6 +182,7 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(methods::OPTION_FILTER_MAP),
LintId::of(methods::OPTION_MAP_OR_NONE),
LintId::of(methods::OR_FUN_CALL),
LintId::of(methods::OR_THEN_UNWRAP),
LintId::of(methods::RESULT_MAP_OR_INTO_OPTION),
LintId::of(methods::SEARCH_IS_SOME),
LintId::of(methods::SHOULD_IMPLEMENT_TRAIT),
Expand Down Expand Up @@ -290,7 +291,6 @@ store.register_group(true, "clippy::all", Some("clippy_all"), vec![
LintId::of(transmute::UNSOUND_COLLECTION_TRANSMUTE),
LintId::of(transmute::WRONG_TRANSMUTE),
LintId::of(transmuting_null::TRANSMUTING_NULL),
LintId::of(try_err::TRY_ERR),
LintId::of(types::BORROWED_BOX),
LintId::of(types::BOX_COLLECTION),
LintId::of(types::REDUNDANT_ALLOCATION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ store.register_group(true, "clippy::complexity", Some("clippy_complexity"), vec!
LintId::of(methods::NEEDLESS_SPLITN),
LintId::of(methods::OPTION_AS_REF_DEREF),
LintId::of(methods::OPTION_FILTER_MAP),
LintId::of(methods::OR_THEN_UNWRAP),
LintId::of(methods::SEARCH_IS_SOME),
LintId::of(methods::SKIP_WHILE_NEXT),
LintId::of(methods::UNNECESSARY_FILTER_MAP),
Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/clippy_lints/src/lib.register_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ store.register_lints(&[
cargo::REDUNDANT_FEATURE_NAMES,
cargo::WILDCARD_DEPENDENCIES,
case_sensitive_file_extension_comparisons::CASE_SENSITIVE_FILE_EXTENSION_COMPARISONS,
casts::CAST_ENUM_CONSTRUCTOR,
casts::CAST_ENUM_TRUNCATION,
casts::CAST_LOSSLESS,
casts::CAST_POSSIBLE_TRUNCATION,
Expand Down Expand Up @@ -319,6 +320,7 @@ store.register_lints(&[
methods::OPTION_FILTER_MAP,
methods::OPTION_MAP_OR_NONE,
methods::OR_FUN_CALL,
methods::OR_THEN_UNWRAP,
methods::RESULT_MAP_OR_INTO_OPTION,
methods::SEARCH_IS_SOME,
methods::SHOULD_IMPLEMENT_TRAIT,
Expand All @@ -332,6 +334,7 @@ store.register_lints(&[
methods::UNNECESSARY_FILTER_MAP,
methods::UNNECESSARY_FIND_MAP,
methods::UNNECESSARY_FOLD,
methods::UNNECESSARY_JOIN,
methods::UNNECESSARY_LAZY_EVALUATIONS,
methods::UNNECESSARY_TO_OWNED,
methods::UNWRAP_OR_ELSE_DEFAULT,
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/clippy_lints/src/lib.register_nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ store.register_group(true, "clippy::nursery", Some("clippy_nursery"), vec![
LintId::of(future_not_send::FUTURE_NOT_SEND),
LintId::of(index_refutable_slice::INDEX_REFUTABLE_SLICE),
LintId::of(let_if_seq::USELESS_LET_IF_SEQ),
LintId::of(methods::ITER_WITH_DRAIN),
LintId::of(missing_const_for_fn::MISSING_CONST_FOR_FN),
LintId::of(mutable_debug_assertion::DEBUG_ASSERT_WITH_MUT_CALL),
LintId::of(mutex_atomic::MUTEX_ATOMIC),
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/clippy_lints/src/lib.register_pedantic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ store.register_group(true, "clippy::pedantic", Some("clippy_pedantic"), vec![
LintId::of(methods::IMPLICIT_CLONE),
LintId::of(methods::INEFFICIENT_TO_STRING),
LintId::of(methods::MAP_UNWRAP_OR),
LintId::of(methods::UNNECESSARY_JOIN),
LintId::of(misc::FLOAT_CMP),
LintId::of(misc::USED_UNDERSCORE_BINDING),
LintId::of(mut_mut::MUT_MUT),
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/clippy_lints/src/lib.register_perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ store.register_group(true, "clippy::perf", Some("clippy_perf"), vec![
LintId::of(methods::EXTEND_WITH_DRAIN),
LintId::of(methods::ITER_NTH),
LintId::of(methods::ITER_OVEREAGER_CLONED),
LintId::of(methods::ITER_WITH_DRAIN),
LintId::of(methods::MANUAL_STR_REPEAT),
LintId::of(methods::OR_FUN_CALL),
LintId::of(methods::SINGLE_CHAR_PATTERN),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ store.register_group(true, "clippy::restriction", Some("clippy_restriction"), ve
LintId::of(strings::STRING_SLICE),
LintId::of(strings::STRING_TO_STRING),
LintId::of(strings::STR_TO_STRING),
LintId::of(try_err::TRY_ERR),
LintId::of(types::RC_BUFFER),
LintId::of(types::RC_MUTEX),
LintId::of(undocumented_unsafe_blocks::UNDOCUMENTED_UNSAFE_BLOCKS),
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/clippy_lints/src/lib.register_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ store.register_group(true, "clippy::style", Some("clippy_style"), vec![
LintId::of(single_component_path_imports::SINGLE_COMPONENT_PATH_IMPORTS),
LintId::of(tabs_in_doc_comments::TABS_IN_DOC_COMMENTS),
LintId::of(to_digit_is_some::TO_DIGIT_IS_SOME),
LintId::of(try_err::TRY_ERR),
LintId::of(unsafe_removed_from_name::UNSAFE_REMOVED_FROM_NAME),
LintId::of(unused_unit::UNUSED_UNIT),
LintId::of(upper_case_acronyms::UPPER_CASE_ACRONYMS),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ store.register_group(true, "clippy::suspicious", Some("clippy_suspicious"), vec!
LintId::of(attrs::BLANKET_CLIPPY_RESTRICTION_LINTS),
LintId::of(await_holding_invalid::AWAIT_HOLDING_LOCK),
LintId::of(await_holding_invalid::AWAIT_HOLDING_REFCELL_REF),
LintId::of(casts::CAST_ENUM_CONSTRUCTOR),
LintId::of(casts::CAST_ENUM_TRUNCATION),
LintId::of(eval_order_dependence::EVAL_ORDER_DEPENDENCE),
LintId::of(float_equality_without_abs::FLOAT_EQUALITY_WITHOUT_ABS),
Expand Down
1 change: 1 addition & 0 deletions src/tools/clippy/clippy_lints/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

// FIXME: switch to something more ergonomic here, once available.
// (Currently there is no way to opt into sysroot crates without `extern crate`.)
extern crate rustc_arena;
extern crate rustc_ast;
extern crate rustc_ast_pretty;
extern crate rustc_attr;
Expand Down
Loading