about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2017-09-16Auto merge of #43017 - durka:stabilize-const-invocation, r=eddybbors-101/+311
Individualize feature gates for const fn invocation This PR changes the meaning of `#![feature(const_fn)]` so it is only required to declare a const fn but not to call one. Based on discussion at #24111. I was hoping we could have an FCP here in order to move that conversation forward. This sets the stage for future stabilization of the constness of several functions in the standard library (listed below), so could someone please tag the lang team for review. - `std::cell` - `Cell::new` - `RefCell::new` - `UnsafeCell::new` - `std::mem` - `size_of` - `align_of` - `std::ptr` - `null` - `null_mut` - `std::sync` - `atomic` - `Atomic{Bool,Ptr,Isize,Usize}::new` - `once` - `Once::new` - primitives - `{integer}::min_value` - `{integer}::max_value` Some other functions are const but they are also unstable or hidden, e.g. `Unique::new` so they don't have to be considered at this time. After this stabilization, the following `*_INIT` constants in the standard library can be deprecated. I wasn't sure whether to include those deprecations in the current PR. - `std::sync` - `atomic` - `ATOMIC_{BOOL,ISIZE,USIZE}_INIT` - `once` - `ONCE_INIT`
2017-09-16bump rlsAlex Burka-3/+3
2017-09-16change #![feature(const_fn)] to specific gatesAlex Burka-75/+127
2017-09-15rustbuild: Compile the error-index in stage 2Alex Crichton-2/+14
Right now we comiple rustdoc in stage 2 and the error index in stage 0, which ends up compiling rustdoc twice! To avoid compiling rustdoc twice (which takes awhile) let's just compile it once in stage 2.
2017-09-15Auto merge of #43949 - GuillaumeGomez:compile_fail_stable, r=alexcrichtonbors-11/+34
Compile fail stable Since #30726, we never made the `compile_fail` flag nor the error code check stable. I think it's time to change this fact. r? @alexcrichton
2017-09-14Rollup merge of #44572 - frewsxcv:frewsxcv-from-utf16-lossy, r=QuietMisdreavusCorey Farwell-0/+7
Clarify return type of `String::from_utf16_lossy`. Fixes https://github.com/rust-lang/rust/issues/32874
2017-09-14Rollup merge of #44569 - est31:master, r=estebankCorey Farwell-3/+3
"avoid" is a better word here than "disable" You don't "disable" the warning really, you just avoid it (as a conscious action).
2017-09-14Rollup merge of #44563 - budziq:stablilize_tcpstream_connect_timeout, ↵Corey Farwell-1/+1
r=alexcrichton stabilize tcpstream_connect_timeout (closes #43079)
2017-09-14Rollup merge of #44559 - frewsxcv:frewsxcv-rm-loop, r=sfacklerCorey Farwell-8/+6
Remove unneeded `loop`. None
2017-09-14Rollup merge of #44552 - durka:patch-42, r=alexcrichtonCorey Farwell-8/+8
update "since" for discriminant_value It's [going](https://github.com/rust-lang/rust/pull/44263#issuecomment-329257597) to be backported to beta. r? @alexcrichton
2017-09-14Rollup merge of #44541 - GuillaumeGomez:openoptions-docs, r=QuietMisdreavusCorey Farwell-5/+23
Openoptions docs r? @QuietMisdreavus
2017-09-14Rollup merge of #44536 - Havvy:transmute-docs, r=steveklabnikCorey Farwell-3/+4
Fix example in transmute; add safety requirement to Vec::from_raw_parts This fixes the second bullet point on #44281 and also removes some incorrect information.
2017-09-14Rollup merge of #44534 - adlerd:drain_filter_doctest, r=blussCorey Farwell-3/+6
Fix drain_filter doctest. Fixes #44499. Also change some of the hidden logic in the doctest as a regression test; two bugs in the original would now cause test failure.
2017-09-14Rollup merge of #44521 - rwakulszowa:str_utf16_doc, r=frewsxcvCorey Farwell-0/+13
Add an example of std::str::encode_utf16 Closes #44419
2017-09-14Rollup merge of #44497 - tommyip:doc_example, r=frewsxcvCorey Farwell-0/+11
Add doc example to str::from_boxed_utf8_unchecked Fixes #44463.
2017-09-14Rollup merge of #44485 - 42triangles:master, r=frewsxcvCorey Farwell-0/+11
Added an example for `std::str::into_boxed_bytes()` This solves issue #44423.
2017-09-14Rollup merge of #44477 - napen123:master, r=frewsxcvCorey Farwell-0/+13
Add doc examples to str::from_utf8_unchecked_mut Fixes #44461
2017-09-14Rollup merge of #44472 - smt923:master, r=frewsxcvCorey Farwell-0/+31
Add short doc examples for str::from_utf8_mut Fixes #44462
2017-09-14Rollup merge of #44453 - tommyip:doc_string_as_mut_str, r=frewsxcvCorey Farwell-1/+16
Add doc example to String::as_mut_str Fixes #44429.
2017-09-14Rollup merge of #44450 - SergioBenitez:master, r=nrcCorey Farwell-0/+6
Add `impl From<Vec<Span>> for MultiSpan`. A simple `impl`. r? @nrc
2017-09-14Rollup merge of #44430 - steveklabnik:update-mdbook, r=alexcrichtonCorey Farwell-27/+27
update mdbook This eliminates some warnings r? @alexcrichton
2017-09-14Rollup merge of #44388 - tbu-:pr_doc_udp_connect_multiple, r=frewsxcvCorey Farwell-16/+9
Clarify the behavior of UDP sockets wrt. multiple addresses in `connect` CC @frewsxcv #22569 #44209
2017-09-14Rollup merge of #44378 - frehberg:rustdoc, r=dtolnayCorey Farwell-13/+41
rustdoc: extend UdpSocket API doc (#657) see https://github.com/carllerche/mio/issues/657
2017-09-14Rollup merge of #44374 - jsheard:threadname, r=alexcrichtonCorey Farwell-7/+17
Implement named threads on Windows (v2) https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx Windows 10 version 1607 finally added a sensible API for naming threads, so we can now implement named threads without having to use MSVC compiler extensions like before. VS2017s debugger and the WPA profiler already use this API where available, but other tools may need some time to catch up. ![thread](https://user-images.githubusercontent.com/3153547/30133438-c92a3cda-934b-11e7-9668-915d53e8d860.png)
2017-09-14Rollup merge of #44368 - ollie27:rustdoc_pulldown_ids, r=QuietMisdreavusCorey Farwell-2/+6
rustdoc: Don't counts ids twice when using --enable-commonmark cc @GuillaumeGomez r? @QuietMisdreavus
2017-09-14Rollup merge of #44254 - GuillaumeGomez:const-fix-rustdoc, r=QuietMisdreavusCorey Farwell-17/+31
Fix rendering of const keyword for functions Fixes #44187. r? @QuietMisdreavus
2017-09-14Rollup merge of #44131 - smaeul:openssl-perl, r=Mark-SimulacrumCorey Farwell-1/+2
Explicitly run perl for OpenSSL Configure OpenSSL's Configure script is missing a shebang. On some platforms, execve falls back to execution with the shell. Some other platforms, like musl, will fail with an exec format error. Avoid this by calling perl explicitly (since it's a perl script).
2017-09-14Clarify return type of `String::from_utf16_lossy`.Corey Farwell-0/+7
Fixes https://github.com/rust-lang/rust/issues/32874
2017-09-14rustc: Remove `Session::dep_graph`Alex Crichton-113/+142
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
2017-09-14"avoid" is a better word here than "disable"est31-3/+3
2017-09-14stabilize tcpstream_connect_timeout (closes #43079)Michal Budzynski-1/+1
2017-09-14Merge branch 'master' into threadnameJoshua Sheard-4038/+10118
2017-09-14Auto merge of #44480 - Zoxc:gen-liveness, r=arielb1bors-174/+354
Analyse storage liveness and preserve it during generator transformation This uses a dataflow analysis on `StorageLive` and `StorageDead` statements to infer where the storage of locals are live. The result of this analysis is intersected with the regular liveness analysis such that a local is can only be live when its storage is. This fixes https://github.com/rust-lang/rust/issues/44184. If the storage of a local is live across a suspension point, we'll insert a `StorageLive` statement for it after the suspension point so storage liveness is preserved. This fixes https://github.com/rust-lang/rust/issues/44179. r? @arielb1
2017-09-14Auto merge of #44526 - leodasvacas:remove-deprecated-lang-items, r=arielb1bors-49/+15
Remove deprecated lang items They have been deprecated for years and there is no trace left of them in the compiler. Also removed `require_owned_box` which is dead code and other small refactorings.
2017-09-14Auto merge of #43972 - TobiasSchaffner:std_clean, r=alexcrichtonbors-46/+537
Add the libstd-modifications needed for the L4Re target This commit adds the needed modifications to compile the std crate for the L4 Runtime environment (L4Re). A target for the L4Re was introduced in commit: c151220a84e40b65e45308cc0f3bbea4466d3acf In many aspects implementations for linux also apply for the L4Re microkernel. Some uncommon characteristics had to be resolved: * L4Re has no network funktionality * L4Re has a maximum stacksize of 1Mb for threads * L4Re has no uid or gid Co-authored-by: Sebastian Humenda <sebastian.humenda@tu-dresden.de>
2017-09-13Remove unneeded `loop`.Corey Farwell-8/+6
2017-09-14Auto merge of #44484 - tirr-c:issue-44332, r=petrochenkovbors-6/+52
Parse nested closure with two consecutive parameter lists properly This is a followup of #44332. --- Currently, in nightly, this does not compile: ```rust fn main() { let f = |_||x, y| x+y; println!("{}", f(())(1, 2)); // should print 3 } ``` `|_||x, y| x+y` should be parsed as `|_| (|x, y| x+y)`, but the parser didn't accept `||` between `_` and `x`. This patch fixes the problem. r? @petrochenkov
2017-09-13update "since" for discriminant_valueAlex Burka-8/+8
It's going to be backported to beta.
2017-09-13Fix a bug where StorageIgnored had an incorrect buffer lengthJohn Kåre Alsaker-2/+2
2017-09-13Fix nits and refactor creation of StorageLive blocksJohn Kåre Alsaker-75/+52
2017-09-13Make sure we aren't using dead localsJohn Kåre Alsaker-5/+6
2017-09-13Analyse storage liveness and preserve it during generator transformationJohn Kåre Alsaker-170/+372
2017-09-13Auto merge of #44516 - gaurikholkar:fns, r=arielb1bors-2/+143
Extend E0623 for fn items This fixes #44516 The below example now gives ``` error[E0623]: lifetime mismatch --> gg.rs:3:10 | 2 | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { | --- --- these two types are declared with different lifetimes... 3 | y.push(z); | ^ ...but data from `z` flows into `y` here error: aborting due to previous error ``` r? @nikomatsakis cc @arielb1
2017-09-13Fix initial reviewleonardo.yvens-2/+2
2017-09-13fix ui testsgaurikholkar-2/+2
2017-09-13Refactor fn_trait_kindleonardo.yvens-12/+5
Short and sweet
2017-09-13honor #[rustc_const_unstable] attributesAlex Burka-39/+197
2017-09-13Refactor how to get a lang item's nameleonardo.yvens-16/+10
Small refactorings
2017-09-13Remove require_owned_boxleonardo.yvens-4/+0
It's unused and unnecessary
2017-09-13Auto merge of #44129 - pnkfelix:fix-end-region-emission-order, r=nmatsakisbors-23/+319
Fix end region emission order Fix #43481