diff options
| author | bors <bors@rust-lang.org> | 2022-10-14 07:00:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-14 07:00:38 +0000 |
| commit | 36a70b7435c48837018c71576d7bb4e8f763f501 (patch) | |
| tree | 808b6795eb5f151c60774b2d78c97e05ed9d0d15 | |
| parent | a0ab61fb6c1b0fa2bdcd10cdba17b444941c073e (diff) | |
| parent | 4adf09bc8a9592af0d9778f2b8618760966e3ba4 (diff) | |
| download | rust-36a70b7435c48837018c71576d7bb4e8f763f501.tar.gz rust-36a70b7435c48837018c71576d7bb4e8f763f501.zip | |
Auto merge of #13401 - lnicola:opt-tests, r=lnicola
Run `analysis-stats` on CI, with `opt-level = 1` We might want to run `analysis-stats` on PRs, and this makes it less unbearable.
| -rw-r--r-- | .github/workflows/ci.yaml | 19 | ||||
| -rw-r--r-- | crates/syntax/src/ast/make.rs | 2 |
2 files changed, 19 insertions, 2 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1563ee0b143..7eda61848b7 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 c9a21e12c08..4057a75e7c1 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")) |
