Update tests
This commit is contained in:
parent
a4e0fe2b02
commit
2376582dfb
8 changed files with 39 additions and 19 deletions
|
@ -125,3 +125,16 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||||
enum Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
enum Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
||||||
enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
||||||
enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { Foo }
|
enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { Foo }
|
||||||
|
|
||||||
|
// #1046
|
||||||
|
pub enum Entry<'a, K: 'a, V: 'a> {
|
||||||
|
// This attribute should stay on the same line.
|
||||||
|
Vacant(
|
||||||
|
#[ stable( feature = "rust1", since = "1.0.0" ) ] VacantEntry<'a, K, V>,
|
||||||
|
),
|
||||||
|
// This attribute should be kept on the previous line.
|
||||||
|
Occupied(
|
||||||
|
#[ stable( feature = "rust1", since = "1.0.0" ) ]
|
||||||
|
OccupiedEntry<'a, K, V>,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
|
@ -45,8 +45,7 @@ impl Bar {
|
||||||
|
|
||||||
// #984
|
// #984
|
||||||
struct Foo {
|
struct Foo {
|
||||||
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
|
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)] foo: usize,
|
||||||
foo: usize,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// #1668
|
// #1668
|
||||||
|
|
|
@ -40,8 +40,7 @@ pub struct Foo {
|
||||||
f : SomeType, // Comment beside a field
|
f : SomeType, // Comment beside a field
|
||||||
f: SomeType, // Comment beside a field
|
f: SomeType, // Comment beside a field
|
||||||
// Comment on a field
|
// Comment on a field
|
||||||
#[AnAttribute]
|
#[AnAttribute] g: SomeOtherType,
|
||||||
g: SomeOtherType,
|
|
||||||
/// A doc comment on a field
|
/// A doc comment on a field
|
||||||
h: AThirdType,
|
h: AThirdType,
|
||||||
pub i: TypeForPublicField,
|
pub i: TypeForPublicField,
|
||||||
|
|
|
@ -24,8 +24,7 @@ enum EmtpyWithComment {
|
||||||
// C-style enum
|
// C-style enum
|
||||||
enum Bar {
|
enum Bar {
|
||||||
A = 1,
|
A = 1,
|
||||||
#[someAttr(test)]
|
#[someAttr(test)] B = 2, // comment
|
||||||
B = 2, // comment
|
|
||||||
C,
|
C,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +42,7 @@ enum StructLikeVariants {
|
||||||
StructLike {
|
StructLike {
|
||||||
x: i32, // Test comment
|
x: i32, // Test comment
|
||||||
// Pre-comment
|
// Pre-comment
|
||||||
#[Attr50]
|
#[Attr50] y: SomeType, // Aanother Comment
|
||||||
y: SomeType, // Aanother Comment
|
|
||||||
},
|
},
|
||||||
SL { a: A },
|
SL { a: A },
|
||||||
}
|
}
|
||||||
|
@ -98,7 +96,7 @@ enum EmtpyWithComment {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TestFormatFails {
|
enum TestFormatFails {
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn nested_enum_test() {
|
fn nested_enum_test() {
|
||||||
|
@ -127,7 +125,7 @@ fn nested_enum_test() {
|
||||||
* AAAAAAAAAAAAAAAAAA */
|
* AAAAAAAAAAAAAAAAAA */
|
||||||
}
|
}
|
||||||
enum TestNestedFormatFail {
|
enum TestNestedFormatFail {
|
||||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,3 +167,15 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||||
{
|
{
|
||||||
Foo,
|
Foo,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #1046
|
||||||
|
pub enum Entry<'a, K: 'a, V: 'a> {
|
||||||
|
// This attribute should stay on the same line.
|
||||||
|
Vacant(
|
||||||
|
#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>,
|
||||||
|
),
|
||||||
|
// This attribute should be kept on the previous line.
|
||||||
|
Occupied(
|
||||||
|
#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
|
@ -141,7 +141,10 @@ fn issue1178() {
|
||||||
(#[$attr:meta] $name:ident) => {}
|
(#[$attr:meta] $name:ident) => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
foo!(#[doc = "bar"] baz);
|
foo!(
|
||||||
|
#[doc = "bar"]
|
||||||
|
baz
|
||||||
|
);
|
||||||
}
|
}
|
||||||
fn issue1739() {
|
fn issue1739() {
|
||||||
sql_function!(
|
sql_function!(
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
struct Foo {
|
struct Foo {
|
||||||
bar: u64,
|
bar: u64,
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)] qux: u64,
|
||||||
qux: u64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn do_something() -> Foo {
|
fn do_something() -> Foo {
|
||||||
|
@ -24,8 +23,7 @@ fn main() {
|
||||||
// #1462
|
// #1462
|
||||||
struct Foo {
|
struct Foo {
|
||||||
foo: usize,
|
foo: usize,
|
||||||
#[cfg(feature = "include-bar")]
|
#[cfg(feature = "include-bar")] bar: usize,
|
||||||
bar: usize,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_foo() -> Foo {
|
fn new_foo() -> Foo {
|
||||||
|
|
|
@ -8,8 +8,7 @@ pub struct Foo {
|
||||||
f : SomeType, // Comment beside a field
|
f : SomeType, // Comment beside a field
|
||||||
f: SomeType, // Comment beside a field
|
f: SomeType, // Comment beside a field
|
||||||
// Comment on a field
|
// Comment on a field
|
||||||
#[AnAttribute]
|
#[AnAttribute] g: SomeOtherType,
|
||||||
g: SomeOtherType,
|
|
||||||
/// A doc comment on a field
|
/// A doc comment on a field
|
||||||
h: AThirdType,
|
h: AThirdType,
|
||||||
pub i: TypeForPublicField,
|
pub i: TypeForPublicField,
|
||||||
|
|
|
@ -8,8 +8,7 @@ pub union Foo {
|
||||||
f : SomeType, // Comment beside a field
|
f : SomeType, // Comment beside a field
|
||||||
f: SomeType, // Comment beside a field
|
f: SomeType, // Comment beside a field
|
||||||
// Comment on a field
|
// Comment on a field
|
||||||
#[AnAttribute]
|
#[AnAttribute] g: SomeOtherType,
|
||||||
g: SomeOtherType,
|
|
||||||
/// A doc comment on a field
|
/// A doc comment on a field
|
||||||
h: AThirdType,
|
h: AThirdType,
|
||||||
pub i: TypeForPublicField,
|
pub i: TypeForPublicField,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue