mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge #2193
2193: cargo xtask format with rust 1.39 r=matklad a=kjeremy Needed to pass tests on latest stable Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
commit
2a8d48d8a9
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ fn type_with_bounds_cond(p: &mut Parser, allow_bounds: bool) {
|
||||||
T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p),
|
T![fn] | T![unsafe] | T![extern] => fn_pointer_type(p),
|
||||||
T![for] => for_type(p),
|
T![for] => for_type(p),
|
||||||
T![impl] => impl_trait_type(p),
|
T![impl] => impl_trait_type(p),
|
||||||
T![dyn ] => dyn_trait_type(p),
|
T![dyn] => dyn_trait_type(p),
|
||||||
// Some path types are not allowed to have bounds (no plus)
|
// Some path types are not allowed to have bounds (no plus)
|
||||||
T![<] => path_type_(p, allow_bounds),
|
T![<] => path_type_(p, allow_bounds),
|
||||||
_ if paths::is_use_path_start(p) => path_or_macro_type_(p, allow_bounds),
|
_ if paths::is_use_path_start(p) => path_or_macro_type_(p, allow_bounds),
|
||||||
|
@ -234,9 +234,9 @@ fn impl_trait_type(p: &mut Parser) {
|
||||||
// test dyn_trait_type
|
// test dyn_trait_type
|
||||||
// type A = dyn Iterator<Item=Foo<'a>> + 'a;
|
// type A = dyn Iterator<Item=Foo<'a>> + 'a;
|
||||||
fn dyn_trait_type(p: &mut Parser) {
|
fn dyn_trait_type(p: &mut Parser) {
|
||||||
assert!(p.at(T![dyn ]));
|
assert!(p.at(T![dyn]));
|
||||||
let m = p.start();
|
let m = p.start();
|
||||||
p.bump(T![dyn ]);
|
p.bump(T![dyn]);
|
||||||
type_params::bounds_without_colon(p);
|
type_params::bounds_without_colon(p);
|
||||||
m.complete(p, DYN_TRAIT_TYPE);
|
m.complete(p, DYN_TRAIT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue