Skip to content
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

Rust 1.75.0 #1673

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
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Build
run: cargo build --verbose --release
- name: Run tests
Expand All @@ -41,7 +41,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ make
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: curl -sSL --output llvm16.0-linux-arm64.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-linux-arm64.tar.xz
- name: Extract LLVM
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
run: unzip c:\llvm.zip -d c:/
- name: Add LLVM to Path
run: echo "c:\llvm16.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
with:
components: clippy
- name: Build
Expand All @@ -97,7 +97,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: curl -sSL --output llvm16.0-mac-arm.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-arm.tar.xz
- name: Extract LLVM
Expand All @@ -124,7 +124,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: wget -q -O llvm16.0-mac-intel.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-intel.tar.xz
- name: Extract LLVM
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.74.0
toolchain: 1.75.0
components: |
llvm-tools
clippy
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ make
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: curl -sSL --output llvm16.0-linux-arm64.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-linux-arm64.tar.xz
- name: Extract LLVM
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
# Use C:\ as D:\ might run out of space
- name: "Use C: for rust temporary files"
run: echo "CARGO_TARGET_DIR=C:\target" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
with:
components: clippy
# We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
Expand All @@ -179,7 +179,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: curl -sSL --output llvm16.0-mac-arm.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-arm.tar.xz
- name: Extract LLVM
Expand All @@ -205,7 +205,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Get LLVM
run: wget -q -O llvm16.0-mac-intel.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-intel.tar.xz
- name: Extract LLVM
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '16'
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- name: Setup yarn
run: npm install -g yarn
- uses: actions/[email protected]
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '16'
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- uses: actions/[email protected]
with:
name: solang-linux-x86-64
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '16'
- uses: dtolnay/rust-toolchain@1.74.0
- uses: dtolnay/rust-toolchain@1.75.0
- uses: actions/[email protected]
with:
name: solang-linux-x86-64
Expand Down Expand Up @@ -537,7 +537,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.74.0
toolchain: 1.75.0
components: llvm-tools
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
build = "build.rs"
description = "Solang Solidity Compiler"
keywords = [ "solidity", "compiler", "solana", "polkadot", "substrate" ]
rust-version = "1.74.0"
rust-version = "1.75.0"
edition = "2021"
exclude = [ "/.*", "/docs", "/examples", "/solana-library", "/tests", "/integration", "/vscode", "/testdata" ]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . src
WORKDIR /src/stdlib/
RUN make

RUN rustup default 1.74.0
RUN rustup default 1.75.0

WORKDIR /src
RUN cargo build --release
Expand Down
2 changes: 1 addition & 1 deletion docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Option 5: Build Solang from source

In order to build Solang from source, you will need:

* Rust version 1.74.0 or higher
* Rust version 1.75.0 or higher
* A C++ compiler with support for C++17
* A build of LLVM based on the Solana LLVM tree. There are a few LLVM patches required that are not upstream yet.

Expand Down
12 changes: 6 additions & 6 deletions solang-parser/src/helpers/loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ impl<T: CodeLocation> OptionalCodeLocation for Vec<T> {
}
}

impl<'a, T: ?Sized + OptionalCodeLocation> OptionalCodeLocation for &'a T {
impl<T: ?Sized + OptionalCodeLocation> OptionalCodeLocation for &T {
fn loc_opt(&self) -> Option<Loc> {
(**self).loc_opt()
}
}

impl<'a, T: ?Sized + OptionalCodeLocation> OptionalCodeLocation for &'a mut T {
impl<T: ?Sized + OptionalCodeLocation> OptionalCodeLocation for &mut T {
fn loc_opt(&self) -> Option<Loc> {
(**self).loc_opt()
}
}

impl<'a, T: ?Sized + ToOwned + OptionalCodeLocation> OptionalCodeLocation for Cow<'a, T> {
impl<T: ?Sized + ToOwned + OptionalCodeLocation> OptionalCodeLocation for Cow<'_, T> {
fn loc_opt(&self) -> Option<Loc> {
(**self).loc_opt()
}
Expand Down Expand Up @@ -163,19 +163,19 @@ impl CodeLocation for Loc {
}
}

impl<'a, T: ?Sized + CodeLocation> CodeLocation for &'a T {
impl<T: ?Sized + CodeLocation> CodeLocation for &T {
fn loc(&self) -> Loc {
(**self).loc()
}
}

impl<'a, T: ?Sized + CodeLocation> CodeLocation for &'a mut T {
impl<T: ?Sized + CodeLocation> CodeLocation for &mut T {
fn loc(&self) -> Loc {
(**self).loc()
}
}

impl<'a, T: ?Sized + ToOwned + CodeLocation> CodeLocation for Cow<'a, T> {
impl<T: ?Sized + ToOwned + CodeLocation> CodeLocation for Cow<'_, T> {
fn loc(&self) -> Loc {
(**self).loc()
}
Expand Down
2 changes: 1 addition & 1 deletion solang-parser/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub enum Token<'input> {
Annotation(&'input str),
}

impl<'input> fmt::Display for Token<'input> {
impl fmt::Display for Token<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Token::Identifier(id) => write!(f, "{id}"),
Expand Down
Loading