Merge pull request #12529 from hmac/ruby-extractor-bump-rust-version

Ruby: Bump rust toolchain to 1.68
This commit is contained in:
Arthur Baars
2023-03-22 15:12:08 +01:00
committed by GitHub
4 changed files with 66 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ This document contains information about common development tasks.
[Install Rust](https://www.rust-lang.org/tools/install), then run:
```bash
cargo build --release
(cd extractor && cargo build --release)
```
## Generating the database schema and QL library
@@ -16,7 +16,7 @@ The generated `ql/lib/ruby.dbscheme` and `ql/lib/codeql/ruby/ast/internal/TreeSi
```bash
# Run the generator
cargo run --release -p ruby-generator -- --dbscheme ql/lib/ruby.dbscheme --library ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
(cd extractor && cargo run --release --bin generator -- --dbscheme ../ql/lib/ruby.dbscheme --library ../ql/lib/codeql/ruby/ast/internal/TreeSitter.qll)
# Then auto-format the QL library
codeql query format -i ql/lib/codeql/ruby/ast/internal/TreeSitter.qll
```

View File

@@ -2,6 +2,6 @@
# extractor. It is set to the lowest version of Rust we want to support.
[toolchain]
channel = "1.54"
channel = "1.68"
profile = "minimal"
components = [ "rustfmt" ]

View File

@@ -320,6 +320,8 @@ fn scan_erb(
(result, line_breaks)
}
/// Advance `index` to the next non-whitespace character.
/// Newlines are **not** considered whitespace.
fn skip_space(content: &[u8], index: usize) -> usize {
let mut index = index;
while index < content.len() {