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:
@@ -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.
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user