Skip to content

Commit 108f8c8

Browse files
committed
Remove unneeded bounds from CodegenMethods and BuilderMethods.
Some of these are pulled in indirectly, e.g. `MiscMethods` via `TypeMethods`.
1 parent 410a2de commit 108f8c8

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

compiler/rustc_codegen_ssa/src/traits/builder.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ use std::assert_matches::assert_matches;
22
use std::ops::Deref;
33

44
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
5-
use rustc_middle::ty::layout::{FnAbiOf, HasParamEnv, LayoutOf, TyAndLayout};
5+
use rustc_middle::ty::layout::{FnAbiOf, LayoutOf, TyAndLayout};
66
use rustc_middle::ty::{Instance, Ty};
77
use rustc_session::config::OptLevel;
88
use rustc_span::Span;
99
use rustc_target::abi::call::FnAbi;
1010
use rustc_target::abi::{Abi, Align, Scalar, Size, WrappingRange};
11-
use rustc_target::spec::HasTargetSpec;
1211

1312
use super::abi::AbiBuilderMethods;
1413
use super::asm::AsmBuilderMethods;
@@ -45,8 +44,6 @@ pub trait BuilderMethods<'a, 'tcx>:
4544
+ IntrinsicCallBuilderMethods<'tcx>
4645
+ AsmBuilderMethods<'tcx>
4746
+ StaticBuilderMethods
48-
+ HasParamEnv<'tcx>
49-
+ HasTargetSpec
5047
{
5148
type CodegenCx: CodegenMethods<'tcx>
5249
+ BackendTypes<

compiler/rustc_codegen_ssa/src/traits/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ mod write;
2727

2828
use std::fmt;
2929

30-
use rustc_middle::ty::layout::{HasParamEnv, HasTyCtxt};
31-
use rustc_target::spec::HasTargetSpec;
32-
3330
pub use self::abi::AbiBuilderMethods;
3431
pub use self::asm::{AsmBuilderMethods, AsmMethods, GlobalAsmOperandRef, InlineAsmOperandRef};
3532
pub use self::backend::{BackendTypes, CodegenBackend, ExtraBackendMethods};
@@ -50,12 +47,8 @@ pub use self::write::{ModuleBufferMethods, ThinBufferMethods, WriteBackendMethod
5047
pub trait CodegenObject = Copy + PartialEq + fmt::Debug;
5148

5249
pub trait CodegenMethods<'tcx> = TypeMethods<'tcx>
53-
+ MiscMethods<'tcx>
5450
+ ConstMethods<'tcx>
5551
+ StaticMethods
5652
+ DebugInfoMethods<'tcx>
5753
+ AsmMethods<'tcx>
58-
+ PreDefineMethods<'tcx>
59-
+ HasParamEnv<'tcx>
60-
+ HasTyCtxt<'tcx>
61-
+ HasTargetSpec;
54+
+ PreDefineMethods<'tcx>;

0 commit comments

Comments
 (0)