- 01 4月, 2020 6 次提交
-
-
由 Dylan DPC 提交于
remove unnecessary relocation check in const_prop Unnecessary as per https://github.com/rust-lang/rust/issues/70356#issuecomment-606615292 Fixes https://github.com/rust-lang/rust/issues/70356 r? @oli-obk Cc @wesleywiser
-
由 Dylan DPC 提交于
Clean up E0466 explanation r? @Dylan-DPC
-
由 Dylan DPC 提交于
Ensure there are versions of test code for aarch64 windows Remove the `cfg` flags that were preventing some tests from running on `aarch64-pc-windows-msvc`. All the existing `target_os = windows` targets had the same `align()` and `size()` values, so this change just removes the `target_arch` flags. r? @alexcrichton
-
由 Dylan DPC 提交于
Document ThreadSanitizer in unstable-book
-
由 Dylan DPC 提交于
improve folder name for persistent doc tests This fixes #69411, by using the entire path as folder name and storing already visited paths in a HashMap + appending a number to the file name for duplicates.
-
由 Dylan DPC 提交于
add fn make_contiguous to VecDeque Adds the following method to VecDeque: ```rust pub fn make_contiguous(&mut self) -> &mut [T]; ``` Taken from https://github.com/rust-lang/rust/pull/69400, after a suggestion by @CryZe https://github.com/rust-lang/rust/pull/69400#issuecomment-590216089 I am in favor of merging this instead of https://github.com/rust-lang/rust/pull/69400.
-
- 31 3月, 2020 26 次提交
-
-
由 Bastian Kauschke 提交于
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #69784 (Optimize strip_prefix and strip_suffix with str patterns) - #70548 (Add long error code for error E0226) - #70555 (resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery) - #70561 (remove obsolete comment) - #70562 (infer array len from pattern) - #70585 (std: Fix over-aligned allocations on wasm32-wasi) - #70587 (Add `Rust` to the code snippet) - #70588 (Fix incorrect documentation for `str::{split_at, split_at_mut}`) - #70613 (more clippy fixes) Failed merges: r? @ghost
-
由 Mazdak Farrokhzad 提交于
more clippy fixes * use is_empty() instead of len comparison (clippy::len_zero) * use if let instead of while let loop that never loops (clippy::never_loop) * remove redundant returns (clippy::needless_return) * remove redundant closures (clippy::redundant_closure) * use if let instead of match and wildcard pattern (clippy::single_match) * don't repeat field names redundantly (clippy::redundant_field_names) r? @Centril
-
由 Mazdak Farrokhzad 提交于
Fix incorrect documentation for `str::{split_at, split_at_mut}` The documentation for each method currently states: > Panics if `mid` is not on a UTF-8 code point boundary, or if it is beyond the last code point of the string slice. However, this is not consistent with the real behavior, or that of the corresponding methods for `[T]` slices. A comment inside each of the `str` methods states: > is_char_boundary checks that the index is in [0, .len()] That is what I would expect the behavior to be, and in fact this seems to be the real behavior. For example ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8e03dcc209d4dd176df2297523f9fee1)): ```rust fn main() { // Prints ("abc", "") and doesn't panic println!("{:?}", "abc".split_at(3)); } ``` In this case, I would interpret "the last code point of the string slice" to mean the byte at index 2 in UTF-8. However, it is possible to pass an index of 3, which is definitely "beyond the last code point of the string slice". I think that this is much clearer, but feel free to bikeshed.
-
由 Mazdak Farrokhzad 提交于
Add `Rust` to the code snippet Adds `Rust` to the snippet where the code causing the ICE should be placed, so github can render it as Rust code rather than plain code.
-
由 Mazdak Farrokhzad 提交于
std: Fix over-aligned allocations on wasm32-wasi The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
-
由 Mazdak Farrokhzad 提交于
infer array len from pattern closes #70529 This still errors in the following case ```rust #![feature(const_generics)] fn arr<const N: usize>() -> [u8; N] { todo!() } fn main() { match arr() { [5, ..] => (), //~^ ERROR cannot pattern-match on an array without a fixed length [_, _] => (), } } ``` Considering that this should be rare and is harder to implement I would merge this PR without *fixing* the above.
-
由 Mazdak Farrokhzad 提交于
remove obsolete comment Made obsolete by b5e35b12
-
由 Mazdak Farrokhzad 提交于
resolve, `try_resolve_as_non_binding`: use `delay_span_bug` due to parser recovery Fixes #70549 r? @petrochenkov
-
由 Mazdak Farrokhzad 提交于
Add long error code for error E0226 Added a long description message for error E0226, which previously did not exist. As requested in issue #61137 r? @GuillaumeGomez
-
由 Mazdak Farrokhzad 提交于
Optimize strip_prefix and strip_suffix with str patterns As mentioned in https://github.com/rust-lang/rust/issues/67302#issuecomment-585639226. I'm not sure whether adding these methods to `Pattern` is desirable—but they have default implementations so the change is backwards compatible. Plus it seems like they're slated for wholesale replacement soon anyway? #56345 ---- Constructing a Searcher in strip_prefix and strip_suffix is unnecessarily slow when the pattern is a fixed-length string. Add strip_prefix and strip_suffix methods to the Pattern trait, and add optimized implementations of these methods in the str implementation. The old implementation is retained as the default for these methods.
-
由 Bastian Kauschke 提交于
-
由 Ralf Jung 提交于
-
由 Matthias Krüger 提交于
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
-
由 Guillaume Gomez 提交于
-
由 Luro02 提交于
-
由 Jacob Greenfield 提交于
-
由 DutchGhost 提交于
-
由 Alex Crichton 提交于
The wasm32-wasi target delegates its malloc implementation to the functions in wasi-libc, but the invocation of `aligned_alloc` was incorrect by passing the number of bytes requested first rather than the alignment. This commit swaps the order of these two arguments to ensure that we allocate over-aligned memory correctly.
-
由 bors 提交于
submodules: update clippy from 70b93aab to e170c849 Changes: ```` rustup https://github.com/rust-lang/rust/pull/70536 Rustup to https://github.com/rust-lang/rust/pull/70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes #70554
-
由 Bastian Kauschke 提交于
-
由 Bastian Kauschke 提交于
-
由 Bastian Kauschke 提交于
Co-Authored-By: NMazdak Farrokhzad <twingoow@gmail.com>
-
由 Julien Philippon 提交于
-
由 Tomasz Miąsko 提交于
-
由 Bastian Kauschke 提交于
-
- 30 3月, 2020 8 次提交
-
-
由 Matthias Krüger 提交于
Changes: ```` rustup https://github.com/rust-lang/rust/pull/70536 Rustup to https://github.com/rust-lang/rust/pull/70449 readme: move "how to run single lint" instructions to "Allowing/denying lints" section. git attribute macros not allowed in submodules Deprecate REPLACE_CONSTS lint Bump itertools ```` Fixes #70554
-
由 Nikhil Benesch 提交于
Constructing a Searcher in strip_prefix and strip_suffix is unnecessarily slow when the pattern is a fixed-length string. Add strip_prefix and strip_suffix methods to the Pattern trait, and add optimized implementations of these methods in the str implementation. The old implementation is retained as the default for these methods.
-
由 bors 提交于
Rollup of 4 pull requests Successful merges: - #70479 (avoid creating unnecessary reference in Windows Env iterator) - #70546 (Polonius: update to 0.12.1, fix more move errors false positives, update test expectations) - #70559 (fix BTreeMap test compilation with Miri) - #70567 (Fix broken link in README) Failed merges: r? @ghost
-
由 Dylan DPC 提交于
Fix broken link in README Fix broken link to `rustc-dev-guide` section for `codegen`
-
由 Dylan DPC 提交于
fix BTreeMap test compilation with Miri This got broken by https://github.com/rust-lang/rust/pull/70506
-
由 Dylan DPC 提交于
Polonius: update to 0.12.1, fix more move errors false positives, update test expectations This PR: - updates `polonius-engine` to version 0.12.1 to fix some move errors false positives - fixes a fact generation mistake creating the other move errors false positives - updates the test expectations for the polonius compare-mode so that all (minus the 2 OOMs) ui tests pass again (matching the [analysis doc](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) starting at case 34) In my opinion, this is safe to rollup. r? @nikomatsakis
-
由 Dylan DPC 提交于
avoid creating unnecessary reference in Windows Env iterator Discovered in https://github.com/rust-lang/miri/pull/1225: the Windows `Env` iterator violates Stacked Borrows by creating an `&u16`, turning it into a raw pointer, and then accessing memory outside the range of that type. There is no need to create a reference here in the first place, so the fix is trivial. Cc @JOE1994 Cc https://github.com/rust-lang/unsafe-code-guidelines/issues/134
-
由 Youngsuk Kim 提交于
-