mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Add tests for issues which can be closed on the current master
This PR adds tests for #325, #1092, #1214, #1278, #1329 and #1427.
This commit is contained in:
parent
8ac3fc36cc
commit
72c04facd2
@ -131,3 +131,15 @@ impl Foo {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn issue1329() {
|
||||
aaaaaaaaaaaaaaaa.map(|x| {
|
||||
x += 1;
|
||||
x
|
||||
})
|
||||
.filter
|
||||
}
|
||||
|
||||
fn issue325() {
|
||||
let f = || unsafe { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx };
|
||||
}
|
||||
|
9
tests/source/issue-1278.rs
Normal file
9
tests/source/issue-1278.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-fn_args_layout = "block"
|
||||
|
||||
#![feature(pub_restricted)]
|
||||
|
||||
mod inner_mode {
|
||||
pub(super) fn func_name(abc: i32) -> i32 {
|
||||
abc
|
||||
}
|
||||
}
|
@ -83,6 +83,9 @@ fn main() {
|
||||
let json = json!({
|
||||
"foo": "bar",
|
||||
});
|
||||
|
||||
// #1092
|
||||
chain!(input, a:take!(max_size), || []);
|
||||
}
|
||||
|
||||
impl X {
|
||||
|
@ -150,3 +150,17 @@ impl Foo {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn issue1329() {
|
||||
aaaaaaaaaaaaaaaa
|
||||
.map(|x| {
|
||||
x += 1;
|
||||
x
|
||||
})
|
||||
.filter
|
||||
}
|
||||
|
||||
fn issue325() {
|
||||
let f =
|
||||
|| unsafe { xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx };
|
||||
}
|
||||
|
14
tests/target/configs-fn_call_style-block-tab_spaces-2.rs
Normal file
14
tests/target/configs-fn_call_style-block-tab_spaces-2.rs
Normal file
@ -0,0 +1,14 @@
|
||||
// rustfmt-fn_call_style: Block
|
||||
// rustfmt-max_width: 80
|
||||
// rustfmt-tab_spaces: 2
|
||||
|
||||
// #1427
|
||||
fn main() {
|
||||
exceptaions::config(move || {
|
||||
(
|
||||
NmiConfig {},
|
||||
HardFaultConfig {},
|
||||
SysTickConfig { gpio_sbsrr },
|
||||
)
|
||||
});
|
||||
}
|
8
tests/target/issue-1214.rs
Normal file
8
tests/target/issue-1214.rs
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
# Example
|
||||
|
||||
```
|
||||
// Here goes some example
|
||||
```
|
||||
*/
|
||||
struct Item;
|
9
tests/target/issue-1278.rs
Normal file
9
tests/target/issue-1278.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// rustfmt-fn_args_layout = "block"
|
||||
|
||||
#![feature(pub_restricted)]
|
||||
|
||||
mod inner_mode {
|
||||
pub(super) fn func_name(abc: i32) -> i32 {
|
||||
abc
|
||||
}
|
||||
}
|
@ -88,6 +88,9 @@ fn main() {
|
||||
let json = json!({
|
||||
"foo": "bar",
|
||||
});
|
||||
|
||||
// #1092
|
||||
chain!(input, a:take!(max_size), || []);
|
||||
}
|
||||
|
||||
impl X {
|
||||
|
Loading…
Reference in New Issue
Block a user