- 16 12月, 2019 3 次提交
-
-
由 Mazdak Farrokhzad 提交于
Add str::strip_prefix and str::strip_suffix Introduces a counterpart for `Path::strip_prefix` on `str`. This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.
-
由 Mazdak Farrokhzad 提交于
stabilize Result::map_or r? @SimonSapin Closes #66293
-
由 Mazdak Farrokhzad 提交于
Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}` * Original PR: #56696 * Tracking issue: #57977 Closes: #57977 Supporting comments: > Although these were added for testing, it is occasionally useful to have a way to probe optimistically for whether a weak pointer has become dangling, without actually taking the overhead of manipulating atomics. Are there any plans to stabilize this? _Originally posted by @bdonlan in https://github.com/rust-lang/rust/issues/57977#issuecomment-516970921_ > Having this stabilized would help. Currently, the only way to check if a weak pointer has become dangling is to call `upgrade`, which is by far expensive. _Originally posted by @glebpom in https://github.com/rust-lang/rust/issues/57977#issuecomment-526934709_ Not sure if stabilizing these warrants a full RFC, so throwing this out here as a start for now. Note: per CONTRIBUTING.md, I ran the tidy checks, but they seem to be failing on unchanged files (primarily in `src/stdsimd`).
-
- 15 12月, 2019 16 次提交
-
-
由 SOFe 提交于
-
由 bors 提交于
Rollup of 6 pull requests Successful merges: - #67255 (Remove i686-unknown-dragonfly target) - #67267 (Fix signature of `__wasilibc_find_relpath`) - #67282 (Fix example code of OpenOptions::open) - #67289 (Do not ICE on unnamed future) - #67300 (Restore original implementation of Vec::retain) - #67305 (Doc typo) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
Doc typo
-
由 Mazdak Farrokhzad 提交于
Restore original implementation of Vec::retain This PR reverts #48065, which aimed to optimize `Vec::retain` by making use of `Vec::drain_filter`. Unfortunately at that time, `drain_filter` was unsound. The soundness hole in `Vec::drain_filter` was fixed in #61224 by guaranteeing that cleanup logic runs via a nested `Drop`, even in the event of a panic. Implementing this nested drop affects codegen (apparently?) and results in slower code. Fixes #65970
-
由 Mazdak Farrokhzad 提交于
Do not ICE on unnamed future Fix #67252.
-
由 Mazdak Farrokhzad 提交于
Fix example code of OpenOptions::open The example didn't set the access mode flag, which resulted in an `Err(InvalidInput)`. r? @steveklabnik
-
由 Mazdak Farrokhzad 提交于
Fix signature of `__wasilibc_find_relpath` Looks like this function changed upstream, so it needs to be adjusted for when used by libstd.
-
由 Mazdak Farrokhzad 提交于
Remove i686-unknown-dragonfly target DragonFly BSD removed support for i386 a while ago. It only supports x86_64 right now.
-
由 David Tolnay 提交于
-
由 bors 提交于
Enable `loop` and `while` in constants behind a feature flag This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways. `while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user. r? @oli-obk cc @rust-lang/wg-const-eval
-
由 Alex Kapranoff 提交于
-
由 Esteban Küber 提交于
-
由 bors 提交于
Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
Actually to commit <69f99e74>.
-
由 Aaron Loucks 提交于
This PR reverts #48065, which aimed to optimize `Vec::retain` by making use of `Vec::drain_filter`. Unfortunately at that time, `drain_filter` was unsound. The soundness hole in `Vec::drain_filter` was fixed in #61224 by guaranteeing that cleanup logic runs via a nested `Drop`, even in the event of a panic. Implementing this nested drop affects codegen (apparently?) and results in slower code. Fixes #65970
-
- 14 12月, 2019 21 次提交
-
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
This reverts commit 15c30ddd.
-
由 Niko Matsakis 提交于
This reverts commit 8f6197f3.
-
由 Niko Matsakis 提交于
This reverts commit 089229a1.
-
由 bors 提交于
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
-
由 bors 提交于
SGX: Change ELF entrypoint This fixes [rust-sgx issue #148](https://github.com/fortanix/rust-sgx/issues/148). A new entry point is created for the ELF file generated by `rustc`, separate from the enclave entry point. When the ELF file is executed as a Linux binary, the error message below is written to stderr. > Error: This file is an SGX enclave which cannot be executed as a standard Linux binary. > See the installation guide at https://edp.fortanix.com/docs/installation/guide/ on how to use 'cargo run' or follow the steps at https://edp.fortanix.com/docs/tasks/deployment/ for manual deployment. When the ELF file is converted to an SGXS using `elf2sgxs`, the old entry point is still set as the enclave entry point. In a future pull request in the rust-sgx repository, `elf2sgxs` will be modified to remove the code in the ELF entry point, since this code is not needed in the enclave.
-
由 bors 提交于
Point at method call when type annotations are needed - Point at method call instead of whole expression when type annotations are needed. - Suggest use of turbofish on function and methods. Fix #49391, fix #46333, fix #48089. CC #58517, #63502, #63082. Fixes https://github.com/rust-lang/rust/issues/40015 r? @nikomatsakis
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #67026 (Improve diagnostics and code for exhaustiveness of empty matches) - #67235 (VecDeque: drop remaining items on destructor panic) - #67254 (dont ICE in case of invalid drop fn) - #67256 (Reduce allocs for validation errors) - #67274 (be explicit that mem::uninitialized is the same as MaybeUninit::uninit().assume_init()) - #67278 (`coerce_inner`: use initial `expected_ty`) - #67280 (docs: std::convert::From: Fix typo) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
docs: std::convert::From: Fix typo Fix a minor typo
-
由 Mazdak Farrokhzad 提交于
`coerce_inner`: use initial `expected_ty` Fixes #67273. Follow-up to #59439. r? @oli-obk
-
由 Mazdak Farrokhzad 提交于
be explicit that mem::uninitialized is the same as MaybeUninit::uninit().assume_init() Cc @Centril @nikomatsakis
-
由 Mazdak Farrokhzad 提交于
Reduce allocs for validation errors This probably doesn't really matter, but I just felt like I had to do this... r? @oli-obk
-
由 Mazdak Farrokhzad 提交于
dont ICE in case of invalid drop fn Fixes https://github.com/rust-lang/miri/issues/1112 r? @oli-obk
-
由 Mazdak Farrokhzad 提交于
VecDeque: drop remaining items on destructor panic Closes https://github.com/rust-lang/rust/issues/67232
-
由 Mazdak Farrokhzad 提交于
Improve diagnostics and code for exhaustiveness of empty matches There was a completely separate check and diagnostics for the case of an empty match. This led to slightly different error messages and duplicated code. This improves code reuse and generally clarifies what happens for empty matches. This also clarifies the action of the `exhaustive_patterns` feature, and ensures that this feature doesn't change diagnostics in places it doesn't need to.
-
由 Patrick Wang 提交于
-
由 Dylan MacKenzie 提交于
-
由 ecstatic-morse 提交于
Co-Authored-By: NMazdak Farrokhzad <twingoow@gmail.com>
-
由 Dylan MacKenzie 提交于
-