Skip to content

Commit 1ab34f0

Browse files
committed
Remove extern crate bitflags from a couple of crates.
1 parent 7418aa1 commit 1ab34f0

File tree

6 files changed

+4
-9
lines changed

6 files changed

+4
-9
lines changed

compiler/rustc_middle/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@
6565
#![allow(rustc::diagnostic_outside_of_impl)]
6666
#![allow(rustc::untranslatable_diagnostic)]
6767

68-
#[macro_use]
69-
extern crate bitflags;
7068
#[macro_use]
7169
extern crate tracing;
7270
#[macro_use]

compiler/rustc_middle/src/middle/codegen_fn_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub struct CodegenFnAttrs {
4949

5050
#[derive(Clone, Copy, PartialEq, Eq, TyEncodable, TyDecodable, HashStable)]
5151
pub struct CodegenFnAttrFlags(u32);
52-
bitflags! {
52+
bitflags::bitflags! {
5353
impl CodegenFnAttrFlags: u32 {
5454
/// `#[cold]`: a hint to LLVM that this function, when called, is never on
5555
/// the hot path.

compiler/rustc_middle/src/ty/adt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use super::{Destructor, FieldDef, GenericPredicates, Ty, TyCtxt, VariantDef, Var
2727

2828
#[derive(Clone, Copy, PartialEq, Eq, Hash, HashStable, TyEncodable, TyDecodable)]
2929
pub struct AdtFlags(u16);
30-
bitflags! {
30+
bitflags::bitflags! {
3131
impl AdtFlags: u16 {
3232
const NO_ADT_FLAGS = 0;
3333
/// Indicates whether the ADT is an enum.

compiler/rustc_middle/src/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ pub struct Destructor {
12241224

12251225
#[derive(Clone, Copy, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
12261226
pub struct VariantFlags(u8);
1227-
bitflags! {
1227+
bitflags::bitflags! {
12281228
impl VariantFlags: u8 {
12291229
const NO_VARIANT_FLAGS = 0;
12301230
/// Indicates whether the field list of this variant is `#[non_exhaustive]`.

compiler/rustc_type_ir/src/flags.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
bitflags! {
1+
bitflags::bitflags! {
22
/// Flags that we track on types. These flags are propagated upwards
33
/// through the type during type construction, so that we can quickly check
44
/// whether the type has various kinds of types in it without recursing

compiler/rustc_type_ir/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#[cfg(feature = "nightly")]
99
extern crate self as rustc_type_ir;
1010

11-
#[macro_use]
12-
extern crate bitflags;
13-
1411
#[cfg(feature = "nightly")]
1512
use rustc_data_structures::sync::Lrc;
1613
#[cfg(feature = "nightly")]

0 commit comments

Comments
 (0)