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

Adopt Rust 2021 #1636

Merged
merged 5 commits into from
Mar 25, 2022
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
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: windows-2019
strategy:
matrix:
rust: [1.46.0, stable, nightly]
rust: [1.56.0, stable, nightly]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -58,6 +58,20 @@ jobs:
- name: Run cargo check
run: cargo check -p windows-sys --all-features

cargo_windows:
name: Check windows
runs-on: windows-2019
strategy:
matrix:
rust: [1.59.0, stable, nightly]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update toolchain
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Run cargo check
run: cargo check -p windows

cargo_clippy:
name: Check clippy
runs-on: windows-2019
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/bindgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows-bindgen"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/bindgen/src/names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ where
};

let generics = def.generics.iter().map(|g| gen_element_name(g, gen));
quote! { #namespace#name#colon_separated<#(#generics),*> }
quote! { #namespace #name #colon_separated<#(#generics),*> }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/implement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows-implement"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "The implement macro for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "windows-interface"
version = "0.34.0"
edition = "2018"
edition = "2021"
authors = ["Microsoft"]
license = "MIT OR Apache-2.0"
description = "The interface macro for the windows crate"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows-metadata"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
3 changes: 2 additions & 1 deletion crates/libs/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
name = "windows-sys"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Rust for Windows"
repository = "https://github.com/microsoft/windows-rs"
readme = "../../../.github/readme.md"
rust-version = "1.56"

[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/tokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows-tokens"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
3 changes: 2 additions & 1 deletion crates/libs/windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
name = "windows"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Rust for Windows"
repository = "https://github.com/microsoft/windows-rs"
documentation = "https://microsoft.github.io/windows-docs-rs/"
readme = "../../../.github/readme.md"
rust-version = "1.59"

[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/com_uri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_com_uri"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/consent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_consent"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/core_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_core_app"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/create_window/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_create_window"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/create_window_sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_create_window_sys"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows-sys]
path = "../../libs/sys"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/data_protection/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_data_protection"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/direct2d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_direct2d"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/direct3d12/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_direct3d12"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies]
array-init = "2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/enum_windows/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_enum_windows"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/enum_windows_sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_enum_windows_sys"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows-sys]
path = "../../libs/sys"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/kernel_event/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_kernel_event"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/memory_buffer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_memory_buffer"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/message_box/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_message_box"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/ocr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_ocr"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies]
futures = "0.3.5"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/overlapped/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_overlapped"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/rss/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_rss"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/simple/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_simple"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/spellchecker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_spellchecker"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/uiautomation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_uiautomation"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/xaml_app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_xaml_app"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/samples/xml/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sample_xml"
version = "0.0.0"
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/targets/aarch64_msvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows_aarch64_msvc"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/targets/i686_gnu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows_i686_gnu"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/targets/i686_msvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows_i686_msvc"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/targets/x86_64_gnu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows_x86_64_gnu"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/targets/x86_64_msvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "windows_x86_64_msvc"
version = "0.34.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Code gen support for the windows crate"
repository = "https://github.com/microsoft/windows-rs"
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/agile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test_agile"
version = "0.0.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/agile_reference/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test_agile_reference"
version = "0.0.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/alternate_success_code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test_alternate_success_code"
version = "0.0.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/arch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test_arch"
version = "0.0.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
2 changes: 1 addition & 1 deletion crates/tests/arch_feature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test_arch_feature"
version = "0.0.0"
authors = ["Microsoft"]
edition = "2018"
edition = "2021"

[dependencies.windows]
path = "../../libs/windows"
Expand Down
Loading