diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1563ee0b1438..7eda61848b71 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,12 +45,29 @@ jobs: - name: Cache Dependencies uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 - - name: Compile + - name: Bump opt-level + if: matrix.os == 'ubuntu-latest' + run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml + + - name: Compile (tests) run: cargo test --no-run --locked + # It's faster to `test` before `build` ¯\_(ツ)_/¯ + - name: Compile (rust-analyzer) + if: matrix.os == 'ubuntu-latest' + run: cargo build --quiet + - name: Test run: cargo test -- --nocapture --quiet + - name: Run analysis-stats on rust-analyzer + if: matrix.os == 'ubuntu-latest' + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats . + + - name: Run analysis-stats on rust std library + if: matrix.os == 'ubuntu-latest' + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std + # Weird targets to catch non-portable code rust-cross: if: github.repository == 'rust-lang/rust-analyzer' diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index c9a21e12c085..4057a75e7c1e 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -89,7 +89,7 @@ pub mod ext { } pub fn ty_name(name: ast::Name) -> ast::Type { - ty_path(ident_path(&format!("{name}"))) + ty_path(ident_path(&name.to_string())) } pub fn ty_bool() -> ast::Type { ty_path(ident_path("bool"))