Skip to content

Commit

Permalink
Updated nightly.
Browse files Browse the repository at this point in the history
commit-id:02d89150
  • Loading branch information
orizi committed Jan 23, 2025
1 parent a5b463c commit cce28bb
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 20 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-23
toolchain: nightly-2024-12-25
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- run: |
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: nightly-2024-11-23
toolchain: nightly-2024-12-25
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install nextest
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: nightly-2024-11-23
toolchain: nightly-2024-12-25
- uses: Swatinem/rust-cache@v2
- run: scripts/rust_fmt.sh --check

Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: nightly-2024-11-23
toolchain: nightly-2024-12-25
- uses: Swatinem/rust-cache@v2
- run: >
scripts/clippy.sh
Expand All @@ -156,7 +156,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-11-23
toolchain: nightly-2024-12-25
- uses: Swatinem/rust-cache@v2
- run: >
scripts/docs.sh
Expand Down
2 changes: 1 addition & 1 deletion corelib/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scarb nightly-2024-12-22
scarb nightly-2024-12-25
10 changes: 5 additions & 5 deletions crates/cairo-lang-sierra-gas/src/core_libfunc_cost_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ pub fn core_libfunc_cost(
Uint128(libfunc) => u128_libfunc_cost(libfunc),
Uint256(libfunc) => u256_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Uint512(libfunc) => u512_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint8(libfunc) => sint_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint16(libfunc) => sint_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint32(libfunc) => sint_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint64(libfunc) => sint_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint128(libfunc) => s128_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect(),
Sint8(libfunc) => sint_libfunc_cost(libfunc),
Sint16(libfunc) => sint_libfunc_cost(libfunc),
Sint32(libfunc) => sint_libfunc_cost(libfunc),
Sint64(libfunc) => sint_libfunc_cost(libfunc),
Sint128(libfunc) => s128_libfunc_cost(libfunc),
Felt252(libfunc) => {
felt252_libfunc_cost(libfunc).into_iter().map(BranchCost::from).collect()
}
Expand Down
2 changes: 1 addition & 1 deletion crates/cairo-lang-syntax-codegen/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn reformat_rust_code(text: String) -> String {
}
pub fn reformat_rust_code_inner(text: String) -> String {
let sh = Shell::new().unwrap();
let cmd = sh.cmd("rustfmt").env("RUSTUP_TOOLCHAIN", "nightly-2024-11-23");
let cmd = sh.cmd("rustfmt").env("RUSTUP_TOOLCHAIN", "nightly-2024-12-25");
let cmd_with_args = cmd.arg("--config-path").arg(project_root().join("rustfmt.toml"));
let mut stdout = cmd_with_args.stdin(text).read().unwrap();
if !stdout.ends_with('\n') {
Expand Down
6 changes: 4 additions & 2 deletions crates/cairo-lang-syntax/src/node/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,10 @@ impl SyntaxNode {
return token_node.span(db).end;
}
let children = &mut db.get_children(self.clone());
if let Some(child) =
children.iter().filter(|child| child.width(db) != TextWidth::default()).last()
if let Some(child) = children
.iter()
.filter(|child| child.width(db) != TextWidth::default())
.next_back()
{
child.span_end_without_trivia(db)
} else {
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The `rustfmt` configuration used by cairo requires a nightly version of Rust.
You can install the nightly version by running.

```sh
rustup install nightly-2024-11-23
rustup install nightly-2024-12-25
```

## Running Tests
Expand Down
4 changes: 2 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ wrap_comments = true
# "rust-analyzer.rustfmt.overrideCommand": [
# "rustup",
# "run",
# "nightly-2024-11-23",
# "nightly-2024-12-25",
# "--",
# "rustfmt",
# "--edition",
# "2021",
# "--"
# ]
# and run "rustup toolchain install nightly-2024-11-23".
# and run "rustup toolchain install nightly-2024-12-25".
2 changes: 1 addition & 1 deletion scripts/clippy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-11-23}"
export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-12-25}"

cargo clippy "$@" --all-targets --all-features -- -D warnings -D future-incompatible \
-D nonstandard-style -D rust-2018-idioms -D unused
2 changes: 1 addition & 1 deletion scripts/docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-11-23}"
export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-12-25}"

RUSTDOCFLAGS="-Dwarnings" cargo doc --document-private-items --no-deps --all-features
2 changes: 1 addition & 1 deletion scripts/rust_fmt.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-11-23}"
export RUSTUP_TOOLCHAIN="${RUSTUP_TOOLCHAIN:-nightly-2024-12-25}"

cargo fmt --all -- "$@"

0 comments on commit cce28bb

Please sign in to comment.