about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-05-04hopefully working nth_back on chunks@amit.chandra-9/+17
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
2019-05-04wip nth_back on chunks@amit.chandra-0/+29
Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com>
2019-05-03Auto merge of #60423 - varkor:update-getopts, r=alexcrichtonbors-6/+22
Update getopts This is a prerequisite to fixing https://github.com/rust-lang/rust/issues/32352. The rustbuild fix has been pulled out of https://github.com/rust-lang/rust/pull/59440. r? @alexcrichton
2019-05-03Auto merge of #59883 - ebarnard:clonefile, r=sfacklerbors-21/+71
Make `std::fs::copy` attempt to create copy-on-write clones of files on MacOS The behaviour of MacOS now matches Linux which uses `copy_file_range` to perform CoW file copies where available and supported by the underlying filesystem.
2019-05-02Update getopts to 0.2.18varkor-2/+2
This is a proof-of-concept that the dependency unification fix works.
2019-05-02Prevent dependencies between std/test/rustc unifying with each othervarkor-4/+20
2019-05-02Auto merge of #60173 - RalfJung:miri, r=oli-obkbors-14/+14
update miri r? @oli-obk
2019-05-02Auto merge of #60379 - froydnj:bootstrap-progress-fixes, r=kennytmbors-3/+9
intelligently handle older version of git in bootstrap If we fail to run with `--progress`, try running without instead. Fixes #57080.
2019-05-02Make `std::fs::copy` attempt to create copy-on-write clones of files on MacOS.Edward Barnard-21/+71
2019-05-02update miriRalf Jung-14/+14
2019-05-02Auto merge of #60156 - RalfJung:macos-rand, r=oli-obk,alexcrichtonbors-1/+5
use SecRandomCopyBytes on macOS in Miri This is a hack to fix https://github.com/rust-lang/miri/issues/686: on macOS, rustc will open `/dev/urandom` to initialize a `HashMap`. That's quite hard to emulate properly in Miri without a full-blown implementation of file descriptors. However, Miri needs an implementation of `SecRandomCopyBytes` anyway to support [getrandom](https://crates.io/crates/getrandom), so using it here should work just as well. This will only have an effect when libstd is compiled specifically for Miri, but that will generally be the case when people use `cargo miri`. This is clearly a hack, so I am opening this to start a discussion about whether we are okay with such a hack or not. Cc @oli-obk
2019-05-02Auto merge of #59008 - varkor:const-generics-infer, r=eddybbors-213/+1414
Add const generics to infer (and transitive dependencies) Split out from #53645. This work is a collaborative effort with @yodaldevoid. There are a number of stubs. These are mainly to ensure we don't overlook them when completing the implementation, but are not necessary for the initial implementation. We plan to address these in follow up PRs. r? @eddyb / @nikomatsakis
2019-05-02Auto merge of #60460 - Centril:rollup-gz5bc8i, r=Centrilbors-789/+1130
Rollup of 7 pull requests Successful merges: - #59634 (Added an explanation for the E0704 error.) - #60348 (move some functions from parser.rs to diagostics.rs) - #60385 (Emit metadata files earlier) - #60428 (Refactor `eval_body_using_ecx` so that it doesn't need to query for MIR) - #60437 (Ensure that drop order of `async fn` matches `fn` and that users cannot refer to generated arguments.) - #60439 (doc: Warn about possible zombie apocalypse) - #60452 (Remove Context and ContextKind) Failed merges: r? @ghost
2019-05-02Rollup merge of #60452 - JohnTitor:remove-context, r=matthewjasperMazdak Farrokhzad-211/+171
Remove Context and ContextKind Fixes #60421 r? @matthewjasper
2019-05-02Rollup merge of #60439 - vorner:zombie-apocalypse-warn, r=TimNNMazdak Farrokhzad-0/+12
doc: Warn about possible zombie apocalypse Extend the std::process::Child docs with warning about possible zombies. The previous version mentioned that when dropping the Child, the process is not killed. However, the wording gave the impression that such behaviour is fine to do (leaving the reader believe low-level details like reaping zombies of the dead processes is taken over by std somehow; or simply leaving the reader unaware about the problem).
2019-05-02Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakisMazdak Farrokhzad-232/+505
Ensure that drop order of `async fn` matches `fn` and that users cannot refer to generated arguments. Fixes #60236 and fixes #60438. This PR modifies the lowering of `async fn` arguments so that the drop order matches the equivalent `fn`. Previously, async function arguments were lowered as shown below: async fn foo(<pattern>: <ty>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern> = __arg0; } // <-- dropped as you "exit" the async block } After this PR, async function arguments will be lowered as: async fn foo(<pattern>: <ty>, <pattern>: <ty>, <pattern>: <ty>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>, __arg1: <ty>, __arg2: <ty>) { async move { let __arg2 = __arg2; let <pattern> = __arg2; let __arg1 = __arg1; let <pattern> = __arg1; let __arg0 = __arg0; let <pattern> = __arg0; } // <-- dropped as you "exit" the async block } If `<pattern>` is a simple ident, then it is lowered to a single `let <pattern> = <pattern>;` statement as an optimization. This PR also stops users from referring to the generated `__argN` identifiers. r? @nikomatsakis
2019-05-02Rollup merge of #60428 - wesleywiser:refactor_const_eval, r=oli-obkMazdak Farrokhzad-27/+17
Refactor `eval_body_using_ecx` so that it doesn't need to query for MIR This is the first step toward removing the `mir` field of `ConstPropagator` which will eventually allow us to actually const propagate in MIR. r? @oli-obk
2019-05-02Rollup merge of #60385 - nnethercote:earlier-metadata, r=alexcrichtonMazdak Farrokhzad-156/+164
Emit metadata files earlier This will make cargo pipelining much more effective.
2019-05-02Rollup merge of #60348 - agnxy:refactor-parser, r=petrochenkovMazdak Farrokhzad-162/+231
move some functions from parser.rs to diagostics.rs Starting with a few functions mentioned in https://github.com/rust-lang/rust/issues/60015#issuecomment-484259773. We might refactor parser.rs further in subsequent changes. r? @petrochenkov
2019-05-02Rollup merge of #59634 - DevQps:explain-E0704, r=estebankMazdak Farrokhzad-1/+30
Added an explanation for the E0704 error. # Description Adds an explanation on the E0704 error. I tried to stick as closely to the message that the compiler generates. It's the first time I am fixing error messages here, so if there is something I did wrong or should improve, please let me know. closes #55398
2019-05-01Update clippyManish Goregaokar-8/+8
2019-05-02Remove Context and ContextKindYuki Okushi-211/+171
2019-05-01Split `ct_err` out into `CommonConsts`varkor-5/+26
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Create ShallowResolvervarkor-108/+128
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add a test for const args that cannot be inferredvarkor-0/+25
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add a test for incorrect numbers of const argsvarkor-0/+32
2019-05-01Fold const in writebackvarkor-0/+15
2019-05-01Add a test for const argumentsvarkor-0/+19
2019-05-01Fix issue with const params in operand.rsvarkor-1/+2
2019-05-01Resolve FIXME in probe.rsvarkor-1/+4
2019-05-01Correct name of constrained_generic_params aliasvarkor-10/+10
2019-05-01Fix unused variable warningvarkor-2/+2
2019-05-01Fix known-known const unification casevarkor-4/+1
2019-05-01Remove spurious assertionvarkor-3/+0
2019-05-01Add `const-types` testvarkor-0/+22
2019-05-01Fix rebase issuevarkor-2/+0
2019-05-01Implement const generics for `InferenceFudger`varkor-13/+33
2019-05-01Fix missing parenthesisvarkor-1/+1
2019-05-01Take ConstValue::Placeholder into account in new locationsvarkor-3/+5
2019-05-01Fix rebase from LazyConst removalvarkor-389/+337
2019-05-01Replace ConstVariableTable with UnificationTablevarkor-328/+181
2019-05-01Handle `ConstValue::Placeholder` in `canonicalizer`varkor-4/+21
2019-05-01Add `PlaceholderConst`varkor-0/+18
2019-05-01Add `ConstValue::Placeholder`varkor-7/+24
2019-05-01Inline ConstError into TypeErrorvarkor-53/+10
2019-05-01Implement fold_const for BoundVarReplacervarkor-18/+81
2019-05-01impl fold_const for ShifterGabriel Smith-6/+24
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01impl visit_const for HasEscapingVarsVisitorGabriel Smith-0/+12
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01impl fold_const for TypeFreshenerGabriel Smith-22/+92
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01impl mk_const_inferGabriel Smith-0/+12
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>