diff options
| author | est31 <MTest31@outlook.com> | 2020-10-14 18:42:13 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2020-10-15 12:02:24 +0200 |
| commit | 2c1e8cfc622652ebfb1f0256aa8d2afae91bf416 (patch) | |
| tree | edaabba8cfa3d87a08214ab18517f1fb241bed06 | |
| parent | bf947fcba226a7ec0964bb6be17237e54e04ccdb (diff) | |
| download | rust-2c1e8cfc622652ebfb1f0256aa8d2afae91bf416.tar.gz rust-2c1e8cfc622652ebfb1f0256aa8d2afae91bf416.zip | |
Remove rustc_session::config::Config
The wrapper type led to tons of target.target across the compiler. Its ptr_width field isn't required any more, as target_pointer_width is already present in parsed form.
| -rw-r--r-- | clippy_lints/src/trivially_copy_pass_by_ref.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/trivially_copy_pass_by_ref.rs b/clippy_lints/src/trivially_copy_pass_by_ref.rs index 1f06d2dbe91..d92eb86fb2e 100644 --- a/clippy_lints/src/trivially_copy_pass_by_ref.rs +++ b/clippy_lints/src/trivially_copy_pass_by_ref.rs @@ -9,10 +9,10 @@ use rustc_hir::intravisit::FnKind; use rustc_hir::{Body, FnDecl, HirId, ItemKind, MutTy, Mutability, Node}; use rustc_lint::{LateContext, LateLintPass}; use rustc_middle::ty; -use rustc_session::config::Config as SessionConfig; use rustc_session::{declare_tool_lint, impl_lint_pass}; use rustc_span::Span; use rustc_target::abi::LayoutOf; +use rustc_target::spec::Target; use rustc_target::spec::abi::Abi; declare_clippy_lint! { @@ -60,9 +60,9 @@ pub struct TriviallyCopyPassByRef { } impl<'tcx> TriviallyCopyPassByRef { - pub fn new(limit: Option<u64>, target: &SessionConfig) -> Self { + pub fn new(limit: Option<u64>, target: &Target) -> Self { let limit = limit.unwrap_or_else(|| { - let bit_width = u64::from(target.ptr_width); + let bit_width = u64::from(target.pointer_width); // Cap the calculated bit width at 32-bits to reduce // portability problems between 32 and 64-bit targets let bit_width = cmp::min(bit_width, 32); |
