about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2020-03-08Rollup merge of #69800 - tmiasko:address-g, r=nikicMazdak Farrokhzad-3/+2
Compile address sanitizer test with debuginfo This makes error-pattern to match regardless of current configuration of `rust.debuginfo-level-tests` in `config.toml`.
2020-03-08Rollup merge of #69734 - tmiasko:di-enumerator, r=ecstatic-morseMazdak Farrokhzad-0/+27
Change DIBuilderCreateEnumerator signature to match LLVM 9 * Change DIBuilderCreateEnumerator signature to match LLVM 9 C API. * Use provided is unsigned flag when emitting enumerators.
2020-03-08Rollup merge of #69120 - spunit262:invalid-sugar-suggest, r=matthewjasperMazdak Farrokhzad-8/+2
Don't give invalid suggestion on desugared span.
2020-03-08Rollup merge of #69646 - RalfJung:layout-visitor, r=eddybMazdak Farrokhzad-228/+305
Miri visitor: detect primitive types based on type, not layout (also, more tests) I also converted the union-based transmutes to use `mem::transmute` for increased readability. r? @eddyb @oli-obk
2020-03-08fix type size mismatch on 32bitRalf Jung-20/+19
2020-03-08Rollup merge of #69810 - ↵Mazdak Farrokhzad-0/+48
thekuom:test/67523-dynamic-semantics-bindings-after-at, r=Centril test(bindings_after_at): add dynamic drop tests for bindings_after_at Fixes https://github.com/rust-lang/rust/issues/67523. Working towards https://github.com/rust-lang/rust/issues/65490.
2020-03-08Rollup merge of #69805 - petrochenkov:importname, r=CentrilMazdak Farrokhzad-2/+2
resolve: Modernize some naming `ImportDirective` -> `Import` `ImportDirectiveSubclass` -> `ImportKind` `ImportKind::SingleImport` -> `ImportKind::Single` `ImportKind::GlobImport` -> `ImportKind::Glob`
2020-03-08Rollup merge of #69599 - Centril:typeck-tweak-wording, r=davidtwcoMazdak Farrokhzad-8/+8
check_binding_alt_eq_ty: improve precision wrt. `if let` Follow up to https://github.com/rust-lang/rust/pull/69452 -- this tweaks the `check_binding_alt_eq_ty` logic wrt. wording so that `if let` doesn't include "in this arm" (because there can only ever be one arm). r? @estebank
2020-03-08Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-SimulacrumMazdak Farrokhzad-13/+0
Clean up unstable book - #58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f8a60ac16fdc00f4b2e36e1a5db8b78295 - Make `rustc_attrs` tracking issue "None"
2020-03-08Rollup merge of #69548 - LeSeulArtichaut:assert-errors, r=petrochenkovMazdak Farrokhzad-13/+7
Turn trailing tokens in `assert!()` into hard errors I didn't have time to build the compiler and thus edited the tests manually, I hope it will still pass. Closes #69531 r? @Centril do you want to queue the Crater experiment?
2020-03-08Rollup merge of #69422 - JohnTitor:remove-unwrap, r=XanewokMazdak Farrokhzad-33/+38
Remove use of `unwrap()` from save-analysis Fix #69409, fix #69416
2020-03-07test(bindings_after_at): add dynamic drop tests for bindings_after_atMatthew Kuo-0/+48
2020-03-07resolve: `directive` -> `import`Vadim Petrochenkov-2/+2
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-21/+21
fix various typos
2020-03-07Rollup merge of #69708 - estebank:tiny, r=petrochenkovMazdak Farrokhzad-8/+2
On mismatched delimiters, only point at empty blocks that are in the same line We point at empty blocks when we have mismatched braces to detect cases where editors auto insert `}` after writing `{`. Gate this to only the case where the entire span is in the same line so we never point at explicitly empty blocks.
2020-03-07Rollup merge of #69687 - Centril:bm-inconsistent-wording, r=estebankMazdak Farrokhzad-72/+73
resolve, inconsistent binding mode: tweak wording Now that we can have e.g. `let Ok(x) | Err(x) = res;`, it's no longer appropriate to refer to "the same *match arm*", so let's tweak the wording. r? @estebank
2020-03-07Rollup merge of #69667 - JohnTitor:no-debug, r=nikomatsakisMazdak Farrokhzad-95/+11
Remove the `no_debug` feature Context: https://github.com/rust-lang/rust/issues/29721#issuecomment-367642779 r? @nikomatsakis
2020-03-07Compile address sanitizer test with debuginfoTomasz Miąsko-3/+2
This makes error-pattern to match regardless of current configuration of `rust.debuginfo-level-tests` in `config.toml`.
2020-03-07Rollup merge of #69727 - JohnTitor:sugg-unwrap, r=estebankMazdak Farrokhzad-0/+37
Avoid using `unwrap()` in suggestions Fixes #69725 r? @estebank
2020-03-07Rollup merge of #69690 - thekuom:test/67311-extend-bindings-after-at-tests, ↵Mazdak Farrokhzad-0/+307
r=Centril test(pattern): add tests for combinations of pattern features Reference issue #67311 Tests combinations of the following pattern features: - bindings_after_at - or_patterns - slice_patterns - box_patterns r? @Centril
2020-03-07Rollup merge of #68985 - daboross:fix-35813, r=CentrilMazdak Farrokhzad-10/+613
Parse & reject postfix operators after casts This adds an explicit error messages for when parsing `x as Type[0]` or similar expressions. Our add an extra parse case for parsing any postfix operator (dot, indexing, method calls, await) that triggers directly after parsing `as` expressions. My friend and I worked on this together, but they're still deciding on a github username and thus I'm submitting this for both of us. It will immediately error out, but will also provide the rest of the parser with a useful parse tree to deal with. There's one decision we made in how this produces the parse tree. In the situation `&x as T[0]`, one could imagine this parsing as either `&((x as T)[0])` or `((&x) as T)[0]`. We chose the latter for ease of implementation, and as it seemed the most intuitive. Feedback welcome! This is our first change to the parser section, and it might be completely horrible. Fixes #35813.
2020-03-07Rollup merge of #67741 - estebank:point-at-pat-def, r=CentrilMazdak Farrokhzad-4/+68
When encountering an Item in a pat context, point at the item def ``` error[E0308]: mismatched types --> $DIR/const-in-struct-pat.rs:8:17 | LL | struct foo; | ----------- `foo` defined here ... LL | let Thing { foo } = t; | ^^^ expected struct `std::string::String`, found struct `foo` | = note: `foo` is interpreted as a unit struct, not a new binding help: you can bind the struct field to a different name | LL | let Thing { foo: other_foo } = t; | ^^^^^^^^^^^^^^ ``` ``` error[E0308]: mismatched types --> $DIR/const.rs:14:9 | LL | const FOO: Foo = Foo{bar: 5}; | ----------------------------- constant defined here ... LL | FOO => {}, | ^^^ | | | expected `&Foo`, found struct `Foo` | `FOO` is interpreted as a constant, not a new binding | help: use different name to introduce a new binding: `other_foo` ``` Fix #55631, fix #48062, cc #42876.
2020-03-06When encountering an Item in a pat context, point at the item defEsteban Küber-4/+68
2020-03-06please tidyRalf Jung-13/+14
2020-03-06better error messages for invalid boxes (and a few more tests)Ralf Jung-17/+39
2020-03-06test some more kinds of enums with uninhabited variantsRalf Jung-11/+77
2020-03-06test that we validate boxesRalf Jung-4/+49
2020-03-06const validation ub tests: use transmute instead of unionsRalf Jung-221/+165
2020-03-06miri value visitor: detect primitives by type, not layoutRalf Jung-5/+5
2020-03-06Turn trailing tokens in `assert!()` into hard errorsLeSeulArtichaut-13/+7
2020-03-07Add a regression testYuki Okushi-0/+37
2020-03-06bless testsMatthias Krüger-8/+8
2020-03-06Auto merge of #69753 - pnkfelix:issue-69191-ice-on-uninhabited-enum-field, r=olibors-0/+91
Do not ICE when matching an uninhabited enum's field Fix #69191
2020-03-06fix various typosMatthias Krüger-13/+13
2020-03-06Added oli's multivariant test case (alpha renaming the enum name itself).Felix S. Klock II-3/+63
(And added Ralf's suggested test.) Added my own three-variant multi-variant as well.
2020-03-06Auto merge of #69614 - estebank:ice-age, r=davidtwcobors-0/+41
`delay_span_bug` when codegen cannot select obligation Fix #69602, introduced in #60126 by letting the compiler continue past type checking after encountering errors.
2020-03-05Fix #69191Felix S. Klock II-0/+31
2020-03-05debuginfo: Use is unsigned flag when emitting enumeratorsTomasz Miąsko-0/+27
2020-03-05Bumped version number for const_eval_limit in active.rsChristoph Schmidler-14/+38
and renamed 'recursion_limit' in limits.rs to simple 'limit' because it does handle other limits too.
2020-03-05Opt out of CTFE if the 'const_eval_limit' is set to 0Christoph Schmidler-1/+9
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-20/+35
rename feature to const_eval_limit
2020-03-05Disable CTFE if const_limit was set to 0, otherwise use the value set, which ↵Christoph Schmidler-1/+33
defaults to 1_000_000
2020-03-05Prepare const_limit feature gate and attributeChristoph Schmidler-0/+24
2020-03-04On mismatched delimiters, only point at empty blocks that are in the same lineEsteban Küber-8/+2
2020-03-04fix tidy errorMatthew Kuo-1/+2
2020-03-04test(pattern): harden tests for or-patterns with slice-patternsMatthew Kuo-4/+27
Some of the nested OR paths were being missed
2020-03-04test(pattern): add tests for combinations of pattern featuresMatthew Kuo-0/+283
Reference issue #67311 Tests combinations of the following pattern features: - bindings_after_at - or_patterns - slice_patterns - box_patterns
2020-03-04resolve, inconsistent binding mode: tweak wording.Mazdak Farrokhzad-72/+73
2020-03-03Auto merge of #69678 - Dylan-DPC:rollup-yoaueud, r=Dylan-DPCbors-2/+29
Rollup of 6 pull requests Successful merges: - #69565 (miri engine: turn some debug_assert into assert) - #69621 (use question mark operator in a few places.) - #69650 (cleanup more iterator usages (and other things)) - #69653 (use conditions directly) - #69665 (Invoke OptimizerLastEPCallbacks in PreLinkThinLTO) - #69670 (Add explanation for E0379) Failed merges: r? @ghost
2020-03-03Rollup merge of #69665 - tmiasko:new-pass-manager-thin-lto-opt, r=nikicDylan DPC-2/+29
Invoke OptimizerLastEPCallbacks in PreLinkThinLTO The default ThinLTO pre-link pipeline does not include optimizer last extension points. Thus, when using the new LLVM pass manager & ThinLTO & sanitizers on any opt-level different from zero, the sanitizer function passes would be omitted from the pipeline. Add optimizer last extensions points manually to the pipeline, but guard registration with stage check in the case this behaviour changes in the future.