about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-10-15Test basic hygiene for `macro_rules` produced by transparent macrosVadim Petrochenkov-0/+74
2019-10-15Stabilize proc macros generating `macro_rules` itemsVadim Petrochenkov-110/+4
2019-10-14Rollup merge of #65415 - petrochenkov:rmtest, r=varkorTyler Mandry-16/+0
Remove an outdated test output file It was accidentally introduced during some rebase, but it's no longer necessary and `--bless` removes it, but it doesn't fail testing.
2019-10-14Rollup merge of #65410 - Centril:intersection-pat-recover, r=davidtwco,varkorTyler Mandry-0/+73
syntax: add parser recovery for intersection- / and-patterns `p1 @ p2` Fixes https://github.com/rust-lang/rust/issues/65400. The recovery comes in two flavors: 1. We know that `p2` is a binding so we can invert as `p2 @ p1`: ```rust error: pattern on wrong side of `@` --> $DIR/intersection-patterns.rs:13:9 | LL | Some(x) @ y => {} | -------^^^- | | | | | binding on the right, should be to the left | pattern on the left, should be to the right | help: switch the order: `y @ Some(x)` ``` 2. Otherwise we emit a generic diagnostic for the lack of support for intersection patterns: ```rust error: left-hand side of `@` must be a binding --> $DIR/intersection-patterns.rs:23:9 | LL | Some(x) @ Some(y) => {} | -------^^^------- | | | | | also a pattern | interpreted as a pattern, not a binding | = note: bindings are `x`, `mut x`, `ref x`, and `ref mut x` ``` For more on and-patterns, see e.g. https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/pattern-matching#and-pattern. r? @davidtwco cc @varkor @lzutao
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-32/+32
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-14Rollup merge of #65365 - skinny121:const-args-metadata, r=varkorTyler Mandry-0/+52
Include const generic arguments in metadata Fixes #64707 Fixes #61624 Fixes #64730 r? @varkor
2019-10-14Tweak heuristics for less noiseEsteban Küber-7/+7
2019-10-14Use heuristics for capitalization warning in suggestionsEsteban Küber-14/+14
2019-10-14Remove an outdated test output fileVadim Petrochenkov-16/+0
2019-10-15Include const generic arguments in metadata.ben-0/+52
2019-10-14pprust: `p1@p2` -> `p1 @ p2`Mazdak Farrokhzad-4/+4
2019-10-14recover_intersection_pat: adjust wordingMazdak Farrokhzad-10/+10
2019-10-14Auto merge of #64987 - oli-obk:code_reuse_prevents_bugs, r=eddybbors-0/+20
Compute the layout of uninhabited structs fixes #64506 r? @eddyb
2019-10-14syntax: add test for intersection pattern parser recoveryMazdak Farrokhzad-0/+73
2019-10-14Rollup merge of #65395 - JohnTitor:add-tests, r=CentrilMazdak Farrokhzad-0/+131
Add some tests for fixed ICEs Fixes #44153 (from 1.23.0) Fixes #47486 (from 1.36.0) Fixes #48010 (from 1.38.0) Fixes #48027 (from nightly) Fixes #48638 (from nightly)
2019-10-14Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,CentrilMazdak Farrokhzad-257/+257
Print lifetimes with backticks Fixes #65287 r? @varkor
2019-10-14Rollup merge of #65215 - JohnTitor:long-explanation-e0697, r=GuillaumeGomezMazdak Farrokhzad-0/+1
Add long error explanation for E0697 Part of #61137 r? @GuillaumeGomez
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-53/+53
2019-10-14Add test for issue-48638Yuki Okushi-0/+21
2019-10-14Add test for issue-48027Yuki Okushi-0/+29
2019-10-14Add test for issue-48010Yuki Okushi-0/+23
2019-10-14Add test for issue-47486Yuki Okushi-0/+23
2019-10-14Add test for issue-44153Yuki Okushi-0/+35
2019-10-13Rollup merge of #65369 - tmiasko:sanitizers-keep-names, r=varkorMazdak Farrokhzad-0/+3
Don't discard value names when using address or memory sanitizer The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13Rollup merge of #65347 - RalfJung:unwind-abort-rust, r=varkorMazdak Farrokhzad-3/+27
Fix #[unwind(abort)] with Rust ABI Fixes #63883.
2019-10-13Rollup merge of #65346 - RalfJung:nounwind-tests, r=nagisaMazdak Farrokhzad-25/+60
nounwind tests and cleanup This is a follow-up to @pnkfelix' https://github.com/rust-lang/rust/pull/65020. In particular it adds some tests as @nagisa asked. It also does a cleanup that the original PR omitted to reduce backporting risks. I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
2019-10-13Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichtonMazdak Farrokhzad-1/+1
Split non-CAS atomic support off into target_has_atomic_load_store This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s: * `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations). * ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS). cc #32976 r? @alexcrichton
2019-10-13Rollup merge of #65320 - memoryruins:const_err, r=oli-obkMazdak Farrokhzad-0/+38
Report `CONST_ERR` lint in external macros fixes #65300 fixes #61058 r? @oli-obk
2019-10-13Rollup merge of #65250 - da-x:ctor-in-error-msgs, r=petrochenkovMazdak Farrokhzad-173/+173
resolve: fix error title regarding private constructors One reason is that constructors can be private while their types can be public. Idea credit to @petrochenkov, discussed at #65153
2019-10-13Rollup merge of #65248 - estebank:mention-if-let, r=cramertjMazdak Farrokhzad-0/+142
Suggest `if let` on `let` refutable binding Fix #58385.
2019-10-13Don't discard value names when using address or memory sanitizerTomasz Miąsko-0/+3
The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13Auto merge of #65099 - pnkfelix:issue-63154-needed-more-normalize, r=nagisabors-0/+34
MIR typeck needed more normalize Add some missing normalization calls (@nagisa [was right](https://github.com/rust-lang/rust/issues/63154#issuecomment-517305589)). Fix #63154
2019-10-12make tests more robustRalf Jung-2/+2
2019-10-12test unwind(abort) with Rust ABIRalf Jung-3/+27
2019-10-12some typographyRalf Jung-2/+2
2019-10-12also (properly) test nounwind on function definitionsRalf Jung-6/+19
2019-10-12update test for nounwind on FFI importsRalf Jung-19/+41
2019-10-12Auto merge of #65190 - GuillaumeGomez:dont-pass-doctest-feature-by-default, ↵bors-0/+21
r=Mark-Simulacrum Don't pass doctest feature by default As asked in https://github.com/rust-lang/rust/pull/63803#issuecomment-539064434. r? @QuietMisdreavus
2019-10-12Auto merge of #65322 - tmandry:rollup-frr651r, r=tmandrybors-45/+399
Rollup of 15 pull requests Successful merges: - #64337 (libstd: Fix typos in doc) - #64986 (Function pointers as const generic arguments) - #65048 (Added doc about behavior of extend on HashMap) - #65191 (Add some regression tests) - #65200 (Add ?Sized bound to a supertrait listing in E0038 error documentation) - #65205 (Add long error explanation for E0568) - #65220 (Update LLVM for Emscripten exception handling support) - #65263 (Deduplicate is_{freeze,copy,sized}_raw) - #65266 (Mark Path::join as must_use) - #65276 (Don't cc rust-lang/compiler for toolstate changes) - #65277 (Query generator kind for error reporting) - #65283 (stability: Do not use `buffer_lint` after lowering to HIR) - #65289 (Fix suggested bound addition diagnostic) - #65310 (deriving: avoid dummy Span on an artificial `type_ident` path) - #65321 (Remove painful test that is not pulling its weight) Failed merges: r? @ghost
2019-10-12Auto merge of #65020 - ↵bors-0/+148
pnkfelix:targetted-fix-for-always-marking-rust-abi-unwind-issue-64655, r=alexcrichton Always mark rust and rust-call abi's as unwind PR #63909 identified a bug that had been injected by PR #55982. As discussed on https://github.com/rust-lang/rust/issues/64655#issuecomment-537517428 , we started marking extern items as nounwind, *even* extern items that said they were using "Rust" or "rust-call" ABI. This is a more targeted variant of PR #63909 that fixes the above bug. Fix #64655 ---- I personally suspect we will want PR #63909 to land in the long-term But: * it is not certain that PR #63909 *will* land, * more importantly, PR #63909 almost certainly will not be backported to beta/stable. The identified bug was more severe than I think anyone realized (apart from perhaps @gnzlbg, as noted [here](https://github.com/rust-lang/rust/pull/63909#issuecomment-524818838)). Thus, I was motivated to write this PR, which fixes *just* the issue with extern rust/rust-call functions, and deliberately avoids injecting further deviation from current behavior (you can see further notes on this in the comments of the code added here).
2019-10-11Rollup merge of #65321 - Mark-Simulacrum:remove-linker-no-utf8-test, ↵Tyler Mandry-39/+0
r=nikomatsakis Remove painful test that is not pulling its weight Research suggests that we are not properly testing this case anyway, and even if we were, it is unlikely that we will regress here -- or, perhaps more accurately, if we do, I am uncertain that we care too much. It definitely seems like an edge case, and one that is particularly unlikely to occur as time goes on. Fixes https://github.com/rust-lang/rust/issues/63520
2019-10-11Rollup merge of #65310 - da-x:issue-56195, r=petrochenkovTyler Mandry-0/+6
deriving: avoid dummy Span on an artificial `type_ident` path The dummy Span pointed to the beginning of the source file instead to where the `#[derive]` is located. Later, it tripped the `in_derive_expansion(span)` check at `src/librustc/middle/stability.rs`, causing a span-less deprecation warning to be emitted. Fixes #56195, Fixes #55417.
2019-10-11Rollup merge of #65289 - varkor:issue-65284, r=estebankTyler Mandry-0/+26
Fix suggested bound addition diagnostic Fixes #65284.
2019-10-11Rollup merge of #65283 - petrochenkov:softstab2, r=estebankTyler Mandry-2/+15
stability: Do not use `buffer_lint` after lowering to HIR Fixes https://github.com/rust-lang/rust/issues/65253
2019-10-11Rollup merge of #65277 - csmoe:fix-move, r=estebankTyler Mandry-1/+1
Query generator kind for error reporting Fixes https://github.com/rust-lang/rust/pull/65166#discussion_r333114545 r? @estebank cc @cramertj
2019-10-11Rollup merge of #65205 - GuillaumeGomez:long-err-explanation-E0568, r=estebankTyler Mandry-2/+5
Add long error explanation for E0568 Part of #61137.
2019-10-11Rollup merge of #65191 - varkor:const-generics-test-cases, r=nikomatsakisTyler Mandry-0/+142
Add some regression tests - Add a test for #62187. - Clean up the directory structure in `src/test/ui/const-generics` - Closes #64792. - Closes #57399. - Closes #57271.
2019-10-11Rollup merge of #64986 - skinny121:fn-ptr-const-generics, r=varkorTyler Mandry-1/+204
Function pointers as const generic arguments Makes function pointers as const generic arguments usable. Fixes #62395 r? @varkor
2019-10-11Remove painful test that is not pulling its weightMark Rousskov-39/+0
Research suggests that we are not properly testing this case anyway, and even if we were, it is unlikely that we will regress here -- or, perhaps more accurately, if we do, I am uncertain that we care too much. It definitely seems like an edge case, and one that is particularly unlikely to occur as time goes on.
2019-10-11Add regression test for CONST_ERR lints in extern macrosmemoryruins-0/+38