mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
Update tests
This commit is contained in:
@@ -209,3 +209,26 @@ fn foo() {
|
||||
convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
|
||||
convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });
|
||||
}
|
||||
|
||||
struct Foo {
|
||||
aaaaa: u32, // a
|
||||
|
||||
b: u32, // b
|
||||
cc: u32, // cc
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 1
|
||||
yy: u32, // comment2
|
||||
zzz: u32, // comment3
|
||||
|
||||
aaaaaa: u32, // comment4
|
||||
bb: u32, // comment5
|
||||
// separate
|
||||
dd: u32, // comment7
|
||||
c: u32, // comment6
|
||||
|
||||
aaaaaaa: u32, /* multi
|
||||
* line
|
||||
* comment
|
||||
*/
|
||||
b: u32, // hi
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ pub struct Writebatch<K: Key> {
|
||||
struct NewInt<T: Copy>(
|
||||
pub i32,
|
||||
SomeType, // inline comment
|
||||
T, // sup
|
||||
T, // sup
|
||||
);
|
||||
|
||||
struct Qux<
|
||||
@@ -219,7 +219,7 @@ struct Foo<T>(
|
||||
where
|
||||
T: PartialEq;
|
||||
struct Foo<T>(
|
||||
TTTTTTTTTTTTTTTTT, // Foo
|
||||
TTTTTTTTTTTTTTTTT, // Foo
|
||||
UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
|
||||
// Baz
|
||||
TTTTTTTTTTTTTTTTTTT,
|
||||
|
||||
@@ -88,7 +88,7 @@ pub enum GenericEnum<I, T>
|
||||
I: Iterator<Item = T>,
|
||||
{
|
||||
// Pre Comment
|
||||
Left { list: I, root: T }, // Post-comment
|
||||
Left { list: I, root: T }, // Post-comment
|
||||
Right { list: I, root: T }, // Post Comment
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ pub trait X {
|
||||
fn a(&self) -> &'static str;
|
||||
fn bcd(
|
||||
&self,
|
||||
c: &str, // comment on this arg
|
||||
d: u16, // comment on this arg
|
||||
c: &str, // comment on this arg
|
||||
d: u16, // comment on this arg
|
||||
e: &Vec<String>, // comment on this arg
|
||||
) -> Box<Q>;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
fn simple(
|
||||
// pre-comment on a function!?
|
||||
i: i32, // yes, it's possible!
|
||||
i: i32, // yes, it's possible!
|
||||
response: NoWay, // hose
|
||||
) {
|
||||
fn op(
|
||||
|
||||
@@ -29,7 +29,7 @@ fn main() {
|
||||
kaas!(
|
||||
// comments
|
||||
a, // post macro
|
||||
b // another
|
||||
b // another
|
||||
);
|
||||
|
||||
trailingcomma!(a, b, c,);
|
||||
|
||||
@@ -39,7 +39,7 @@ fn foo() -> Box<Write + 'static>
|
||||
}
|
||||
|
||||
fn baz<
|
||||
'a: 'b, // comment on 'a
|
||||
'a: 'b, // comment on 'a
|
||||
T: SomsssssssssssssssssssssssssssssssssssssssssssssssssssssseType, // comment on T
|
||||
>(
|
||||
a: A,
|
||||
@@ -71,7 +71,7 @@ impl Bar {
|
||||
fn foo(
|
||||
&mut self,
|
||||
a: sdfsdfcccccccccccccccccccccccccccccccccccccccccccccccccc, // comment on a
|
||||
b: sdfasdfsdfasfs, // closing comment
|
||||
b: sdfasdfsdfasfs, // closing comment
|
||||
) -> isize {
|
||||
}
|
||||
|
||||
|
||||
+25
-2
@@ -44,7 +44,7 @@ pub struct Writebatch<K: Key> {
|
||||
struct NewInt<T: Copy>(
|
||||
pub i32,
|
||||
SomeType, // inline comment
|
||||
T, // sup
|
||||
T, // sup
|
||||
);
|
||||
|
||||
struct Qux<
|
||||
@@ -187,7 +187,7 @@ struct Foo<T>(
|
||||
where
|
||||
T: PartialEq;
|
||||
struct Foo<T>(
|
||||
TTTTTTTTTTTTTTTTT, // Foo
|
||||
TTTTTTTTTTTTTTTTT, // Foo
|
||||
UUUUUUUUUUUUUUUUUUUUUUUU, // Bar
|
||||
// Baz
|
||||
TTTTTTTTTTTTTTTTTTT,
|
||||
@@ -246,3 +246,26 @@ fn foo() {
|
||||
convex_shape.set_point(2, &Vector2f { x: 450.0, y: 100.0 });
|
||||
convex_shape.set_point(3, &Vector2f { x: 580.0, y: 150.0 });
|
||||
}
|
||||
|
||||
struct Foo {
|
||||
aaaaa: u32, // a
|
||||
|
||||
b: u32, // b
|
||||
cc: u32, // cc
|
||||
|
||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: u32, // 1
|
||||
yy: u32, // comment2
|
||||
zzz: u32, // comment3
|
||||
|
||||
aaaaaa: u32, // comment4
|
||||
bb: u32, // comment5
|
||||
// separate
|
||||
dd: u32, // comment7
|
||||
c: u32, // comment6
|
||||
|
||||
aaaaaaa: u32, /* multi
|
||||
* line
|
||||
* comment
|
||||
* */
|
||||
b: u32, // hi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user