Remove extern crate bitflags from a couple of crates.

This commit is contained in:
Nicholas Nethercote 2024-04-29 16:11:04 +10:00
parent 7418aa1a07
commit 1ab34f063b
6 changed files with 4 additions and 9 deletions

View File

@ -65,8 +65,6 @@
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#[macro_use]
extern crate bitflags;
#[macro_use]
extern crate tracing;
#[macro_use]

View File

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

View File

@ -27,7 +27,7 @@ use super::{Destructor, FieldDef, GenericPredicates, Ty, TyCtxt, VariantDef, Var
#[derive(Clone, Copy, PartialEq, Eq, Hash, HashStable, TyEncodable, TyDecodable)]
pub struct AdtFlags(u16);
bitflags! {
bitflags::bitflags! {
impl AdtFlags: u16 {
const NO_ADT_FLAGS = 0;
/// Indicates whether the ADT is an enum.

View File

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

View File

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

View File

@ -8,9 +8,6 @@
#[cfg(feature = "nightly")]
extern crate self as rustc_type_ir;
#[macro_use]
extern crate bitflags;
#[cfg(feature = "nightly")]
use rustc_data_structures::sync::Lrc;
#[cfg(feature = "nightly")]