mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
Fixes tests
This commit is contained in:
parent
23e17cd581
commit
c47914c6cf
@ -885,7 +885,7 @@ macro_rules! m {
|
||||
($t:ty) => ( fn bar() -> $ t {} )
|
||||
}
|
||||
|
||||
fn bar() -> & 'a Baz<u8> {}
|
||||
fn bar() -> &'a Baz<u8> {}
|
||||
|
||||
fn bar() -> extern "Rust"fn() -> Ret {}
|
||||
"#]],
|
||||
@ -1578,7 +1578,7 @@ macro_rules !register_methods {
|
||||
($$($val: expr), *) = > {
|
||||
struct Foo;
|
||||
impl Foo {
|
||||
$(fn $method()-> & 'static[u32] {
|
||||
$(fn $method()-> &'static[u32] {
|
||||
&[$$($$val), *]
|
||||
}
|
||||
)*
|
||||
@ -1591,10 +1591,10 @@ macro_rules !implement_methods {
|
||||
($($val: expr), *) = > {
|
||||
struct Foo;
|
||||
impl Foo {
|
||||
fn alpha()-> & 'static[u32] {
|
||||
fn alpha()-> &'static[u32] {
|
||||
&[$($val), *]
|
||||
}
|
||||
fn beta()-> & 'static[u32] {
|
||||
fn beta()-> &'static[u32] {
|
||||
&[$($val), *]
|
||||
}
|
||||
}
|
||||
@ -1602,10 +1602,10 @@ macro_rules !implement_methods {
|
||||
}
|
||||
struct Foo;
|
||||
impl Foo {
|
||||
fn alpha() -> & 'static[u32] {
|
||||
fn alpha() -> &'static[u32] {
|
||||
&[1, 2, 3]
|
||||
}
|
||||
fn beta() -> & 'static[u32] {
|
||||
fn beta() -> &'static[u32] {
|
||||
&[1, 2, 3]
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ macro_rules! int_base {
|
||||
}
|
||||
}
|
||||
#[stable(feature = "rust1", since = "1.0.0")] impl fmt::Binary for isize {
|
||||
fn fmt(&self , f: &mut fmt::Formatter< '_>) -> fmt::Result {
|
||||
fn fmt(&self , f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
Binary.fmt_int(*self as usize, f)
|
||||
}
|
||||
}
|
||||
@ -724,7 +724,7 @@ macro_rules! delegate_impl {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl <> Data for & 'amut G where G: Data {}
|
||||
impl <> Data for &'amut G where G: Data {}
|
||||
"##]],
|
||||
);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ m!(static bar: &'static str = "hello";);
|
||||
macro_rules! m {
|
||||
($($t:tt)*) => { $($t)*}
|
||||
}
|
||||
static bar: & 'static str = "hello";
|
||||
static bar: &'static str = "hello";
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ fn foo() { bar.; blub }
|
||||
fn foo() { bar.; blub }
|
||||
|
||||
fn foo() {
|
||||
bar. ;
|
||||
bar.;
|
||||
blub
|
||||
}"##]],
|
||||
);
|
||||
|
@ -468,7 +468,7 @@ fn foo() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo () {a . __ra_fixup}
|
||||
fn foo () {a .__ra_fixup}
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
@ -478,11 +478,11 @@ fn foo () {a . __ra_fixup}
|
||||
check(
|
||||
r#"
|
||||
fn foo() {
|
||||
a. ;
|
||||
a.;
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo () {a . __ra_fixup ;}
|
||||
fn foo () {a .__ra_fixup ;}
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
@ -492,12 +492,12 @@ fn foo () {a . __ra_fixup ;}
|
||||
check(
|
||||
r#"
|
||||
fn foo() {
|
||||
a. ;
|
||||
a.;
|
||||
bar();
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo () {a . __ra_fixup ; bar () ;}
|
||||
fn foo () {a .__ra_fixup ; bar () ;}
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
@ -525,7 +525,7 @@ fn foo() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo () {let x = a . __ra_fixup ;}
|
||||
fn foo () {let x = a .__ra_fixup ;}
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
@ -541,7 +541,7 @@ fn foo() {
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
fn foo () {a . b ; bar () ;}
|
||||
fn foo () {a .b ; bar () ;}
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ foo!();
|
||||
struct Foo(usize);
|
||||
|
||||
impl FooB for Foo {
|
||||
$0fn foo< 'lt>(& 'lt self){}
|
||||
$0fn foo<'lt>(&'lt self){}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ fn test_derive_error() {
|
||||
expect![[r##"
|
||||
SUBTREE $
|
||||
IDENT compile_error 4294967295
|
||||
PUNCH ! [alone] 4294967295
|
||||
PUNCH ! [joint] 4294967295
|
||||
SUBTREE () 4294967295
|
||||
LITERAL "#[derive(DeriveError)] struct S ;" 4294967295
|
||||
PUNCH ; [alone] 4294967295"##]],
|
||||
@ -109,7 +109,7 @@ fn test_fn_like_macro_clone_literals() {
|
||||
PUNCH , [alone] 4294967295
|
||||
LITERAL 2_u32 4294967295
|
||||
PUNCH , [alone] 4294967295
|
||||
PUNCH - [alone] 4294967295
|
||||
PUNCH - [joint] 4294967295
|
||||
LITERAL 4i64 4294967295
|
||||
PUNCH , [alone] 4294967295
|
||||
LITERAL 3.14f32 4294967295
|
||||
@ -130,7 +130,7 @@ fn test_attr_macro() {
|
||||
expect![[r##"
|
||||
SUBTREE $
|
||||
IDENT compile_error 4294967295
|
||||
PUNCH ! [alone] 4294967295
|
||||
PUNCH ! [joint] 4294967295
|
||||
SUBTREE () 4294967295
|
||||
LITERAL "#[attr_error(some arguments)] mod m {}" 4294967295
|
||||
PUNCH ; [alone] 4294967295"##]],
|
||||
|
Loading…
Reference in New Issue
Block a user