about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-02-04Auto merge of #68601 - 0dvictor:split, r=tmandrybors-4/+14
Split `join_codegen_and_link()` into two steps `join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-02-04Split `join_codegen_and_link()` into two stepsVictor Ding-4/+14
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-02-03Auto merge of #67668 - matthewjasper:or-patterns, r=pnkfelixbors-590/+1081
Implement MIR lowering for or-patterns This is the last thing needed to get meaningful run-pass tests for or-patterns. There probably need to be more tests before stabilizing this, but the most important cases should have been covered. Note: we can generate exponentially large MIR CFGs when using or-patterns containing bindings, type ascriptions, or that are for a match arm with a guard. `src/test/mir-opt/exponential-or.rs` shows the best case for what we currently do. cc #54883 closes #60350 closes #67514 cc @Centril r? @pnkfelix
2020-02-03Apply suggestions from code reviewmatthewjasper-3/+0
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-02-03Add more tests for or-patternsMatthew Jasper-0/+474
2020-02-03Rollup merge of #68798 - Centril:caller-loc-ctfe-rt-equiv, r=RalfJungDylan DPC-0/+38
Test that `#[track_caller]` as `fn()` respects RT / CTFE equivalence r? @RalfJung cc @anp @eddyb
2020-02-03Rollup merge of #68744 - JohnTitor:fix-ice-save-analysis, r=cramertjDylan DPC-2/+30
Do not ICE in `type-alias-impl-trait` with save-analysis FIxes #68621 Fixes #68750
2020-02-03track_caller test caller_location ctfe/rt equivalence wrt. fnptrsMazdak Farrokhzad-0/+38
2020-02-03Auto merge of #68778 - RalfJung:raw-addr-of, r=eddybbors-1/+58
add raw-addr-of variant to mir_raw_fat_ptr As suggested at https://github.com/rust-lang/rust/pull/48300#discussion_r372520388 r? @eddyb
2020-02-03Auto merge of #68772 - matthewjasper:relate-opt, r=davidtwcobors-0/+23
Avoid exponential behaviour when relating types When equating bound types we check subtyping in both directions. Since closures are invariant in their substs, we end up comparing the two types an exponential number of times. If there are no bound variables this isn't needed. Closes #68061
2020-02-03Auto merge of #68756 - JohnTitor:fix-ice-save-analysis-2, r=davidtwcobors-1/+3
Fix ICE with save-analysis Fixes #68749 It should be fine since it's the same way as `visit_expr`.
2020-02-03Auto merge of #68735 - JohnTitor:fix-ice-0202, r=estebankbors-0/+0
Use `next_point` to avoid ICE Fixes #68730 r? @estebank (I think you're familiar with that)
2020-02-02add raw-addr-of variant to mir_raw_fat_ptrRalf Jung-1/+58
2020-02-02Rollup merge of #68764 - Centril:self-semantic, r=petrochenkovMazdak Farrokhzad-17/+387
parser: syntactically allow `self` in all `fn` contexts Part of https://github.com/rust-lang/rust/pull/68728. `self` parameters are now *syntactically* allowed as the first parameter irrespective of item context (and in function pointers). Instead, semantic validation (`ast_validation`) is used. r? @petrochenkov
2020-02-02Rollup merge of #68763 - JohnTitor:do-not-sugg-dup-bounds, r=estebankMazdak Farrokhzad-13/+26
Do not suggest duplicate bounds Fixes #68205 Fixes #68695 r? @estebank
2020-02-02Rollup merge of #68760 - Tyg13:compile_fail_ui_test, r=CentrilMazdak Farrokhzad-194/+165
Issue error on `compile-fail` header in UI test Fixes #68732 r? @Centril
2020-02-02parser: address review comments re. `self`.Mazdak Farrokhzad-87/+107
2020-02-02Avoid exponential behaviour when relating typesMatthew Jasper-0/+23
2020-02-02Do not suggest duplicate boundsYuki Okushi-13/+26
2020-02-02parser: move restrictions re. `self` to `ast_validation`.Mazdak Farrokhzad-6/+356
2020-02-02pretty: print attrs in struct exprMazdak Farrokhzad-0/+16
2020-02-02compiletest: error if `compile-fail` header in ui test.Tyler Lanphear-194/+165
2020-02-02Auto merge of #68672 - jonas-schievink:dedup-witness, r=Zoxcbors-3/+3
Deduplicate types in the generator witness For the `await-call-tree` benchmark this often reduces the types inside the witness from 12 to 2.
2020-02-02Fix ICE with save-analysisYuki Okushi-1/+3
2020-02-02Catch more ICEsYuki Okushi-2/+5
2020-02-02Rollup merge of #68740 - JohnTitor:do-not-sugg-underscore, r=CentrilYuki Okushi-0/+30
Do not suggest things named underscore Fixes #68719 r? @estebank
2020-02-02Rollup merge of #68727 - ↵Yuki Okushi-6/+0
xfix:remove-comment-about-pretty-printer-in-format-tests, r=jonas-schievink Remove a comment about pretty printer in formatting tests rustc is now using rustfmt, not the old formatter.
2020-02-02Rollup merge of #68681 - bobrippling:fix-matched-angle-brackets, r=CentrilYuki Okushi-0/+46
Suggest path separator for single-colon typos This commit adds guidance for when a user means to type a path, but ends up typing a single colon, such as `<<Impl as T>:Ty>`. This change seemed pertinent as the current error message is particularly misleading, emitting `error: unmatched angle bracket`, despite the angle bracket being matched later on, leaving the user to track down the typo'd colon.
2020-02-01Basic run-pass tests for or-patternsDan Robertson-0/+151
Add some basic run-pass ui tests for or-patterns.
2020-02-01Update existing tests for or-patternsMatthew Jasper-370/+332
2020-02-01Remove or_patterns from INCOMPLETE_FEATURESMatthew Jasper-247/+154
2020-02-02Do not ICE in `type-alias-impl-trait` with save-analysisYuki Okushi-0/+25
2020-02-02Do not suggest things named underscoreYuki Okushi-0/+30
2020-02-01Improve wording and docs for qualified path recoveryRob Pilling-3/+3
2020-02-01Deduplicate generator interior typesJonas Schievink-3/+3
2020-02-01Auto merge of #68133 - Centril:slimmer-syntax, r=petrochenkovbors-4/+8
Slimmer syntax High-level summary of changes: - The `syntax::node_count` pass is moved into `rustc_ast_passes`. This works towards improving #65031 by making compiling `syntax` go faster. - The `syntax::{GLOBALS, with_globals, ..}` business is consolidated into `syntax::attr` for cleaner code and future possible improvements. - The pretty printer loses its dependency on `ParseSess`, opting to use `SourceMap` & friends directly instead. - Some drive by cleanup of `syntax::attr::HasAttr` happens. - Builtin attribute logic (`syntax::attr::builtin`) + `syntax::attr::allow_internal_unstable` is moved into a new `rustc_attr` crate. More logic from `syntax::attr` should be moved into that crate over time. This also means that `syntax` loses all mentions of `ParseSess`, which enables the next point. - The pretty printer `syntax::print` is moved into a new crate `rustc_ast_pretty`. - `rustc_session::node_id` is moved back as `syntax::node_id`. As a result, `syntax` gets to drop dependencies on `rustc_session` (and implicitly `rustc_target`), `rustc_error_codes`, and `rustc_errors`. Moreover `rustc_hir` gets to drop its dependency on `rustc_session` as well. At this point, these crates are mostly "pure data crates", which is approaching a desirable end state. - We should consider renaming `syntax` to `rustc_ast` now.
2020-02-01fix fallout in testsMazdak Farrokhzad-4/+8
2020-02-02Use `next_point` to avoid ICEYuki Okushi-0/+0
2020-02-01Auto merge of #68180 - ajpaverd:cfguard-rust, r=nagisabors-0/+30
Add support for Control Flow Guard on Windows. LLVM now supports Windows Control Flow Guard (CFG): https://github.com/llvm/llvm-project/commit/d157a9bc8ba1085cc4808c6941412322a7fd884e This patch adds support for rustc to emit the required LLVM module flags to enable CFG metadata (cfguard=1) or metadata and checks (cfguard=2). The LLVM module flags are ignored on unsupported targets and operating systems.
2020-02-01Remove a comment about pretty printer in formatting testsKonrad Borowski-6/+0
rustc is now using rustfmt, not the old formatter.
2020-02-01Auto merge of #68698 - tmiasko:catch-panic, r=Amanieubors-0/+26
Remove incorrect debug assertions from catch_unwind Previously the debug assertions in the implementation of catch_unwind used to verify consistency of the panic count by checking that the count is zero just before leaving the function. This incorrectly assumed that no panic was in progress when entering `catch_unwind`. Fixes #68696.
2020-01-31Auto merge of #68633 - JohnTitor:avoid-ice-in-diagnostics, r=estebankbors-5/+4
Avoid ICE in macro's diagnostics Fixes #68629 r? @estebank
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-427/+427
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-31Auto merge of #68685 - Dylan-DPC:rollup-rkbo05z, r=Dylan-DPCbors-9/+83
Rollup of 6 pull requests Successful merges: - #68588 (check_unsafety: more code reuse) - #68638 (Add missing links for cmp traits) - #68660 (Fix typo.) - #68669 (suggest adding space in accidental doc comments) - #68670 (clarify "incorrect issue" error) - #68680 (Add `#![doc(html_playground_url = ...)]` to alloc crate) Failed merges: r? @ghost
2020-01-31Rollup merge of #68670 - euclio:invalid-issue, r=estebankDylan DPC-9/+13
clarify "incorrect issue" error Changes the message to be more precise, shrinks the span and adds a label specifying why the `issue` field is incorrect.
2020-01-31Auto merge of #67878 - Others:opt-3, r=Mark-Simulacrumbors-1/+1
Change opt-level from 2 back to 3 In Cargo.toml, the opt-level for `release` and `bench` was overridden to be 2. This was to work around a problem with LLVM 7. However, rust no longer uses LLVM 7, so this is hopefully no longer needed? I tried a little bit to replicate the original problem, and could not. I think running this through CI is the best way to smoke test this :) Even if things break dramatically, the comment should be updated to reflect that things are still broken with LLVM 9. I'm just getting started playing with the compiler, so apologies if I've missed an obvious problem here. fixes #52378 (possibly relevant is the [current update to LLVM 10](https://github.com/rust-lang/rust/pull/67759))
2020-01-31Remove incorrect debug assertions from catch_unwindTomasz Miąsko-0/+26
Previously the debug assertions in the implementation of catch_unwind used to verify consistency of the panic count by checking that the count is zero just before leaving the function. This incorrectly assumed that no panic was in progress when entering `catch_unwind`.
2020-01-30Suggest path separator for single-colon typosRob Pilling-0/+46
This commit adds guidance for when a user means to type a path, but ends up typing a single colon, such as `<<Impl as T>:Ty>`. This change seemed pertinent as the current error message is particularly misleading, emitting `error: unmatched angle bracket`, despite the angle bracket being matched later on, leaving the user to track down the typo'd colon.
2020-01-30Change opt-level from 2 back to 3Gregor Peach-1/+1
In Cargo.toml, the opt-level for `release` and `bench` was overridden to be 2. This was to work around a problem with LLVM 7. However, rust no longer uses LLVM 7, so this is no longer needed. This creates a small compile time regression in MIR constant eval, so I've added a #[inline(always)] on the `step` function used in const eval Also creates a binary size increase in wasm-stringify-ints-small, so I've bumped the limit there.
2020-01-30clarify "incorrect issue" errorAndy Russell-9/+13