mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Fix tests
This commit is contained in:
parent
9bd11459ba
commit
0831f3123b
@ -48,6 +48,8 @@ struct#10 MyTraitMap2#32 {#13
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn token_mapping_floats() {
|
fn token_mapping_floats() {
|
||||||
|
// Regression test for https://github.com/rust-lang/rust-analyzer/issues/12216
|
||||||
|
// (and related issues)
|
||||||
check(
|
check(
|
||||||
r#"
|
r#"
|
||||||
// +tokenids
|
// +tokenids
|
||||||
@ -87,9 +89,9 @@ macro_rules! f {#0
|
|||||||
// }
|
// }
|
||||||
fn#19 main#20(#21)#21 {#22
|
fn#19 main#20(#21)#21 {#22
|
||||||
1#23;#24
|
1#23;#24
|
||||||
1#26.0;
|
1.0#25;#26
|
||||||
let x#31 =#22 1;
|
let#27 x#28 =#29 1#30;#31
|
||||||
}
|
}#22
|
||||||
|
|
||||||
|
|
||||||
"##]],
|
"##]],
|
||||||
|
@ -104,7 +104,7 @@ macro_rules! id {
|
|||||||
$($t)*
|
$($t)*
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
id! {
|
id /*+errors*/! {
|
||||||
#[proc_macros::identity]
|
#[proc_macros::identity]
|
||||||
impl Foo for WrapBj {
|
impl Foo for WrapBj {
|
||||||
async fn foo(&self) {
|
async fn foo(&self) {
|
||||||
@ -119,6 +119,7 @@ macro_rules! id {
|
|||||||
$($t)*
|
$($t)*
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
/* parse error: expected SEMICOLON */
|
||||||
#[proc_macros::identity] impl Foo for WrapBj {
|
#[proc_macros::identity] impl Foo for WrapBj {
|
||||||
async fn foo(&self ) {
|
async fn foo(&self ) {
|
||||||
self .0.id().await ;
|
self .0.id().await ;
|
||||||
|
@ -1062,7 +1062,7 @@ impl<'a> CompletionContext<'a> {
|
|||||||
let receiver_is_ambiguous_float_literal = match &receiver {
|
let receiver_is_ambiguous_float_literal = match &receiver {
|
||||||
Some(ast::Expr::Literal(l)) => matches! {
|
Some(ast::Expr::Literal(l)) => matches! {
|
||||||
l.kind(),
|
l.kind(),
|
||||||
ast::LiteralKind::FloatNumber { .. } if l.syntax().last_token().map_or(false, |it| it.kind() == T![.])
|
ast::LiteralKind::FloatNumber { .. } if l.syntax().last_token().map_or(false, |it| it.text().ends_with('.'))
|
||||||
},
|
},
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user