Skip to content

Commit 88a5dea

Browse files
committed
Tidy too long lines
1 parent 29f4d0e commit 88a5dea

File tree

11 files changed

+56
-25
lines changed

11 files changed

+56
-25
lines changed

src/librustc_codegen_llvm/base.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,10 @@ pub fn memcpy_ty<'a, 'll: 'a, 'tcx: 'll, Builder : BuilderMethods<'a, 'll, 'tcx>
451451
bx.call_memcpy(dst, src, bx.cx().const_usize(size), align, flags);
452452
}
453453

454-
pub fn codegen_instance<'a, 'll: 'a, 'tcx: 'll>(cx: &'a CodegenCx<'ll, 'tcx, &'ll Value>, instance: Instance<'tcx>) {
454+
pub fn codegen_instance<'a, 'll: 'a, 'tcx: 'll>(
455+
cx: &'a CodegenCx<'ll, 'tcx, &'ll Value>,
456+
instance: Instance<'tcx>
457+
) {
455458
let _s = if cx.sess().codegen_stats() {
456459
let mut instance_name = String::new();
457460
DefPathBasedNames::new(cx.tcx, true, true)
@@ -476,7 +479,9 @@ pub fn codegen_instance<'a, 'll: 'a, 'tcx: 'll>(cx: &'a CodegenCx<'ll, 'tcx, &'l
476479
cx.stats.borrow_mut().n_closures += 1;
477480

478481
let mir = cx.tcx.instance_mir(instance.def);
479-
mir::codegen_mir::<'a, 'll, 'tcx, Builder<'a, 'll, 'tcx, &'ll Value>>(cx, lldecl, &mir, instance, sig);
482+
mir::codegen_mir::<'a, 'll, 'tcx, Builder<'a, 'll, 'tcx, &'ll Value>>(
483+
cx, lldecl, &mir, instance, sig
484+
);
480485
}
481486

482487
pub fn set_link_section(llval: &Value, attrs: &CodegenFnAttrs) {

src/librustc_codegen_llvm/debuginfo/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,9 @@ impl<'ll, 'tcx: 'll> DebugInfoMethods<'ll, 'tcx> for CodegenCx<'ll, 'tcx, &'ll V
474474
name_to_append_suffix_to.push_str(",");
475475
}
476476

