Returning a primitive bool results in a somewhat confusing API - does
`true` indicate success - i.e. no timeout, or that a timeout has
occurred? An explicitly named enum makes it clearer.
[breaking-change]
* Add previously omitted function `Arc::try_unwrap(Self) -> Result<T, Self>`
* Move `arc.downgrade()` to `Arc::downgrade(&Self)` per conventions.
* Deprecate `Arc::weak_count` and `Arc::strong_count` for raciness. It is almost
impossible to correctly act on these results without a CAS loop on the actual
fields.
* Rename `Arc::make_unique` to `Arc::make_mut` to avoid uniqueness terminology
and to clarify relation to `Arc::get_mut`.
* Add `Rc::would_unwrap(&Self) -> bool` to introspect whether try_unwrap would succeed,
because it's destructive (unlike get_mut).
* Move `rc.downgrade()` to `Rc::downgrade(&Self)` per conventions.
* Deprecate `Rc::weak_count` and `Rc::strong_count` for questionable utility.
* Deprecate `Rc::is_unique` for questionable semantics (there are two kinds of
uniqueness with Weak pointers in play).
* Rename `rc.make_unique()` to `Rc::make_mut(&mut Self)` per conventions, to
avoid uniqueness terminology, and to clarify the relation to `Rc::get_mut`.
Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM
will lower the operation to a call to the nonexistent function `fmodf`. Work
around in this in the backend by lowering to a call to `fmod` instead with
necessary extension/truncation between floats/doubles.
Closes#27859
In order to test the validity of identifiers, exposing the name resolution module is necessary. Other changes mostly comprise of exposing modules publicly like parts of save-analysis, so they can be called appropriately.
This commit renames the `CString::{into_ptr, from_ptr}` methods to `into_raw`
and `from_raw` to mirror the corresponding methods on `Box` and the naming of
"raw" for `from_raw_parts` on slices and vectors.
cc #27769
This commit renames the `CString::{into_ptr, from_ptr}` methods to `into_raw`
and `from_raw` to mirror the corresponding methods on `Box` and the naming of
"raw" for `from_raw_parts` on slices and vectors.
cc #27769
This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:
1. Makes the test runner no longer print out the extraneous panic message at the
end of a failing test run that some tests failed. (this is already summarized
in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
backtrace from the output (only failing tests will have their backtraces in
the output.
also, use the right caching logic for type_moves_by_default (this was
broken by @jroesch).
```
before:
593.10user 5.21system 7:51.41elapsed 126%CPU (0avgtext+0avgdata 1150016maxresident)k
after:
567.03user 4.00system 7:28.23elapsed 127%CPU (0avgtext+0avgdata 1133112maxresident)k
```
A nice 4.5% improvement. For reference, on the last run LLVM takes 429.267s, which is 75% - hopefully this can be reduced.
I think the regression since #27751 is because of the wf patch - need to investigate it through.
r? @nikomatsakis
Currently `f32 % f32` will generate a link error on 32-bit MSVC because LLVM
will lower the operation to a call to the nonexistent function `fmodf`. Work
around in this in the backend by lowering to a call to `fmod` instead with
necessary extension/truncation between floats/doubles.
Closes#27859