Unverified Commit 5b8fa520 authored by Mark Hammond's avatar Mark Hammond Committed by GitHub
Browse files

Bump the Rust version to 1.84.0, but MSR remains the same. (#2422)

In line with our Rust version policy, this matches a current mozilla-central.
parent fb539bb9
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -103,6 +103,7 @@ impl Default for RustGetters {
#[allow(clippy::wrong_self_convention)]
#[allow(clippy::wrong_self_convention)]
trait StoredForeignStringifier: Send + Sync + std::fmt::Debug {
trait StoredForeignStringifier: Send + Sync + std::fmt::Debug {
    fn from_simple_type(&self, value: i32) -> String;
    fn from_simple_type(&self, value: i32) -> String;
    #[allow(dead_code)]
    fn from_complex_type(&self, values: Option<Vec<Option<f64>>>) -> String;
    fn from_complex_type(&self, values: Option<Vec<Option<f64>>>) -> String;
}
}


+2 −0
Original line number Original line Diff line number Diff line
@@ -2,6 +2,8 @@
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#![allow(dead_code)]

use std::{collections::HashMap, sync::Arc};
use std::{collections::HashMap, sync::Arc};


pub fn r#if(_object: u8) {}
pub fn r#if(_object: u8) {}
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


/// This crate only exists for its tests.
//! This crate only exists for its tests.


#[cfg(test)]
#[cfg(test)]
mod test {
mod test {
+10 −6
Original line number Original line Diff line number Diff line
@@ -5,3 +5,7 @@ error[E0533]: expected value, found struct variant `Self::DivisionByZero`
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a value
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a value
   |
   |
   = note: this error originates in the attribute macro `::uniffi::udl_derive` (in Nightly builds, run with -Z macro-backtrace for more info)
   = note: this error originates in the attribute macro `::uniffi::udl_derive` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you might have meant to create a new value of the struct
   |
29 | #[::uniffi::udl_derive(Error)] { numerator: /* value */ }
   |                                ++++++++++++++++++++++++++
+48 −4
Original line number Original line Diff line number Diff line
@@ -4,7 +4,7 @@ error[E0277]: `Cell<u32>` cannot be shared between threads safely
  | struct r#Counter { }
  | struct r#Counter { }
  |        ^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
  |        ^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
  |
  |
  = help: within `Counter`, the trait `Sync` is not implemented for `Cell<u32>`, which is required by `Counter: Sync`
  = 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: 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`
note: required because it appears within the type `Counter`
 --> tests/ui/interface_not_sync_and_send.rs:9:12
 --> tests/ui/interface_not_sync_and_send.rs:9:12
@@ -24,7 +24,7 @@ error[E0277]: `Cell<u32>` cannot be shared between threads safely
  | struct r#Counter { }
  | struct r#Counter { }
  |        ^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
  |        ^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
  |
  |
  = help: within `Counter`, the trait `Sync` is not implemented for `Cell<u32>`, which is required by `Counter: Sync`
  = 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: 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`
note: required because it appears within the type `Counter`
 --> tests/ui/interface_not_sync_and_send.rs:9:12
 --> tests/ui/interface_not_sync_and_send.rs:9:12
@@ -43,7 +43,7 @@ error[E0277]: `Cell<u32>` cannot be shared between threads safely
27 | pub struct ProcMacroCounter {
27 | pub struct ProcMacroCounter {
   |            ^^^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
   |            ^^^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
   |
   |
   = help: within `ProcMacroCounter`, the trait `Sync` is not implemented for `Cell<u32>`, which is required by `ProcMacroCounter: Sync`
   = help: within `ProcMacroCounter`, 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: 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 `ProcMacroCounter`
note: required because it appears within the type `ProcMacroCounter`
  --> tests/ui/interface_not_sync_and_send.rs:27:12
  --> tests/ui/interface_not_sync_and_send.rs:27:12
@@ -63,7 +63,7 @@ error[E0277]: `Cell<u32>` cannot be shared between threads safely
27 | pub struct ProcMacroCounter {
27 | pub struct ProcMacroCounter {
   |            ^^^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
   |            ^^^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
   |
   |
   = help: within `ProcMacroCounter`, the trait `Sync` is not implemented for `Cell<u32>`, which is required by `ProcMacroCounter: Sync`
   = help: within `ProcMacroCounter`, 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: 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 `ProcMacroCounter`
note: required because it appears within the type `ProcMacroCounter`
  --> tests/ui/interface_not_sync_and_send.rs:27:12
  --> tests/ui/interface_not_sync_and_send.rs:27:12
@@ -75,3 +75,47 @@ note: required by a bound in `FfiConverterArc`
   |
   |
   | pub unsafe trait FfiConverterArc<UT>: Send + Sync {
   | pub unsafe trait FfiConverterArc<UT>: Send + Sync {
   |                                              ^^^^ required by this bound in `FfiConverterArc`
   |                                              ^^^^ required by this bound in `FfiConverterArc`

error[E0277]: `Cell<u32>` cannot be shared between threads safely
 --> $OUT_DIR[uniffi_uitests]/counter.uniffi.rs
  |
  | #[::uniffi::udl_derive(Object)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `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
  |
9 | pub struct Counter {
  |            ^^^^^^^
note: required by a bound in `uniffi::FfiConverterArc::FfiType`
 --> $WORKSPACE/uniffi_core/src/ffi_converter_traits.rs
  |
  | pub unsafe trait FfiConverterArc<UT>: Send + Sync {
  |                                              ^^^^ required by this bound in `FfiConverterArc::FfiType`
  |     type FfiType: FfiDefault;
  |          ------- required by a bound in this associated type
  = note: this error originates in the attribute macro `::uniffi::udl_derive` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `Cell<u32>` cannot be shared between threads safely
  --> tests/ui/interface_not_sync_and_send.rs:26:10
   |
26 | #[derive(uniffi::Object)]
   |          ^^^^^^^^^^^^^^ `Cell<u32>` cannot be shared between threads safely
   |
   = help: within `ProcMacroCounter`, 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 `ProcMacroCounter`
  --> tests/ui/interface_not_sync_and_send.rs:27:12
   |
27 | pub struct ProcMacroCounter {
   |            ^^^^^^^^^^^^^^^^
note: required by a bound in `uniffi::FfiConverterArc::FfiType`
  --> $WORKSPACE/uniffi_core/src/ffi_converter_traits.rs
   |
   | pub unsafe trait FfiConverterArc<UT>: Send + Sync {
   |                                              ^^^^ required by this bound in `FfiConverterArc::FfiType`
   |     type FfiType: FfiDefault;
   |          ------- required by a bound in this associated type
   = note: this error originates in the derive macro `uniffi::Object` (in Nightly builds, run with -Z macro-backtrace for more info)
Loading