- 13 7月, 2018 11 次提交
-
-
由 csmoe 提交于
-
由 csmoe 提交于
-
由 ashtneoi 提交于
-
由 ashtneoi 提交于
-
由 ashtneoi 提交于
-
由 ashtneoi 提交于
-
由 ashtneoi 提交于
Specifically, `&self` -> `&mut self` and explicit `ref` -> `ref mut`. Implicit `ref` isn't handled yet and causes an ICE.
-
由 ashtneoi 提交于
-
由 bors 提交于
Ensure StorageDead is created even if variable initialization fails Rebase and slight cleanup of https://github.com/rust-lang/rust/pull/51109 Fixes https://github.com/rust-lang/rust/issues/49232 r? @EddyB
-
由 bors 提交于
Add ExactChunks::remainder and ExactChunks::into_remainder These allow to get the leftover items of the slice that are not being iterated as part of the iterator due to not filling a complete chunk. The mutable version consumes the slice because otherwise we would either a) have to borrow the iterator instead of taking the lifetime of the underlying slice, which is not what *any* of the other iterator functions is doing, or b) would allow returning multiple mutable references to the same data The current behaviour of consuming the iterator is consistent with IterMut::into_slice for the normal iterator. ---- This is related to https://github.com/rust-lang/rust/issues/47115#issuecomment-392685177 and the following comments. While there the discussion was first about a way to get the "tail" of the iterator (everything from the slice that is still not iterated yet), this gives kind of unintuitive behaviour and is inconsistent with how the other slice iterators work. Unintuitive because the `next_back` would have no effect on the tail (or otherwise the tail could not include the remainder items), inconsistent because a) generally the idea of the slice iterators seems to be to only ever return items that were not iterated yet (and don't provide a way to access the same item twice) and b) we would return a "flat" `&[T]` slice but the iterator's shape is `&[[T]]` instead, c) the mutable variant would have to borrow from the iterator instead of the underlying slice (all other iterator functions borrow from the underlying slice!) As such, I've only implemented functions to get the remainder. This also allows the implementation to be completely safe still (and around slices instead of raw pointers), while getting the tail would either be inefficient or would have to be implemented around raw pointers. CC @kerollmops
-
由 Taylor Cramer 提交于
-
- 12 7月, 2018 29 次提交
-
-
由 bors 提交于
make pretty source comparison check be fatal (fixes #52255) This is not ready for merging because it reveals (at least) two regressions in the pretty suite. Should I attempt to fix those in this PR also?
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #51816 (bootstrap: write texts to a .tmp file first for atomicity) - #51912 (impl Clone for Box<CStr>, Box<OsStr>, Box<Path>) - #52164 (use proper footnote syntax for references) - #52220 (Deny bare trait objects in `src/bootstrap`) - #52276 (rustc: Verify #[proc_macro] is only a word) - #52277 (Uncapitalize "If") - #52287 (Deny bare trait objects in src/librustc_resolve) - #52295 (Deny bare trait objects in src/libsyntax_ext) - #52298 (make reference to dirs crate clickable in terminals) Failed merges: r? @ghost
-
由 kennytm 提交于
make reference to dirs crate clickable in terminals Currently I have to copy-paste the link; with this change I can just click it right in my terminal window.
-
由 kennytm 提交于
Deny bare trait objects in src/libsyntax_ext Enforce `#![deny(bare_trait_objects)]` in `src/libsyntax_ext`.
-
由 kennytm 提交于
Deny bare trait objects in src/librustc_resolve Enforce `#![deny(bare_trait_objects)]` in `src/librustc_resolve`.
-
由 kennytm 提交于
Uncapitalize "If"
-
由 kennytm 提交于
rustc: Verify #[proc_macro] is only a word ... and perform the same verification for #[proc_macro_attribute], currently neither of these attributes take any arguments. Closes #52273
-
由 kennytm 提交于
Deny bare trait objects in `src/bootstrap` Enforce `#![deny(bare_trait_objects)]` in `src/bootstrap`.
-
由 kennytm 提交于
use proper footnote syntax for references The previous syntax was causing rustdoc to interpret them as links.
-
由 kennytm 提交于
impl Clone for Box<CStr>, Box<OsStr>, Box<Path> Implements #51908.
-
由 kennytm 提交于
bootstrap: write texts to a .tmp file first for atomicity If you are using a hard-linked file as your config.toml, this change will affect the way other instances of the file is modified. The original version would modify all other instances whereas the new version will leave others unchanged, reducing the ref count by one.
-
由 Ralf Jung 提交于
-
由 bors 提交于
rustc: Search all derives for inert attributes This commit fixes an apparent mistake in librustc_resolve where when the `proc_macro` feature is enabled (or `rust_2018_preview`) the resolution of custom attributes for custom derive was tweaked. Previously when an attribute failed to resolve it was attempted to locate if there is a custom derive also in scope which declares the attribute, but only the first custom derive directive was search. Instead this commit fixes the loop to search all custom derive invocations looking for any which register the attribute in question. Closes #52219
-
由 ljedrz 提交于
-
由 ljedrz 提交于
-
由 bors 提交于
Patch clippy_lints to use the in-tree clippy as well. Should fix the most recent RLS build break.
-
由 bors 提交于
Remove rustdoc's plugins feature This fixes CVE-2018-1000622. https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622 r? @QuietMisdreavus @GuillaumeGomez
-
由 kennytm 提交于
-
由 bors 提交于
rustc_codegen_llvm: replace the first argument early in FnType::new_vtable. Fixes #51907 by removing the vtable pointer before the `ArgType` is even created. This allows any ABI to support trait object method calls, regardless of how it passes `*dyn Trait`. r? @nikomatsakis
-
由 Matt Kraai 提交于
-
由 Tinco Andringa 提交于
-
由 Alex Crichton 提交于
... and perform the same verification for #[proc_macro_attribute], currently neither of these attributes take any arguments. Closes #52273
-
由 bors 提交于
Inject clippy into the rls again Also makes sure we actually point to the local rustfmt r? @nrc cc @Manishearth
-
由 bors 提交于
Rollup of 14 pull requests Successful merges: - #51614 (Correct suggestion for println) - #51952 ( hygiene: Decouple transparencies from expansion IDs) - #52193 (step_by: leave time of item skip unspecified) - #52207 (improve error message shown for unsafe operations) - #52223 (Deny bare trait objects in in src/liballoc) - #52224 (Deny bare trait objects in in src/libsyntax) - #52239 (Remove sync::Once::call_once 'static bound) - #52247 (Deny bare trait objects in in src/librustc) - #52248 (Deny bare trait objects in in src/librustc_allocator) - #52252 (Deny bare trait objects in in src/librustc_codegen_llvm) - #52253 (Deny bare trait objects in in src/librustc_data_structures) - #52254 (Deny bare trait objects in in src/librustc_metadata) - #52261 (Deny bare trait objects in in src/libpanic_unwind) - #52265 (Deny bare trait objects in in src/librustc_codegen_utils) Failed merges: r? @ghost
-
由 Mark Rousskov 提交于
Deny bare trait objects in in src/librustc_codegen_utils Enforce `#![deny(bare_trait_objects)]` in `src/librustc_codegen_utils`.
-
由 Mark Rousskov 提交于
Deny bare trait objects in in src/libpanic_unwind Enforce `#![deny(bare_trait_objects)]` in `src/libpanic_unwind`.
-
由 Mark Rousskov 提交于
Deny bare trait objects in in src/librustc_metadata Enforce `#![deny(bare_trait_objects)]` in `src/librustc_metadata`.
-
由 Mark Rousskov 提交于
Deny bare trait objects in in src/librustc_data_structures Enforce `#![deny(bare_trait_objects)]` in `src/librustc_data_structures`.
-
由 Mark Rousskov 提交于
Deny bare trait objects in in src/librustc_codegen_llvm Enforce `#![deny(bare_trait_objects)]` in `src/librustc_codegen_llvm`.
-