Skip to content

Commit

Permalink
Update Rust to 1.69, MSRV to 1.66.0
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Jun 6, 2023
1 parent 9d251a1 commit f0be561
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 38 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ commands:
# Our minimum supported rust version is specified here.
prepare-rust-min-version:
steps:
- run: rustup override set 1.65.0
- run: rustup override set 1.66.0
- run: rustup update
build-api-docs:
steps:
Expand All @@ -39,7 +39,7 @@ orbs:
jobs:
Check Rust formatting:
docker:
- image: cimg/rust:1.66
- image: cimg/rust:1.69
resource_class: small
steps:
- checkout
Expand All @@ -49,7 +49,7 @@ jobs:
- run: cargo fmt -- --check
Lint Rust with clippy:
docker:
- image: cimg/rust:1.66
- image: cimg/rust:1.69
resource_class: small
steps:
- checkout
Expand All @@ -59,7 +59,7 @@ jobs:
- run: cargo clippy --all --all-targets -- -D warnings
Lint Rust Docs:
docker:
- image: cimg/rust:1.66
- image: cimg/rust:1.69
resource_class: small
steps:
- checkout
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
- run: cargo test -- --skip trybuild_ui_tests
Deploy website:
docker:
- image: cimg/rust:1.66
- image: cimg/rust:1.69
resource_class: small
steps:
- checkout
Expand Down
4 changes: 3 additions & 1 deletion docker/Dockerfile-build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This builds a docker image containing all the tools we need to run our
# test suite in CI, including rust, kotlin, and swift.

FROM cimg/rust:1.66.0
FROM cimg/rust:1.69.0

MAINTAINER Ryan Kelly "[email protected]"

Expand All @@ -29,6 +29,8 @@ RUN sudo apt-get update -qq \
python3-pip \
&& sudo apt-get clean

