Reformat use declarations.

The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
This commit is contained in:
Nicholas Nethercote
2024-07-29 08:13:50 +10:00
parent 118f9350c5
commit 84ac80f192
1865 changed files with 8367 additions and 9199 deletions

View File

@@ -4,11 +4,9 @@ pub(crate) mod query_context;
#[cfg(test)]
mod tests;
use crate::{
layout::{self, dfa, Byte, Def, Dfa, Nfa, Ref, Tree, Uninhabited},
maybe_transmutable::query_context::QueryContext,
Answer, Condition, Map, Reason,
};
use crate::layout::{self, dfa, Byte, Def, Dfa, Nfa, Ref, Tree, Uninhabited};
use crate::maybe_transmutable::query_context::QueryContext;
use crate::{Answer, Condition, Map, Reason};
pub(crate) struct MaybeTransmutableQuery<L, C>
where
@@ -32,15 +30,12 @@ where
// FIXME: Nix this cfg, so we can write unit tests independently of rustc
#[cfg(feature = "rustc")]
mod rustc {
use rustc_middle::ty::layout::{LayoutCx, LayoutOf};
use rustc_middle::ty::{ParamEnv, Ty, TyCtxt};
use super::*;
use crate::layout::tree::rustc::Err;
use rustc_middle::ty::layout::LayoutCx;
use rustc_middle::ty::layout::LayoutOf;
use rustc_middle::ty::ParamEnv;
use rustc_middle::ty::Ty;
use rustc_middle::ty::TyCtxt;
impl<'tcx> MaybeTransmutableQuery<Ty<'tcx>, TyCtxt<'tcx>> {
/// This method begins by converting `src` and `dst` from `Ty`s to `Tree`s,
/// then computes an answer using those trees.

View File

@@ -34,9 +34,10 @@ pub(crate) mod test {
#[cfg(feature = "rustc")]
mod rustc {
use super::*;
use rustc_middle::ty::{Ty, TyCtxt};
use super::*;
impl<'tcx> super::QueryContext for TyCtxt<'tcx> {
type Def = layout::rustc::Def<'tcx>;
type Ref = layout::rustc::Ref<'tcx>;

View File

@@ -1,12 +1,12 @@
use itertools::Itertools;
use super::query_context::test::{Def, UltraMinimal};
use crate::maybe_transmutable::MaybeTransmutableQuery;
use crate::{layout, Reason};
use itertools::Itertools;
mod safety {
use crate::Answer;
use super::*;
use crate::Answer;
type Tree = layout::Tree<Def, !>;
@@ -63,9 +63,8 @@ mod safety {
}
mod bool {
use crate::Answer;
use super::*;
use crate::Answer;
#[test]
fn should_permit_identity_transmutation_tree() {