Skip to content

Commit e62186b

Browse files
committed
clippyies
1 parent 14bb044 commit e62186b

File tree

6 files changed

+14
-18
lines changed

6 files changed

+14
-18
lines changed

crates/bevy_api_gen/src/callback.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use log::{info, trace};
2-
use rustc_errors::FatalError;
32
use rustc_hir::def_id::LOCAL_CRATE;
43
use tera::Context;
54

@@ -16,10 +15,10 @@ impl BevyAnalyzerCallbacks {
1615
}
1716

1817
impl rustc_driver::Callbacks for BevyAnalyzerCallbacks {
19-
fn after_expansion<'tcx>(
18+
fn after_expansion(
2019
&mut self,
2120
compiler: &rustc_interface::interface::Compiler,
22-
tcx: rustc_middle::ty::TyCtxt<'tcx>,
21+
tcx: rustc_middle::ty::TyCtxt<'_>,
2322
) -> rustc_driver::Compilation {
2423
trace!("After expansion callback");
2524

crates/bevy_api_gen/src/context.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ impl CachedTraits {
133133
self.bevy_reflect_reflect.is_some() && self.bevy_reflect_get_type_registration.is_some()
134134
}
135135

136-
pub(crate) fn has_all_std_source_traits(&self) -> bool {
137-
STD_SOURCE_TRAITS
138-
.iter()
139-
.all(|t| self.std_source_traits.contains_key(*t))
140-
}
136+
// pub(crate) fn has_all_std_source_traits(&self) -> bool {
137+
// STD_SOURCE_TRAITS
138+
// .iter()
139+
// .all(|t| self.std_source_traits.contains_key(*t))
140+
// }
141141

142142
// pub(crate) fn missing_std_source_traits(&self) -> Vec<String> {
143143
// STD_SOURCE_TRAITS

crates/bevy_api_gen/src/passes/find_methods_and_fields.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ use rustc_hir::{
66
Safety,
77
};
88
use rustc_infer::infer::TyCtxtInferExt;
9-
use rustc_middle::ty::{
10-
AdtKind, AssocKind, FieldDef, FnSig, ParamEnv, Ty, TyCtxt, TyKind, TypingEnv, TypingMode,
11-
};
9+
use rustc_middle::ty::{AdtKind, AssocKind, FieldDef, FnSig, Ty, TyCtxt, TyKind, TypingEnv};
1210
use rustc_span::Symbol;
1311
use rustc_trait_selection::infer::InferCtxtExt;
1412

crates/bevy_api_gen/src/passes/find_trait_impls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_infer::{
88
};
99
use rustc_middle::ty::{Ty, TypingEnv, TypingMode};
1010
use rustc_span::DUMMY_SP;
11-
use rustc_trait_selection::{regions::InferCtxtRegionExt, traits::ObligationCtxt};
11+
use rustc_trait_selection::traits::ObligationCtxt;
1212

1313
use crate::{Args, BevyCtxt};
1414

crates/bevy_api_gen/src/passes/populate_template_data.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
use std::{any::Any, borrow::Cow, convert::identity};
1+
use std::{borrow::Cow, convert::identity};
22

33
use log::{trace, warn};
44
use rustc_ast::Attribute;
55
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
66
use rustc_middle::ty::{
7-
print::Print, AdtDef, FieldDef, GenericArg, GenericParamDefKind, ParamTy, TraitRef, Ty, TyKind,
8-
TypeFoldable, TypingEnv,
7+
AdtDef, FieldDef, GenericArg, GenericParamDefKind, TraitRef, Ty, TyKind, TypingEnv,
98
};
109
use rustc_span::Symbol;
1110

1211
use crate::{
13-
Arg, Args, BevyCtxt, Field, Function, FunctionContext, ImportPathFinder, Item, Output,
14-
ReflectType, TemplateContext, Variant,
12+
Arg, Args, BevyCtxt, Field, Function, FunctionContext, Item, Output, ReflectType,
13+
TemplateContext, Variant,
1514
};
1615
/// Converts the BevyCtxt into simpler data that can be used in templates directly,
1716
/// Clears the BevyCtxt by clearing data structures after it uses them.

crates/bevy_api_gen/src/plugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl RustcPlugin for BevyAnalyzer {
5454
let mut callbacks = BevyAnalyzerCallbacks::new(plugin_args);
5555
let mut compiler = rustc_driver::RunCompiler::new(&compiler_args, &mut callbacks);
5656
compiler.set_file_loader(Some(Box::new(ModifyingFileLoader)));
57-
let out = compiler.run();
57+
compiler.run();
5858
log::trace!("Finished compiling with plugin");
5959
Ok(())
6060
}

0 commit comments

Comments
 (0)