477-
let actual_type = cx.tcx.normalize_erasing_regions(ParamEnv::reveal_all(), actual_type);
477+
let actual_type = cx.tcx.normalize_erasing_regions(
478+
ParamEnv::reveal_all(), actual_type
479+
);
478480
// Add actual type name to <...> clause of function name
479481
let actual_type_name = compute_debuginfo_type_name(cx,
480482
actual_type,
@@ -488,7 +490,9 @@ impl<'ll, 'tcx: 'll> DebugInfoMethods<'ll, 'tcx> for CodegenCx<'ll, 'tcx, &'ll V
488490
let names = get_parameter_names(cx, generics);
489491
substs.iter().zip(names).filter_map(|(kind, name)| {
490492
if let UnpackedKind::Type(ty) = kind.unpack() {
491-
let actual_type = cx.tcx.normalize_erasing_regions(ParamEnv::reveal_all(), ty);
493+
let actual_type = cx.tcx.normalize_erasing_regions(
494+
ParamEnv::reveal_all(), ty
495+
);
492496
let actual_type_metadata =
493497
type_metadata(cx, actual_type, syntax_pos::DUMMY_SP);
494498
let name = SmallCStr::new(&name.as_str());

src/librustc_codegen_llvm/interfaces/builder.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,18 @@ pub trait BuilderMethods<'a, 'll :'a, 'tcx: 'll> : HasCodegen<'a, 'll, 'tcx> +
201201
lhs: <Self::CodegenCx as Backend<'ll>>::Value,
202202
rhs: <Self::CodegenCx as Backend<'ll>>::Value
203203
) -> <Self::CodegenCx as Backend<'ll>>::Value;
204-
fn neg(&self, v: <Self::CodegenCx as Backend<'ll>>::Value) -> <Self::CodegenCx as Backend<'ll>>::Value;
205-
fn fneg(&self, v: <Self::CodegenCx as Backend<'ll>>::Value) -> <Self::CodegenCx as Backend<'ll>>::Value;
206-
fn not(&self, v: <Self::CodegenCx as Backend<'ll>>::Value) -> <Self::CodegenCx as Backend<'ll>>::Value;
204+
fn neg(
205+
&self,
206+
v: <Self::CodegenCx as Backend<'ll>>::Value
207+
) -> <Self::CodegenCx as Backend<'ll>>::Value;
208+
fn fneg(
209+
&self,
210+
v: <Self::CodegenCx as Backend<'ll>>::Value
211+
) -> <Self::CodegenCx as Backend<'ll>>::Value;
212+
fn not(
213+
&self,
214+
v: <Self::CodegenCx as Backend<'ll>>::Value
215+
) -> <Self::CodegenCx as Backend<'ll>>::Value;
207216

208217
fn alloca(
209218
&self,

src/librustc_codegen_llvm/intrinsic.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,10 @@ impl IntrinsicCallMethods<'a, 'll, 'tcx> for Builder<'a, 'll, 'tcx, &'ll Value>
676676

677677
let val = match intr.definition {
678678
intrinsics::IntrinsicDef::Named(name) => {
679-
let f = cx.declare_cfn( name,
680-
cx.type_func(&inputs, outputs));
679+
let f = cx.declare_cfn(
680+
name,
681+
cx.type_func(&inputs, outputs)
682+
);
681683
self.call(f, &llargs, None)
682684
}
683685
};

src/librustc_codegen_llvm/mir/analyze.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ pub fn non_ssa_locals<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'
5656
analyzer.non_ssa_locals
5757
}
5858

59-
struct LocalAnalyzer<'mir, 'a: 'mir, 'f: 'mir, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> {
59+
struct LocalAnalyzer<
60+
'mir, 'a: 'mir, 'f: 'mir, 'll: 'a + 'f, 'tcx: 'll,
61+
Cx: 'a + CodegenMethods<'ll, 'tcx>
62+
> {
6063
fx: &'mir FunctionCx<'a, 'f, 'll, 'tcx, Cx>,
6164
dominators: Dominators<mir::BasicBlock>,
6265
non_ssa_locals: BitSet<mir::Local>,
@@ -109,9 +112,9 @@ impl<Cx: 'a + CodegenMethods<'ll, 'tcx>> LocalAnalyzer<'mir, 'a, 'f, 'll, 'tcx,
109112
}
110113
}
111114

112-
impl<'mir, 'a: 'mir, 'f: 'mir, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> Visitor<'tcx>
113-
for LocalAnalyzer<'mir, 'a, 'f, 'll, 'tcx, Cx>
114-
where &'a Cx : LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
115+
impl<'mir, 'a: 'mir, 'f: 'mir, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>>
116+
Visitor<'tcx> for LocalAnalyzer<'mir, 'a, 'f, 'll, 'tcx, Cx> where
117+
&'a Cx : LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
115118
{
116119
fn visit_assign(&mut self,
117120
block: mir::BasicBlock,

src/librustc_codegen_llvm/mir/constant.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ pub fn codegen_static_initializer(
7777
Ok((const_alloc_to_llvm(cx, alloc), alloc))
7878
}
7979

80-
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: CodegenMethods<'ll, 'tcx>> FunctionCx<'a, 'f, 'll, 'tcx, Cx>
81-
where &'a Cx: LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
80+
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: CodegenMethods<'ll, 'tcx>>
81+
FunctionCx<'a, 'f, 'll, 'tcx, Cx> where
82+
&'a Cx: LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
8283
{
8384
fn fully_evaluate<Bx: BuilderMethods<'a, 'll, 'tcx, CodegenCx=Cx>>(
8485
&mut self,

src/librustc_codegen_llvm/mir/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ pub fn codegen_mir<'a, 'll: 'a, 'tcx: 'll, Bx: BuilderMethods<'a, 'll, 'tcx>>(
283283
if let Some(name) = decl.name {
284284
// User variable
285285
let debug_scope = fx.scopes[decl.visibility_scope];
286-
let dbg = debug_scope.is_valid() && bx.cx().sess().opts.debuginfo == DebugInfo::Full;
286+
let dbg =
287+
debug_scope.is_valid() && bx.cx().sess().opts.debuginfo == DebugInfo::Full;
287288

288289
if !memory_locals.contains(local) && !dbg {
289290
debug!("alloc: {:?} ({}) -> operand", local, name);

src/librustc_codegen_llvm/mir/operand.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,9 @@ impl<'a, 'll: 'a, 'tcx: 'll, V : 'll + CodegenObject> OperandValue<V> {
384384
}
385385
}
386386

387-
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: CodegenMethods<'ll, 'tcx>> FunctionCx<'a, 'f, 'll, 'tcx, Cx> {
387+
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: CodegenMethods<'ll, 'tcx>>
388+
FunctionCx<'a, 'f, 'll, 'tcx, Cx>
389+
{
388390
fn maybe_codegen_consume_direct<Bx: BuilderMethods<'a, 'll, 'tcx, CodegenCx=Cx>>(
389391
&mut self,
390392
bx: &Bx,

src/librustc_codegen_llvm/mir/place.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,9 @@ impl<'a, 'll: 'a, 'tcx: 'll, V : 'll + CodegenObject> PlaceRef<'tcx, V> {
395395
}
396396
}
397397

398-
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> FunctionCx<'a, 'f, 'll, 'tcx, Cx>
399-
where &'a Cx: LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
398+
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>>
399+
FunctionCx<'a, 'f, 'll, 'tcx, Cx> where
400+
&'a Cx: LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
400401
{
401402
pub fn codegen_place<Bx: BuilderMethods<'a, 'll, 'tcx, CodegenCx=Cx>>(
402403
&mut self,

src/librustc_codegen_llvm/mir/rvalue.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ use super::{FunctionCx, LocalRef};
2828
use super::operand::{OperandRef, OperandValue};
2929
use super::place::PlaceRef;
3030

31-
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> FunctionCx<'a, 'f, 'll, 'tcx, Cx>
32-
where &'a Cx: LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>> + HasTyCtxt<'tcx>
31+
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>>
32+
FunctionCx<'a, 'f, 'll, 'tcx, Cx> where
33+
&'a Cx: LayoutOf<Ty = Ty<'tcx>, TyLayout = TyLayout<'tcx>> + HasTyCtxt<'tcx>
3334
{
3435
pub fn codegen_rvalue<Bx: BuilderMethods<'a, 'll, 'tcx, CodegenCx=Cx>>(
3536
&mut self,
@@ -723,8 +724,9 @@ impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> Functi
723724
}
724725
}
725726

726-
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>> FunctionCx<'a, 'f, 'll, 'tcx, Cx>
727-
where &'a Cx : LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
727+
impl<'a, 'f, 'll: 'a + 'f, 'tcx: 'll, Cx: 'a + CodegenMethods<'ll, 'tcx>>
728+
FunctionCx<'a, 'f, 'll, 'tcx, Cx> where
729+
&'a Cx : LayoutOf<Ty=Ty<'tcx>, TyLayout=TyLayout<'tcx>> + HasTyCtxt<'tcx>
728730
{
729731
pub fn rvalue_creates_operand(&self, rvalue: &mir::Rvalue<'tcx>) -> bool {
730732
match *rvalue {

0 commit comments

Comments
 (0)