about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-09-21rename is_async_fn to asyncnesscsmoe-6/+7
2019-09-20Auto merge of #64584 - nikomatsakis:issue-64477-generator-capture-types, r=eddybbors-0/+9
record fewer adjustment types in generator witnesses, avoid spurious drops in MIR construction Don't record all intermediate adjustment types -- That's way more than is needed, and winds up recording types that will never appear in MIR. Note: I'm like 90% sure that this logic is correct, but this stuff is subtle and can be hard to keep straight. However, the risk of this PR is fairly low -- if we miss types here, I believe the most common outcome is an ICE. This fixes the original issue cited by #64477, but I'm leaving the issue open for now since there may be other cases we can detect and improve in a targeted way. r? @Zoxc
2019-09-20Auto merge of #64498 - estebank:point-at-arg, r=Centrilbors-25/+60
When possible point at argument causing item obligation failure Fix https://github.com/rust-lang/rust/issues/41781, fix https://github.com/rust-lang/rust/issues/42855, fix https://github.com/rust-lang/rust/issues/46658, fix https://github.com/rust-lang/rust/issues/48099, fix https://github.com/rust-lang/rust/issues/63143.
2019-09-20Upgrade to ena-0.13.1 and use the new `inlined_probe_value` function.Nicholas Nethercote-3/+10
This is a big speed win for `keccak` and `inflate`.
2019-09-20Specialize the `stalled_on` handling in `process_obligation()`.Nicholas Nethercote-21/+38
Optimizing for the common numbers of entries in `stalled_on` wins about 4% on `keccak` and `inflate`.
2019-09-19review commentsEsteban Küber-0/+7
2019-09-19When possible, suggest fn callEsteban Küber-25/+53
2019-09-19append asyncness info to functionscsmoe-1/+16
2019-09-19Rollup merge of #64601 - grovesNL:two-backticks, r=jonas-schievinkMazdak Farrokhzad-2/+2
Fix backticks in documentation Fix a few typos in comments/documentation where backticks were doubled-up on one side.
2019-09-19Rollup merge of #63448 - RalfJung:miri-discriminant, r=eddybMazdak Farrokhzad-0/+11
fix Miri discriminant handling This can be reviewed commit-by-commit fairly well. The Miri side is at https://github.com/rust-lang/miri/pull/903. Fixes https://github.com/rust-lang/rust/issues/62138 r? @eddyb @oli-obk
2019-09-20factor out pluralisation remains after #64280gaolei-7/+7
2019-09-19avoid generating drops for moved operands of callsNiko Matsakis-0/+9
Currently, after a CALL terminator is created in MIR, we insert DROP statements for all of its operands -- even though they were just moved shortly before! These spurious drops are later removed, but not before causing borrow check errors. This PR series modifies the drop code to track operands that were moved and avoid creating drops for them. Right now, I'm only using this mechanism for calls, but it seems likely it could be used in more places.
2019-09-19Auto merge of #64545 - nnethercote:ObligForest-more, r=nmatsakisbors-12/+49
More `ObligationForest` improvements Following on from #64500, these commits alsomake the code both nicer and faster. r? @nikomatsakis
2019-09-18Fix backticks in documentationJoshua Groves-2/+2
2019-09-19add is_async_fn querycsmoe-0/+4
2019-09-18Add explanation to type mismatch involving type params and assoc typesEsteban Küber-23/+110
2019-09-19Fix a minor grammar nit, update UI testsJames Munns-1/+1
2019-09-19Add a specialized version of `shallow_resolve()`.Nicholas Nethercote-9/+39
The super-hot call site of `inlined_shallow_resolve()` basically does `r.inlined_shallow_resolve(ty) != ty`. This commit introduces a version of that function specialized for that particular call pattern, `shallow_resolve_changed()`. Incredibly, this reduces the instruction count for `keccak` by 5%. The commit also renames `inlined_shallow_resolve()` as `shallow_resolve()` and removes the `inline(always)` annotation, as it's no longer nearly so hot.
2019-09-19Use explicit iteration instead of `all()` in `process_obligation()`.Nicholas Nethercote-4/+11
Amazingly enough, this is a 3.5% instruction count win on `keccak`.
2019-09-17Rollup merge of #64503 - RalfJung:miri-retag, r=oli-obkTyler Mandry-2/+2
rename Allocation::retag -> with_tags_and_extra This is more consistent with `Pointer::with_tag`. Also, "retag" is a [term from Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md#retagging) with a [corresponding Machine hook](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/interpret/machine/trait.Machine.html#method.retag), and this function has nothing to do with that other use of the term. r? @oli-obk
2019-09-17Auto merge of #64562 - tmandry:rollup-kfk0nuo, r=tmandrybors-24/+41
Rollup of 10 pull requests Successful merges: - #61626 (Get rid of special const intrinsic query in favour of `const_eval`) - #64283 (Updated RELEASES.md for 1.38.0) - #64394 (Shrink `SubregionOrigin`.) - #64429 (Fix failure note `to_str` implementation) - #64436 (improve Vec example soundness in mem::transmute docs) - #64502 (avoid duplicate issues for Miri build failures) - #64505 (Fix inconsistent link formatting) - #64529 (Add an example to Pin::as_mut) - #64541 (document Miri error categories) - #64544 (build-manifest: re-add some comments) Failed merges: r? @ghost
2019-09-17Rollup merge of #64541 - RalfJung:miri-errors, r=oli-obkTyler Mandry-1/+14
document Miri error categories r? @oli-obk
2019-09-17Rollup merge of #64394 - nnethercote:shrink-SubregionOrigin, r=Mark-SimulacrumTyler Mandry-14/+18
Shrink `SubregionOrigin`. It's currently 120 bytes on x86-64, due to one oversized variant (`Subtype`). This commit boxes `Subtype`'s contents, reducing the size of `SubregionOrigin` to 32 bytes. The change speeds things up by avoiding lots of `memcpy` calls, mostly relating to `RegionConstraintData::constraints`, which is a `BTreeMap` with `SubregionOrigin` values.
2019-09-17Auto merge of #64525 - nikomatsakis:issue-64512-drop-order-tail-temp, ↵bors-26/+52
r=davidtwco adjust desugaring for async fn to correct drop order Old desugaring, given a user function body `{ $stmts; $expr }` ``` { let $param_pattern0 = $raw_param0; ... let $param_patternN = $raw_paramN; $stmts; $expr } ``` New desugaring: ``` { let $param_pattern0 = $raw_param0; ... let $param_patternN = $raw_paramN; drop-temps { $stmts; $expr } } ``` The drop-temps is an internal bit of HIR that drops temporaries from the resulting expression, but it should be equivalent to `return { $stmts; $expr }`. Fixes #64512 Fixes #64391
2019-09-17Get rid of special const intrinsic query in favour of `const_eval`Oliver Scherer-9/+9
2019-09-17Protect error handler fields with single lockMark Rousskov-3/+3
This avoids concurrency-related bugs when locks are acquired for too short a time and similar cases.
2019-09-17Remove unused methods from HandlerMark Rousskov-6/+0
2019-09-17Remove Handler::{emit, emit_with_code}Mark Rousskov-2/+2
2019-09-17Remove Handler::cancelMark Rousskov-1/+1
2019-09-17Privatize DiagnosticBuilder constructorsMark Rousskov-6/+5
2019-09-17Take Diagnostic in Handler::emit_diagnosticMark Rousskov-1/+1
2019-09-17Replace DiagnosticBuilder with Diagnostic when emitting errorMark Rousskov-4/+10
2019-09-17Fix re-rebalance coherence implementation for fundamental typesGeorg Semmler-1/+9
Fixes #64412
2019-09-17adjust larger comment to include the bodyNiko Matsakis-10/+10
2019-09-17use drop-temps { .. } pseudo-notationNiko Matsakis-1/+1
DropTemps(...) looks like a function, this looks like wacko special stuff
2019-09-17introduce `lower_block_expr` convenience function, and use itNiko Matsakis-14/+12
2019-09-17rename Allocation::retag -> with_tags_and_extraRalf Jung-2/+2
2019-09-17document Miri error categoriesRalf Jung-1/+14
2019-09-17Rollup merge of #64085 - estebank:hrtb-errors, r=oli-obkMazdak Farrokhzad-22/+31
Tweak unsatisfied HRTB errors r? @oli-obk Close #35180.
2019-09-16Tweak unsatisfied HRTB errorsEsteban Küber-22/+31
2019-09-16Rollup merge of #64485 - RalfJung:miri, r=alexcrichtonMazdak Farrokhzad-1/+1
update Miri Fixes https://github.com/rust-lang/rust/issues/64363 r? @alexcrichton for the Cargo.toml changes: with byteorder 1.3, the `i128` feature is a NOP, so we can remove it everywhere and then get rid of this crate in the workspace-hack.
2019-09-16Rollup merge of #64357 - rust-lang:adt-docs-fix, r=varkorMazdak Farrokhzad-1/+7
`AdtDef` is an algebraic data type, not abstract data type r? @varkor
2019-09-16adjust desugaring for async fn to correct drop orderNiko Matsakis-13/+41
Old desugaring, given a user function body { $stmts; $expr } ``` { let $param_pattern0 = $raw_param0; ... let $param_patternN = $raw_paramN; $stmts; $expr } ``` New desugaring: ``` { let $param_pattern0 = $raw_param0; ... let $param_patternN = $raw_paramN; drop-temps { $stmts; $expr } } ``` The drop-temps is an internal bit of HIR that drops temporaries from the resulting expression, but it should be equivalent to `return { $stmts; $expr }`.
2019-09-16with byteorder 1.3, the i128 feature is a NOPRalf Jung-1/+1
2019-09-16`AdtDef` is an algebraic data type, not abstract data type.Mazdak Farrokhzad-1/+7
2019-09-16Auto merge of #64510 - Centril:rollup-m03zsq8, r=Centrilbors-1/+12
Rollup of 10 pull requests Successful merges: - #63955 (Make sure interned constants are immutable) - #64028 (Stabilize `Vec::new` and `String::new` as `const fn`s) - #64119 (ci: ensure all tool maintainers are assignable on issues) - #64444 (fix building libstd without backtrace feature) - #64446 (Fix build script sanitizer check.) - #64451 (when Miri tests are not passing, do not add Miri component) - #64467 (Hide diagnostics emitted during --cfg parsing) - #64497 (Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given) - #64499 (Use `Symbol` in two more functions.) - #64504 (use println!() instead of println!("")) Failed merges: r? @ghost
2019-09-16Rollup merge of #64467 - Mark-Simulacrum:hide-cfg-failures, r=estebankMazdak Farrokhzad-1/+12
Hide diagnostics emitted during --cfg parsing The early error is more than sufficient for fixing the problem. Fixes https://github.com/rust-lang/rust/issues/31496.
2019-09-16or-patterns: liveness: `is_argument` -> `is_param`.Mazdak Farrokhzad-2/+2
Pacify `tidy`. It's also more correct in this context.
2019-09-16Auto merge of #64381 - mati865:rand, r=alexcrichtonbors-1/+1
Upgrade parking_lot and tempfile rustc dependencies This should be last piece to unbreak `rustc` in https://github.com/rust-lang/rust/issues/63848
2019-09-16factor getting the discriminant layout to a new methodRalf Jung-0/+11