Update tests
This commit is contained in:
parent
a4e0fe2b02
commit
2376582dfb
@ -125,3 +125,16 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
enum Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
||||
enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong {}
|
||||
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
|
||||
struct Foo {
|
||||
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
|
||||
foo: usize,
|
||||
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize)] foo: usize,
|
||||
}
|
||||
|
||||
// #1668
|
||||
|
@ -40,8 +40,7 @@ pub struct Foo {
|
||||
f : SomeType, // Comment beside a field
|
||||
f: SomeType, // Comment beside a field
|
||||
// Comment on a field
|
||||
#[AnAttribute]
|
||||
g: SomeOtherType,
|
||||
#[AnAttribute] g: SomeOtherType,
|
||||
/// A doc comment on a field
|
||||
h: AThirdType,
|
||||
pub i: TypeForPublicField,
|
||||
|
@ -24,8 +24,7 @@ enum EmtpyWithComment {
|
||||
// C-style enum
|
||||
enum Bar {
|
||||
A = 1,
|
||||
#[someAttr(test)]
|
||||
B = 2, // comment
|
||||
#[someAttr(test)] B = 2, // comment
|
||||
C,
|
||||
}
|
||||
|
||||
@ -43,8 +42,7 @@ enum StructLikeVariants {
|
||||
StructLike {
|
||||
x: i32, // Test comment
|
||||
// Pre-comment
|
||||
#[Attr50]
|
||||
y: SomeType, // Aanother Comment
|
||||
#[Attr50] y: SomeType, // Aanother Comment
|
||||
},
|
||||
SL { a: A },
|
||||
}
|
||||
@ -98,7 +96,7 @@ enum EmtpyWithComment {
|
||||
}
|
||||
|
||||
enum TestFormatFails {
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
||||
}
|
||||
|
||||
fn nested_enum_test() {
|
||||
@ -127,7 +125,7 @@ fn nested_enum_test() {
|
||||
* AAAAAAAAAAAAAAAAAA */
|
||||
}
|
||||
enum TestNestedFormatFail {
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -169,3 +167,15 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||||
{
|
||||
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) => {}
|
||||
}
|
||||
|
||||
foo!(#[doc = "bar"] baz);
|
||||
foo!(
|
||||
#[doc = "bar"]
|
||||
baz
|
||||
);
|
||||
}
|
||||
fn issue1739() {
|
||||
sql_function!(
|
||||
|
@ -4,8 +4,7 @@
|
||||
struct Foo {
|
||||
bar: u64,
|
||||
|
||||
#[cfg(test)]
|
||||
qux: u64,
|
||||
#[cfg(test)] qux: u64,
|
||||
}
|
||||
|
||||
fn do_something() -> Foo {
|
||||
@ -24,8 +23,7 @@ fn main() {
|
||||
// #1462
|
||||
struct Foo {
|
||||
foo: usize,
|
||||
#[cfg(feature = "include-bar")]
|
||||
bar: usize,
|
||||
#[cfg(feature = "include-bar")] bar: usize,
|
||||
}
|
||||
|
||||
fn new_foo() -> Foo {
|
||||
|
@ -8,8 +8,7 @@ pub struct Foo {
|
||||
f : SomeType, // Comment beside a field
|
||||
f: SomeType, // Comment beside a field
|
||||
// Comment on a field
|
||||
#[AnAttribute]
|
||||
g: SomeOtherType,
|
||||
#[AnAttribute] g: SomeOtherType,
|
||||
/// A doc comment on a field
|
||||
h: AThirdType,
|
||||
pub i: TypeForPublicField,
|
||||
|
@ -8,8 +8,7 @@ pub union Foo {
|
||||
f : SomeType, // Comment beside a field
|
||||
f: SomeType, // Comment beside a field
|
||||
// Comment on a field
|
||||
#[AnAttribute]
|
||||
g: SomeOtherType,
|
||||
#[AnAttribute] g: SomeOtherType,
|
||||
/// A doc comment on a field
|
||||
h: AThirdType,
|
||||
pub i: TypeForPublicField,
|
||||
|
Loading…
x
Reference in New Issue
Block a user