# Use Cargo's sparse protocol
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
# This should automatically install the version specified in rust-toolchain.toml
ADD rust-toolchain.toml rust-toolchain.toml
RUN rustup self update \
Expand Down
1 change: 0 additions & 1 deletion fixtures/benchmarks/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl Args {
pub fn parse_for_run_benchmarks() -> Self {
Self::parse_from(
std::env::args()
.into_iter()
// This method finds the first "--" arg, which `benchmarks.rs` inserts to mark the start of
// our arguments.
.skip_while(|a| a != "--")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0533]: expected unit struct, unit variant or constant, found struct variant `Self::DivisionByZero`
error[E0533]: expected value, found struct variant `Self::DivisionByZero`
--> $OUT_DIR[uniffi_uitests]/errors.uniffi.rs
|
| / #[::uniffi::ffi_converter_error(
| | tag = crate::UniFfiTag,
| | flat_error,
| | with_try_read,
| | )]
| |__^
| |__^ not a value
|
= note: this error originates in the attribute macro `::uniffi::ffi_converter_error` (in Nightly builds, run with -Z macro-backtrace for more info)
6 changes: 3 additions & 3 deletions fixtures/uitests/tests/ui/interface_not_sync_and_send.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
error[E0277]: `Cell<u32>` cannot be shared between threads safely
--> $OUT_DIR[uniffi_uitests]/counter.uniffi.rs
|
| #[::uniffi::ffi_converter_interface(tag = crate::UniFfiTag)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
| struct r#Counter { }
| ^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
|
= help: within `Counter`, the trait `Sync` is not implemented for `Cell<u32>`
= note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` or `std::sync::atomic::AtomicU32` instead
note: required because it appears within the type `Counter`
--> tests/ui/interface_not_sync_and_send.rs:9:12
|
Expand All @@ -15,4 +16,3 @@ note: required by a bound in `Interface`
|
| pub trait Interface<UT>: Send + Sync + Sized {
| ^^^^ required by this bound in `Interface`
= note: this error originates in the attribute macro `::uniffi::ffi_converter_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
20 changes: 4 additions & 16 deletions fixtures/uitests/tests/ui/non_hashable_record_key.stderr
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
error[E0277]: the trait bound `f32: Hash` is not satisfied
--> $OUT_DIR[uniffi_uitests]/records.uniffi.rs
|
| / pub extern "C" fn r#uniffi_uitests_fn_func_get_dict(
| |
| | call_status: &mut uniffi::RustCallStatus
| | ) -> <std::collections::HashMap<f32, u64> as ::uniffi::FfiConverter<crate::UniFfiTag>>::ReturnType {
... |
| | )
| | }
| |_^ the trait `Hash` is not implemented for `f32`
| ) -> <std::collections::HashMap<f32, u64> as ::uniffi::FfiConverter<crate::UniFfiTag>>::ReturnType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Hash` is not implemented for `f32`
|
= help: the following other types implement trait `Hash`:
i128
Expand All @@ -25,14 +19,8 @@ error[E0277]: the trait bound `f32: Hash` is not satisfied
error[E0277]: the trait bound `f32: std::cmp::Eq` is not satisfied
--> $OUT_DIR[uniffi_uitests]/records.uniffi.rs
|
| / pub extern "C" fn r#uniffi_uitests_fn_func_get_dict(
| |
| | call_status: &mut uniffi::RustCallStatus
| | ) -> <std::collections::HashMap<f32, u64> as ::uniffi::FfiConverter<crate::UniFfiTag>>::ReturnType {
... |
| | )
| | }
| |_^ the trait `std::cmp::Eq` is not implemented for `f32`
| ) -> <std::collections::HashMap<f32, u64> as ::uniffi::FfiConverter<crate::UniFfiTag>>::ReturnType {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `f32`
|
= help: the following other types implement trait `std::cmp::Eq`:
i128
Expand Down
4 changes: 2 additions & 2 deletions fixtures/uitests/tests/ui/trait_methods_no_trait.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ error[E0277]: `TraitMethods` doesn't implement `std::fmt::Display`
note: required by a bound in `uniffi_trait_methods_fn_method_traitmethods_uniffi_trait_display::{closure#0}::_::{closure#0}::assert_impl_all`
--> $OUT_DIR[uniffi_uitests]/trait_methods.uniffi.rs
|
| uniffi::deps::static_assertions::assert_impl_all!(r#TraitMethods: std::fmt::Display); // This object has a trait method which...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `uniffi_trait_methods_fn_method_traitmethods_uniffi_trait_display::{closure#0}::_::{closure#0}::assert_impl_all`
| ... uniffi::deps::static_assertions::assert_impl_all!(r#TraitMethods: std::fmt::Display); // This object has a trait method which requi...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `assert_impl_all`
= note: this error originates in the macro `uniffi::deps::static_assertions::assert_impl_all` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `TraitMethods` doesn't implement `std::fmt::Display`
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# * ./.circleci/config.yml which also specifies the rust versions used in CI.

[toolchain]
channel = "1.66.0"
channel = "1.69.0"
targets = [
"aarch64-linux-android",
"armv7-linux-androideabi",
Expand Down
12 changes: 6 additions & 6 deletions uniffi/tests/ui/proc_macro_arc.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ error[E0277]: the trait bound `Foo: Interface<UniFfiTag>` is not satisfied
= note: required for `Arc<Foo>` to implement `FfiConverter<UniFfiTag>`
= note: this error originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: evaluation of constant value failed
note: erroneous constant used
--> tests/ui/proc_macro_arc.rs:10:1
|
10 | #[uniffi::export]
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
| ^^^^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this note originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `child::Foo: Interface<UniFfiTag>` is not satisfied
--> tests/ui/proc_macro_arc.rs:20:5
Expand All @@ -26,10 +26,10 @@ error[E0277]: the trait bound `child::Foo: Interface<UniFfiTag>` is not satisfie
= note: required for `Arc<child::Foo>` to implement `FfiConverter<UniFfiTag>`
= note: this error originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: evaluation of constant value failed
note: erroneous constant used
--> tests/ui/proc_macro_arc.rs:20:5
|
20 | #[uniffi::export]
| ^^^^^^^^^^^^^^^^^ referenced constant has errors
| ^^^^^^^^^^^^^^^^^
|
= note: this error originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)
= note: this note originates in the attribute macro `uniffi::export` (in Nightly builds, run with -Z macro-backtrace for more info)
1 change: 0 additions & 1 deletion uniffi_bindgen/src/interface/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ impl Object {
| UniffiTrait::Hash { hash: m } => vec![m],
UniffiTrait::Eq { eq, ne } => vec![eq, ne],
})
.into_iter()
.map(|m| &m.ffi_func),
)
}
Expand Down

0 comments on commit f0be561

Please sign in to comment.