Use visual indent style in where-clause.rs
This commit is contained in:
parent
758c54e9d5
commit
128925dcb4
2 changed files with 133 additions and 13 deletions
|
@ -1,5 +1,32 @@
|
||||||
|
// rustfmt-indent_style: Visual
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo, U: Bar {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) where T: FOo {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo, U: Bar {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape, shape: &Shape) where T: FOo {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo, U: Bar {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape) -> Option<String> where T: FOo {
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
pub trait Test {
|
pub trait Test {
|
||||||
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
|
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
|
||||||
|
|
||||||
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
|
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType where F: FnMut(Self::Item) -> bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,3 +41,18 @@ struct Exactly100CharsToSemicolon<A, B, C, D, E>
|
||||||
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> where A: LongTrait {
|
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F> where A: LongTrait {
|
||||||
x: i32
|
x: i32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub trait SomeTrait<T>
|
||||||
|
where
|
||||||
|
T: Something + Sync + Send + Display + Debug + Copy + Hash + Debug + Display + Write + Read + FromStr
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// #2020
|
||||||
|
impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
|
||||||
|
fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
|
||||||
|
where F: for<'b> FnMut(&mut ProbeContext<'b, 'gcx, 'tcx>, ty::PolyTraitRef<'tcx>, ty::AssociatedItem),
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,29 +1,107 @@
|
||||||
|
// rustfmt-indent_style: Visual
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
|
||||||
|
where T: FOo,
|
||||||
|
U: Bar
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode, rule: &Rule, args: &[Arg], shape: &Shape)
|
||||||
|
where T: FOo
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode,
|
||||||
|
rule: &Rule,
|
||||||
|
args: &[Arg],
|
||||||
|
shape: &Shape,
|
||||||
|
shape: &Shape)
|
||||||
|
where T: FOo,
|
||||||
|
U: Bar
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode,
|
||||||
|
rule: &Rule,
|
||||||
|
args: &[Arg],
|
||||||
|
shape: &Shape,
|
||||||
|
shape: &Shape)
|
||||||
|
where T: FOo
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode,
|
||||||
|
rule: &Rule,
|
||||||
|
args: &[Arg],
|
||||||
|
shape: &Shape)
|
||||||
|
-> Option<String>
|
||||||
|
where T: FOo,
|
||||||
|
U: Bar
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reflow_list_node_with_rule(node: &CompoundNode,
|
||||||
|
rule: &Rule,
|
||||||
|
args: &[Arg],
|
||||||
|
shape: &Shape)
|
||||||
|
-> Option<String>
|
||||||
|
where T: FOo
|
||||||
|
{
|
||||||
|
let mut effects = HashMap::new();
|
||||||
|
}
|
||||||
|
|
||||||
pub trait Test {
|
pub trait Test {
|
||||||
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
|
fn very_long_method_name<F>(self, f: F) -> MyVeryLongReturnType
|
||||||
where
|
where F: FnMut(Self::Item) -> bool;
|
||||||
F: FnMut(Self::Item) -> bool;
|
|
||||||
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
|
fn exactly_100_chars1<F>(self, f: F) -> MyVeryLongReturnType
|
||||||
where
|
where F: FnMut(Self::Item) -> bool;
|
||||||
F: FnMut(Self::Item) -> bool;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
|
fn very_long_function_name<F>(very_long_argument: F) -> MyVeryLongReturnType
|
||||||
where
|
where F: FnMut(Self::Item) -> bool
|
||||||
F: FnMut(Self::Item) -> bool,
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
|
struct VeryLongTupleStructName<A, B, C, D, E>(LongLongTypename, LongLongTypename, i32, i32)
|
||||||
where
|
where A: LongTrait;
|
||||||
A: LongTrait;
|
|
||||||
|
|
||||||
struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32)
|
struct Exactly100CharsToSemicolon<A, B, C, D, E>(LongLongTypename, i32, i32) where A: LongTrait1234;
|
||||||
where
|
|
||||||
A: LongTrait1234;
|
|
||||||
|
|
||||||
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
|
struct AlwaysOnNextLine<LongLongTypename, LongTypename, A, B, C, D, E, F>
|
||||||
where
|
where A: LongTrait
|
||||||
A: LongTrait,
|
|
||||||
{
|
{
|
||||||
x: i32,
|
x: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub trait SomeTrait<T>
|
||||||
|
where T: Something
|
||||||
|
+ Sync
|
||||||
|
+ Send
|
||||||
|
+ Display
|
||||||
|
+ Debug
|
||||||
|
+ Copy
|
||||||
|
+ Hash
|
||||||
|
+ Debug
|
||||||
|
+ Display
|
||||||
|
+ Write
|
||||||
|
+ Read
|
||||||
|
+ FromStr
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// #2020
|
||||||
|
impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
|
||||||
|
fn elaborate_bounds<F>(&mut self, bounds: &[ty::PolyTraitRef<'tcx>], mut mk_cand: F)
|
||||||
|
where F: for<'b> FnMut(&mut ProbeContext<'b, 'gcx, 'tcx>,
|
||||||
|
ty::PolyTraitRef<'tcx>,
|
||||||
|
ty::AssociatedItem)
|
||||||
|
{
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue