File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,29 @@ jobs:
4545 - name : Cache Dependencies
4646 uses : Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
4747
48- - name : Compile
48+ - name : Bump opt-level
49+ if : matrix.os == 'ubuntu-latest'
50+ run : sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml
51+
52+ - name : Compile (tests)
4953 run : cargo test --no-run --locked
5054
55+ # It's faster to `test` before `build` ¯\_(ツ)_/¯
56+ - name : Compile (rust-analyzer)
57+ if : matrix.os == 'ubuntu-latest'
58+ run : cargo build --quiet
59+
5160 - name : Test
5261 run : cargo test -- --nocapture --quiet
5362
63+ - name : Run analysis-stats on rust-analyzer
64+ if : matrix.os == 'ubuntu-latest'
65+ run : target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
66+
67+ - name : Run analysis-stats on rust std library
68+ if : matrix.os == 'ubuntu-latest'
69+ run : target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std
70+
5471 # Weird targets to catch non-portable code
5572 rust-cross :
5673 if : github.repository == 'rust-lang/rust-analyzer'
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ pub mod ext {
8989 }
9090
9191 pub fn ty_name ( name : ast:: Name ) -> ast:: Type {
92- ty_path ( ident_path ( & format ! ( "{ name}" ) ) )
92+ ty_path ( ident_path ( & name. to_string ( ) ) )
9393 }
9494 pub fn ty_bool ( ) -> ast:: Type {
9595 ty_path ( ident_path ( "bool" ) )
You can’t perform that action at this time.
0 commit comments