Skip to content

fix(fmt): 'layout' is not a keyword (backport to 1.2.2) #10669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ members = [
resolver = "2"

[workspace.package]
version = "1.2.1"
version = "1.2.2"
edition = "2021"
# Remember to update clippy.toml as well
rust-version = "1.83"
Expand Down Expand Up @@ -191,7 +191,7 @@ foundry-linking = { path = "crates/linking" }
foundry-block-explorers = { version = "0.13.3", default-features = false }
foundry-compilers = { version = "0.14.0", default-features = false }
foundry-fork-db = "0.12"
solang-parser = { version = "=0.3.8", package = "foundry-solang-parser" }
solang-parser = { version = "=0.3.9", package = "foundry-solang-parser" }
solar-parse = { version = "=0.1.2", default-features = false }
solar-sema = { version = "=0.1.2", default-features = false }

Expand Down
13 changes: 7 additions & 6 deletions crates/fmt/testdata/NonKeywords/fmt.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
struct S {
uint256 error;
// uint256 layout;
uint256 layout;
uint256 at;
}
// uint256 transient;

function f() {
uint256 error = 0;
// uint256 layout = 0;
uint256 layout = 0;
uint256 at = 0;
// uint256 transient = 0;

Expand All @@ -17,25 +17,26 @@ function f() {
// transient = 0;

S memory x = S({
// format
error: 0,
// layout: 0,
layout: 0,
at: 0
});
// transient: 0

x.error = 0;
// x.layout = 0;
x.layout = 0;
x.at = 0;
// x.transient = 0;

assembly {
let error := 0
// let layout := 0
let layout := 0
let at := 0
// let transient := 0

error := 0
// layout := 0
layout := 0
at := 0
// transient := 0
}
Expand Down
13 changes: 7 additions & 6 deletions crates/fmt/testdata/NonKeywords/original.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
struct S {
uint256 error;
// uint256 layout;
uint256 layout;
uint256 at;
// uint256 transient;
}

function f() {
uint256 error = 0;
// uint256 layout = 0;
uint256 layout = 0;
uint256 at = 0;
// uint256 transient = 0;

Expand All @@ -17,25 +17,26 @@ function f() {
// transient = 0;

S memory x = S({
// format
error: 0,
// layout: 0,
layout: 0,
at: 0
// transient: 0
});

x.error = 0;
// x.layout = 0;
x.layout = 0;
x.at = 0;
// x.transient = 0;

assembly {
let error := 0
// let layout := 0
let layout := 0
let at := 0
// let transient := 0

error := 0
// layout := 0
layout := 0
at := 0
// transient := 0
}
Expand Down
Loading