- 22 8月, 2018 10 次提交
-
-
由 Ralf Jung 提交于
-
由 bors 提交于
Exec gdb/lldb in rust-{gdb/lldb} wrapper scripts This way, the process we get by executing `rust-gdb` or `rust-lldb` (eventually) is an actual `gdb` or `lldb` process and behaves accordingly. Previously (and at least to me unexpectedly) it was just a script waiting for the debugger to exit. Sending a signal (e.g. SIGINT) to the spawned process did therefore not affect the debugger process (which was just a child of the wrapper script). In order to work around that we `exec` (according to [this](http://pubs.opengroup.org/onlinepubs/009695399/utilities/exec.html) part of the posix shell) and replace the script process with the debugger in the last line of the script. The lldb script had to be modified to not pass the configuration commands via a script file (which in my opinion is cleaner anyway).
-
由 bors 提交于
Exhaustive integer matching This adds a new feature flag `exhaustive_integer_patterns` that enables exhaustive matching of integer types by their values. For example, the following is now accepted: ```rust #![feature(exhaustive_integer_patterns)] #![feature(exclusive_range_pattern)] fn matcher(x: u8) { match x { // ok 0 .. 32 => { /* foo */ } 32 => { /* bar */ } 33 ..= 255 => { /* baz */ } } } ``` This matching is permitted on all integer (signed/unsigned and char) types. Sensible error messages are also provided. For example: ```rust fn matcher(x: u8) { match x { //~ ERROR 0 .. 32 => { /* foo */ } } } ``` results in: ``` error[E0004]: non-exhaustive patterns: `32u8...255u8` not covered --> matches.rs:3:9 | 6 | match x { | ^ pattern `32u8...255u8` not covered ``` This implements https://github.com/rust-lang/rfcs/issues/1550 for https://github.com/rust-lang/rust/issues/50907. While there hasn't been a full RFC for this feature, it was suggested that this might be a feature that obviously complements the existing exhaustiveness checks (e.g. for `bool`) and so a feature gate would be sufficient for now.
-
由 varkor 提交于
-
由 bors 提交于
Auto merge of #53439 - GuillaumeGomez:generate-blanket-impls-for-reexported-items, r=QuietMisdreavus Generate blanket implementations for reexported items as well Fixes #53374. r? @QuietMisdreavus
-
由 varkor 提交于
-
由 bors 提交于
resolve: Some macro resolution refactoring Work towards completing https://github.com/rust-lang/rust/pull/50911#issuecomment-411605393 The last commit also fixes https://github.com/rust-lang/rust/issues/53269 by not using `def_id()` on `Def::Err` and also fixes https://github.com/rust-lang/rust/issues/53512.
-
由 varkor 提交于
-
由 bors 提交于
Only fetch lib_features when there are unknown feature attributes An attempt to win back some of the performance lost in https://github.com/rust-lang/rust/pull/52644#issuecomment-413761127. cc @nnethercote
-
由 bors 提交于
Rollup of 17 pull requests Successful merges: - #53030 (Updated RELEASES.md for 1.29.0) - #53104 (expand the documentation on the `Unpin` trait) - #53213 (Stabilize IP associated constants) - #53296 (When closure with no arguments was expected, suggest wrapping) - #53329 (Replace usages of ptr::offset with ptr::{add,sub}.) - #53363 (add individual docs to `core::num::NonZero*`) - #53370 (Stabilize macro_vis_matcher) - #53393 (Mark libserialize functions as inline) - #53405 (restore the page title after escaping out of a search) - #53452 (Change target triple used to check for lldb in build-manifest) - #53462 (Document Box::into_raw returns non-null ptr) - #53465 (Remove LinkMeta struct) - #53492 (update lld submodule to include RISCV patch) - #53496 (Fix typos found by codespell.) - #53521 (syntax: Optimize some literal parsing) - #53540 (Moved issue-53157.rs into src/test/ui/consts/const-eval/) - #53551 (Avoid some Place clones.) Failed merges: r? @ghost
-
- 21 8月, 2018 30 次提交
-
-
由 kennytm 提交于
Avoid some Place clones. This is a 0.5% speedup on ripgrep.
-
由 kennytm 提交于
Replace usages of ptr::offset with ptr::{add,sub}. Rust provides these helper methods – so let's use them!
-
由 bors 提交于
Stabilise raw_identifiers feature * [Reference PR](https://github.com/rust-lang-nursery/reference/pull/395) * [Book PR](https://github.com/rust-lang/book/pull/1480) * [Rust by Example PR](https://github.com/rust-lang/rust-by-example/pull/1095) Closes #48589. r? @cramertj CC @cuviper @centril
-
由 kennytm 提交于
Moved issue-53157.rs into src/test/ui/consts/const-eval/
-
由 kennytm 提交于
expand the documentation on the `Unpin` trait provides an overview of the Pin API which the trait is for, and show how it can be used in making self referencial structs part of #49150
-
由 kennytm 提交于
Document Box::into_raw returns non-null ptr Closes #52806.
-
由 kennytm 提交于
add individual docs to `core::num::NonZero*`
-
由 kennytm 提交于
syntax: Optimize some literal parsing Currently in the `wasm-bindgen` project we have a very very large crate that's procedurally generated, `web-sys`. To generate this crate we parse all of a browser's WebIDL and we then generate bindings for all of the APIs contained within. The resulting Rust file is 18MB large (wow!) and currently takes a very long time to compile in debug mode. On the nightly compiler a *debug* build takes 90s for the crate to finish. I was curious what was taking so long and upon investigating a *massive* portion of the time was spent in the `lit_token` method of the compiler, primarily formatting strings via `format!`. Upon some more investigation it looks like the `byte_str_lit` was allocating an error message once per byte, causing a very large number of allocations to happen for large literals, of which wasm-bindgen generates quite a few (some are MB large). This commit fixes the issue by lazily allocating the error message, only doing so if the error message is actually needed (which should be never). As a result, the debug mode compilation time for our `web-sys` crate decreased from 90s to 20s, a very nice improvement! (although we've still got some work to do).
-
由 kennytm 提交于
Fix typos found by codespell.
-
由 kennytm 提交于
update lld submodule to include RISCV patch This pulls in one new commit, to add support for linking static RISCV binaries, suitable for the new riscv32imac-unknown-none-elf target. See: https://github.com/rust-lang/lld/pull/1
-
由 kennytm 提交于
Remove LinkMeta struct Fixes #53291
-
由 kennytm 提交于
Change target triple used to check for lldb in build-manifest The wrong target triple was used for lldb in build-manifest. lldb is only built for macOS, so update the triple to reflect that. This is an attempt to fix bug#48168.
-
由 kennytm 提交于
restore the page title after escaping out of a search Currently if I start a search in the docs, but then hit ESC, the "Results for..." title is still there in my browser tab. This is a simple attempt to fix that. I see that there's a separate `var previousTitle = document.title` thing happening in `startSearch()`, but as far as I can tell that's only related to the back stack? I'd also appreciate feedback on the right place to declare the `titleBeforeSearch` variable. Testing-wise, I've confirmed by hand that the tab title restores correctly after building with `./x.py doc --stage 1 src/libstd`, but nothing more involved than that. What else should I test?
-
由 kennytm 提交于
Mark libserialize functions as inline Got to thinking: "what if that big pile of tiny functions isn't inlining as it should?" So a few `replace-regex` later the local perf run says this: <details> ![](https://i.imgur.com/gvdJEgG.png) </details> Not huge, but still a win, which is interesting. Want to verify with the real perf run, but I understand there's a backlog. I didn't notice any increase in compile time or binary sizes for rustc/libs.
-
由 kennytm 提交于
Stabilize macro_vis_matcher This PR should stabilize [macro_vis_matcher](https://github.com/rust-lang/rust/issues/41022) feature. - [ ] "reference" book changes: https://github.com/rust-lang-nursery/reference/pull/400 - [ ] "Rust by example" book changes: https://github.com/rust-lang/rust-by-example/pull/1096 - [ ] "clippy" changes: https://github.com/rust-lang-nursery/rust-clippy/pull/3055 r? @cramertj
-
由 Nicholas Nethercote 提交于
This is a 0.5% speedup on ripgrep.
-
由 bors 提交于
Change `Rc::inc_{weak,strong}` to better hint optimization to LLVM As discussed in #13018, `Rc::inc_strong` and `Rc::inc_weak` are changed to allow compositions of `clone` and `drop` to be better optimized. Almost entirely as in [this comment](https://github.com/rust-lang/rust/issues/13018#issuecomment-408642184), except that `abort` on zero is added so that a `drop(t.clone())` does not produce a zero check followed by conditional deallocation. This is different from #21418 in that it doesn't rely on `assume`, avoiding the prohibitive compilation slowdown. [Before and after IR](https://gist.github.com/hermord/266e55451b7fe0bb8caa6e35d17c86e1).
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 varkor 提交于
-
由 Vadim Petrochenkov 提交于
-
由 thedarkula 提交于
-
由 Alexander Regueiro 提交于
-
由 Vadim Petrochenkov 提交于
`fn resolve_legacy_scope` can now resolve only to `macro_rules!` items, `fn resolve_lexical_macro_path_segment` is for everything else - modularized macros, preludes
-
由 Vadim Petrochenkov 提交于
-
由 Vadim Petrochenkov 提交于
Refactor away `fn resolve_invoc_to_def`
-
由 Alex Crichton 提交于
Currently in the `wasm-bindgen` project we have a very very large crate that's procedurally generated, `web-sys`. To generate this crate we parse all of a browser's WebIDL and we then generate bindings for all of the APIs contained within. The resulting Rust file is 18MB large (wow!) and currently takes a very long time to compile in debug mode. On the nightly compiler a *debug* build takes 90s for the crate to finish. I was curious what was taking so long and upon investigating a *massive* portion of the time was spent in the `lit_token` method of the compiler, primarily formatting strings via `format!`. Upon some more investigation it looks like the `byte_str_lit` was allocating an error message once per byte, causing a very large number of allocations to happen for large literals, of which wasm-bindgen generates quite a few (some are MB large). This commit fixes the issue by lazily allocating the error message, only doing so if the error message is actually needed (which should be never). As a result, the debug mode compilation time for our `web-sys` crate decreased from 90s to 20s, a very nice improvement! (although we've still got some work to do).
-
由 kennytm 提交于
When closure with no arguments was expected, suggest wrapping Fix #49694.
-