about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-01-12const_let: --bless with --compare-mode=nllMazdak Farrokhzad-77/+74
2019-01-12move const_let accepted gate to avoid future conflict.Mazdak Farrokhzad-2/+2
2019-01-12Auto merge of #57532 - Centril:stabilize-2175, r=varkorbors-44/+18
Stabilize #![feature(if_while_or_patterns)] r? @varkor Per https://github.com/rust-lang/rust/issues/56212#issue-384085857. Leading `|` is also accepted per the comment in the stabilization proposal.
2019-01-12bless ui/while-letMazdak Farrokhzad-0/+1
2019-01-12Stabilise irrefutable if-let and while-let patternsvarkor-239/+175
This stabilises RFC 2086 (https://github.com/rust-lang/rust/issues/44495). Co-Authored-By: Sebastian Malton <sebastian@malton.name>
2019-01-12Auto merge of #57234 - Centril:const-stabilizations-2, r=oli-obkbors-198/+669
Const-stabilize `const_int_ops` + `const_ip` r? @oli-obk ## Note for relnotes: This PR includes https://github.com/rust-lang/rust/pull/57105. I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment. ## Stable APIs proposed for constification + `const_int_ops`: + `count_ones` + `count_zeros` + `leading_zeros` + `trailing_zeros` + `swap_bytes` + `from_be` + `from_le` + `to_be` + `to_le` + `const_ip` + `Ipv4Addr::new` ## Unstable APIs constified + `const_int_conversion`: + `reverse_bits`
2019-01-11stabilize top level or-pats in if/while let.Mazdak Farrokhzad-44/+18
2019-01-11Fixing a typographical error.David Sanders-1/+1
2019-01-11don't unwrap unexpected tokens in `format!`Andy Russell-5/+12
Fixes #57512.
2019-01-11re-do docs for core::cmpSteve Klabnik-20/+15
Fixes #32934
2019-01-11Auto merge of #57470 - RalfJung:miri, r=oli-obkbors-14/+14
update miri r? @oli-obk
2019-01-11Auto merge of #57355 - arielb1:correct-subst, r=nikomatsakisbors-9/+47
use the correct supertrait substitution in `object_ty_for_trait` beta-nominating because regression. Fixes #57156.
2019-01-11Remove unneeded but benign changeOliver Scherer-1/+0
2019-01-11Fix undefined behaviorJethro Beekman-2/+2
2019-01-11Add a profiles section to the manifestNick Cameron-1/+24
2019-01-10add test for pub extern crateDebugSteven-0/+11
2019-01-10inline pub extern crate statementsDebugSteven-5/+26
2019-01-10Update src/libstd/path.rsMazdak Farrokhzad-1/+1
Co-Authored-By: steveklabnik <steve@steveklabnik.com>
2019-01-10note that FromStr does not work for borrowed typesSteve Klabnik-2/+6
Fixes #47757
2019-01-10make note of one more normalization that Paths doSteve Klabnik-0/+2
Fixes #29008
2019-01-10Add a fast path for identical regions in lub_concrete_regionsBjörn Steinbrink-0/+7
In functions with lots of region constraint, if the fixed point iteration converges only slowly, a lot of the var/var constraints will have equal regions most of the time. Yet, we still perform the LUB calculation and try to intern the result. Especially the latter incurs quite some overhead. This reduces the take taken by the item bodies checking pass for the unicode_normalization crate by about 75%.
2019-01-10Drop "solved" constraints during region expansionBjörn Steinbrink-8/+16
Once a region has been expanded to cover a fixed region, a corresponding RegSubVar constraint won't have any effect on the expansion anymore, the same is true for constraints where the variable on the RHS has already reached static scope. By removing those constraints from the set that we're iterating over, we remove a lot of needless overhead in case of slow convergences (i.e. lots of iterations). For the unicode_normalization crate, this about cuts the time required for item_bodies checking in half.
2019-01-10use structured suggestion when casting a referenceAndy Russell-23/+20
2019-01-10Integrate miri into build-manifestAlex Crichton-2/+17
This fixes a mistake where miri was accidentally left out of the build-manifest parsing, meaning that today's nightly generated a manifest with invalid urls!
2019-01-10std: Render large exit codes as hex on WindowsAlex Crichton-1/+10
On Windows process exit codes are never signals but rather always 32-bit integers. Most faults like segfaults and such end up having large integers used to represent them, like STATUS_ACCESS_VIOLATION being 0xC0000005. Currently, however, when an `ExitStatus` is printed this ends up getting rendered as 3221225477 which is somewhat more difficult to debug. This commit adds a branch in `Display for ExitStatus` on Windows which handles exit statuses where the high bit is set and prints those exit statuses as hex instead of with decimals. This will hopefully preserve the current display for small exit statuses (like `exit code: 22`), but assist in quickly debugging segfaults/access violations/etc. I've found at least that the hex codes are easier to search for than decimal. I wasn't able to find any official documentation saying that all system exit codes have the high bit set, but I figure it's a good enough heuristic for now.
2019-01-09actually take a slice in this exampleSteve Klabnik-3/+2
Fixes #45678
2019-01-09save-analysis: Get path def from parent in case there's no def for the path ↵Emilio Cobos Álvarez-3/+5
itself. This fixes #57462. The relevant part from the hir type collector is: ``` DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(32) => Entry { parent: NodeId(33), dep_node: 4294967040, node: Expr(expr(32: <Foo>::new)) } DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(48) => Entry { parent: NodeId(32), dep_node: 4294967040, node: Ty(type(Foo)) } DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(30) => Entry { parent: NodeId(48), dep_node: 4294967040, node: PathSegment(PathSegment { ident: Foo#0, id: Some(NodeId(30)), def: Some(Err), args: None, infer_types: true }) } DEBUG 2019-01-09T15:42:58Z: rustc::hir::map::collector: hir_map: NodeId(31) => Entry { parent: NodeId(32), dep_node: 4294967040, node: PathSegment(PathSegment { ident: new#0, id: Some(NodeId(31)), def: Some(Err), args: None, infer_types: true }) } ``` We have the right ID when looking for NodeId(31) and try with NodeId(32) (which is the right thing to look for) from get_path_data, but not for the segments that we write from `write_sub_paths_truncated`. Basically `process_path` takes an id which is always the parent, and that we fall back to in `get_path_data()`, so we get the right result for the last path segment, but not for the other segments that get written to from `write_sub_paths_truncated`. I think we can stop passing the explicit id around to `get_path_data` now, will consider sending that as a followup.
2019-01-09Not seeing the forest because there are too many trees in the wayOliver Scherer-1/+1
2019-01-09Explain the arguments of the `mk_*_eval_cx` functionsOliver Scherer-0/+13
2019-01-09Document the `mk_*_eval_cx` functionsOliver Scherer-2/+10
2019-01-09update miriRalf Jung-14/+14
2019-01-09Auto merge of #57419 - cramertj:pin-set, r=withouboatsbors-2/+2
Reborrow Pin<P> using &mut in `Pin::set` Fixes https://github.com/rust-lang/rust/issues/57339. This makes it possible to call `.set` multiple times without using `.as_mut()` first to reborrow the pointer. r? @withoutboats cc @rust-lang/libs
2019-01-09Exposing enclave image-base to the enclave applicationVardhan Thigle-7/+5
image-base could be used by crates like backtrace to providing to make symbol resolution easier.
2019-01-09Auto merge of #56614 - Zoxc:query-perf2, r=michaelwoeristerbors-178/+99
Replace LockCell with atomic types Split from https://github.com/rust-lang/rust/pull/56509 r? @michaelwoerister
2019-01-09Fix irrefutable slice patterns in const fnOliver Scherer-6/+28
2019-01-09const fn feature gate is not needed anymore in a lot of testsOliver Scherer-37/+38
2019-01-09Clarify const_let commentOliver Scherer-1/+3
2019-01-09Stabilize `let` bindings and destructuring in constants and const fnOliver Scherer-865/+283
2019-01-09Auto merge of #57086 - oli-obk:miri_dist, r=kennytmbors-1/+159
Prepare everything for distributing miri via rustup The next step is to tell rustup about `cargo-miri` in https://github.com/rust-lang/rustup.rs/blob/31935e5f633a5acd3a203d23b61d1556c64a821c/src/rustup/lib.rs#L28 and https://github.com/rust-lang/rustup.rs/blob/1ccd706d1d572c777c5134bd7db7aa1a8df7f278/src/rustup-win-installer/src/lib.rs#L29
2019-01-09Change `String` to `&'static str` in `ParseResult::Failure`.Nicholas Nethercote-4/+4
This avoids 770,000 allocations when compiling the `html5ever` benchmark, reducing instruction counts by up to 2%.
2019-01-08addressing Niko's commentsBlitzerr-41/+45
2019-01-09explain safety for vec.set_len(0)Mazdak Farrokhzad-0/+3
2019-01-08[Cleanup] This is the first in the series of removals of with_freevars usage.Blitzerr-46/+74
Currently, there are many places in rustc, where we use with_freevars to iterate over freevars of a closure. The problem with this is the argument to with_freevars is a NodeId and this will get in the way of our eventual goal of solving for issue (#53488), sub-issue (#56905)
2019-01-08Some more refactoring.Blitzerr-3/+3
Change the key of UpvarListMap from DefId to ast::NodeId
2019-01-08Creating the vector using with_capacity to avoid re-allocation later on (#56905)Blitzerr-1/+6
2019-01-08Issue 56905Blitzerr-6/+24
Adding a map to TypeckTables to get the list of all the Upvars given a closureID. This is help us get rid of the recurring pattern in the codebase of iterating over the free vars using with_freevars.
2019-01-08Consolidate equality constraints error messagevarkor-4/+5
2019-01-08Add issue reference to E0202 messagevarkor-5/+5
2019-01-08Change std::error::Error trait documentation to talk about `source` instead ↵Czipperz-7/+7
of `cause`
2019-01-08Auto merge of #56407 - GuillaumeGomez:missing-docs-reexported-macros, r=varkorbors-20/+99
check missing docs for reexported macros as well Fixes #56334.