523 Commits

Author SHA1 Message Date
Alistair Francis
18ab92ffe6 workflows/main.yml: Add an embedded riscv32imc test case
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-21 12:02:55 -07:00
Alistair Francis
351ee33633 lib: Implement AtomicUsize for platforms without atomics
Some platforms don't provide a AtomicUsize. Instead of just failing to
build with this error:

291 | use std::sync::atomic::{AtomicUsize, Ordering};
    |                         ^^^^^^^^^^^ no `AtomicUsize` in `sync::atomic`

let's instead add a fake AtomicUsize.

As the platform doesn't have atomics we can't implement an Atomic
version of AtomicUsize, so this version is not atomic. Any platform
without atomics is unlikely to have multiple cores, so this shouldn't be
a problem.

This is somewhat based on:
940d2e9d7f

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-14 08:42:09 -07:00
Alistair Francis
85b8a11565 build.rs: Update the list of non CAS targets
Based on the implementation in the headless
crate (https://github.com/japaric/heapless/blob/master/build.rs#L26) let's
not enable CAS for three more targets.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-11 15:47:28 -07:00
Steven Fackler
b77ccefd7e
Merge pull request #409 from Thomasdezeeuw/log-as_str
Add Level::as_str
2020-08-24 09:05:36 -04:00
Thomas de Zeeuw
186efede86 Add LevelFilter::as_str 2020-08-24 11:20:25 +02:00
Thomas de Zeeuw
85dad3f61e Add Level::as_str
Returns the string representation of the `Level`.
2020-08-23 19:02:17 +02:00
Ashley Mannix
469a441869
Require Source methods be implemented in test (#406)
require Source methods be implemented in test

This just makes sure we don't forget to forward Source methods
on types that wrap other sources
2020-08-04 11:35:58 +10:00
Ashley Mannix
803a23b15e
Rework structured value casting (#396)
Also adds a const-fn based mechanism for pulling concrete values out of generic ones
2020-08-03 18:05:15 +10:00
Ashley Mannix
ca54ac75ce
Merge pull request #405 from diondokter/master
Allow Level and LevelFilter to deserialize from the index_variant
2020-07-28 17:52:30 +10:00
Dion Dokter
caaa559a23 Back to u64 2020-07-28 08:17:18 +02:00
Dion Dokter
2d66fe4ce3 Made the variants deserialize as u32 because that's the type that is given when serializing.
Added tests
2020-07-27 09:41:04 +02:00
Dion Dokter
067efb50cd Added deserialization from index. 2020-07-27 09:16:45 +02:00
Ashley Mannix
aa4c0375cd
Merge pull request #404 from KodrAus/cargo/0.4.11
Prepare for 0.4.11 release
0.4.11
2020-07-16 10:04:01 +10:00
Ashley Mannix
21715ba7ee just don't do self updates in ci 2020-07-16 09:49:25 +10:00
Ashley Mannix
ee4bc80680 prepare for 0.4.11 release 2020-07-09 09:51:24 +10:00
Ashley Mannix
813b6ce479
Merge pull request #401 from brettcannon/patch-1
Fix a grammatical mistake in the README
2020-06-23 16:14:54 +10:00
Brett Cannon
5821b8a338
Fix a grammatical mistake 2020-06-13 11:22:55 -07:00
Ashley Mannix
9ae6778bd2
Merge pull request #400 from KodrAus/fix/value-fmt
Respect fmt trait and flags in Value
2020-06-05 21:21:45 +10:00
Ashley Mannix
c89a4a10b6 bump sval to 0.5.2 for fmt fixes
run fmt
2020-06-04 22:30:06 +10:00
Ashley Mannix
43d69c196e remove unneeded io::Error From impl 2020-06-04 21:13:38 +10:00
Ashley Mannix
ee8c6cd426 respect fmt trait and flags in Value 2020-06-04 21:12:31 +10:00
Ashley Mannix
c5c8e48f35
Merge pull request #398 from dtolnay/ra_hir_def
Resolve possible inference disruption by removing unneeded From impl
2020-06-04 14:05:51 +10:00
David Tolnay
f3cce30dff
Resolve possible inference disruption by removing unneeded From impl
This impl breaks some code in rust-analyzer's ra_hir_def crate.

1dba84019e/crates/ra_hir_def/src/path.rs (L273-L307)

    $ cargo check --manifest-path crates/ra_hir_def/Cargo.toml
        Checking ra_hir_def v0.1.0
        Finished dev [unoptimized] target(s) in 0.75s

    $ cargo check --manifest-path crates/ra_hir_def/Cargo.toml --features log/kv_unstable
        Checking ra_hir_def v0.1.0
    error[E0282]: type annotations needed for the closure `fn(&str) -> std::result::Result<(), _>`
       --> crates/ra_hir_def/src/path.rs:278:17
        |
    278 |                 f.write_str("::")?;
        |                 ^^^^^^^^^^^^^^^^^^ cannot infer type
        |
    help: give this closure an explicit return type without `_` placeholders
        |
    276 |         let mut add_segment = |s| -> std::result::Result<(), _> {
        |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020-06-03 19:00:52 -07:00
Steven Fackler
4fb398b68e
Merge pull request #393 from sivadeilra/doc_update
Add reference to win_dbg_logger
2020-04-21 13:08:29 -04:00
Arlie Davis
f7a14e41f2 Add reference to win_dbg_logger
win_dbg_logger is logger for use with Windows debuggers.

Windows allows applications to output a string directly to debuggers. This is
very useful in situations where other forms of logging are not available.
For example, stderr is not available for GUI apps.

This crate can be compiled and used on non-Windows platforms, but it does
nothing. This is intended to minimize the impact on code that takes a
dependency on this crate.
2020-04-21 09:38:17 -07:00
Steven Fackler
3c83704e7a
Merge pull request #392 from jyn514/master
Document use of mem::transmute
2020-04-18 09:40:55 -04:00
Joshua Nelson
51562abb06 Document why transmute is sound 2020-04-10 13:23:03 -04:00
Joshua Nelson
0b0a78ccf2 Reduce the scope of unsafe blocks 2020-04-10 13:15:17 -04:00
Steven Fackler
bbf4843fcf
Merge pull request #389 from Mark-Simulacrum/to-triagebot
Add triagebot configuration
2020-03-31 16:56:46 -04:00
Mark Rousskov
1e0fb89636 Add triagebot configuration
This enables assignment through triagebot on this repository, in preparation for
the migration from highfive to triagebot for PR assignment.
2020-03-31 16:39:34 -04:00
Steven Fackler
e8730e9493
Merge pull request #384 from nblumhardt/patch-1
Show master branch build status in README
2020-03-09 15:52:28 -04:00
Nicholas Blumhardt
2018d75955 Show master branch build status in README 2020-03-09 15:53:22 +10:00
Ashley Mannix
8d3d2eacb0
Merge pull request #380 from vallentin/master
Fixed misspelling
2020-02-17 07:39:18 +10:00
vallentin
cf1b35aef8 Fixed misspelling 2020-02-11 21:18:50 +01:00
Ashley Mannix
d54317e47a
Merge pull request #379 from KodrAus/feat/value-coercion
Support coercing structured Values into primitive types
2020-02-03 09:43:11 +10:00
Ashley Mannix
66af8f2d0c refactor coerce into cast
revert to to_ inherent methods
support downcasting erased values
2020-02-03 09:27:54 +10:00
Ashley Mannix
76cb179dec make the get test use borrowed data 2020-01-31 17:33:43 +10:00
Ashley Mannix
098e0b2cd6 refactor value module layout 2020-01-31 17:28:30 +10:00
Ashley Mannix
6743f4a0d2 make value internal visitor support borrowing 2020-01-31 16:51:44 +10:00
Ashley Mannix
ddb118e466 support coercing Values into primitive types 2020-01-31 12:53:40 +10:00
Alex Crichton
e876aecb00 Update CI installation of Rust on macos 2020-01-28 00:43:46 -08:00
Steven Fackler
a24d531ff2
Merge pull request #377 from helaan/fix/remove-atomic-usize-init
Remove ATOMIC_USIZE_INIT
2020-01-17 16:51:02 -05:00
Henk van der Laan
b2c1b31268 Remove ATOMIC_USIZE_INIT
MSRV is now high enough that AtomicUsize::new is available
2020-01-17 22:43:21 +01:00
Ashley Mannix
f06a18d010
Merge pull request #374 from KodrAus/fix/kv_macro
Revert the macro implementation
2019-12-19 10:46:21 +10:00
Ashley Mannix
c3a9a14c58 revert to old macro impl for now 2019-12-19 07:15:14 +10:00
Ashley Mannix
bb0224c120 add test for named format args 2019-12-19 07:11:56 +10:00
Ashley Mannix
1c73af5d30
Merge pull request #373 from AnderEnder/remove-deprecated-error-description
Remove deprecated Error::description
2019-12-19 07:04:31 +10:00
Andrii Radyk
0d71764051 remove deprecated Error::description 2019-12-17 09:26:46 +01:00
Ashley Mannix
4e196f927d
Merge pull request #371 from KodrAus/cargo/0.4.10
Prepare for 0.4.10 release
0.4.10
2019-12-16 15:31:55 +10:00
Ashley Mannix
fbd138acb5 prepare for 0.4.10 release 2019-12-16 12:00:14 +10:00