about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-04-08Split `fuzzy_provenance_casts` into lossy and fuzzy, feature gate and test itniluxv-0/+142
* split `fuzzy_provenance_casts` into a ptr2int and a int2ptr lint * feature gate both lints * update documentation to be more realistic short term * add tests for these lints
2022-04-08suggest adding a local for vector to fix borrowck errorsTakayuki Maeda-0/+78
2022-04-08Add test for empty doc comments with a backlineGuillaume Gomez-0/+22
2022-04-08Rollup merge of #95102 - compiler-errors:issue-94034-bug, r=jackh726Dylan DPC-0/+97
Add known-bug for #95034 Couldn't fix the issue, since I am no type theorist and inference variables in universes above U0 scare me. But I at least wanted to add a known-bug test for it. cc #95034 (does not fix)
2022-04-07Stabilize `derive_default_enum`Jacob Pratt-53/+29
2022-04-07Fix test caseMichael Howell-1/+1
2022-04-07Hide cross-crate doc-hidden assoc items in trait implsLeón Orell Valerian Liehr-0/+42
2022-04-07Auto merge of #95706 - petrochenkov:doclink4, r=GuillaumeGomezbors-0/+30
rustdoc: Early doc link resolution fixes and refactorings A subset of https://github.com/rust-lang/rust/pull/94857 that shouldn't cause perf regressions, but should fix some issues like https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/ICE.20in.20collect_intra_doc_links.2Ers https://github.com/rust-lang/rust/pull/95290 and improve performance in cases like https://github.com/rust-lang/rust/issues/95694.
2022-04-07[macro_metavar_expr] Add tests to ensure the feature requirementCaio-1/+117
2022-04-07Auto merge of #95760 - Dylan-DPC:rollup-uskzggh, r=Dylan-DPCbors-10/+55
Rollup of 4 pull requests Successful merges: - #95189 (Stop flagging unexpected inner attributes as outer ones in certain diagnostics) - #95752 (Regression test for #82866) - #95753 (Correct safety reasoning in `str::make_ascii_{lower,upper}case()`) - #95757 (Use gender neutral terms) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-04-07Rollup merge of #95752 - compiler-errors:issue-82866, r=Dylan-DPCDylan DPC-0/+23
Regression test for #82866 Saw that this issue was open when i was cleaning my old branch for #92237. I am also not opposed to not adding an extra test and just closing #82866. Fixes #82866
2022-04-07Rollup merge of #95189 - fmease:fix-issue-94340, r=estebankDylan DPC-10/+32
Stop flagging unexpected inner attributes as outer ones in certain diagnostics Fixes #94340. In the issue to-be-fixed I write that the general message _an inner attribute is not permitted in this context_ should be more specific noting that the “context” is the `include` macro. This, however, cannot be achieved without touching a lot of things and passing a flag to the `parse_expr` and `parse_item` calls in `expand_include`. This seems rather hacky to me. That's why I left it as it. `Span::from_expansion` does not apply either AFAIK. `@rustbot` label A-diagnostics T-compiler
2022-04-07Auto merge of #95678 - pietroalbini:pa-1.62.0-bootstrap, r=Mark-Simulacrumbors-20/+9
Bump bootstrap compiler to 1.61.0 beta This PR bumps the bootstrap compiler to the 1.61.0 beta. The first commit changes the stage0 compiler, the second commit applies the "mechanical" changes and the third and fourth commits apply changes explained in the relevant comments. r? `@Mark-Simulacrum`
2022-04-06regression test for #82866Michael Goulet-0/+23
2022-04-06don't report int/float ambiguity when we have previous errorsMichael Goulet-32/+29
2022-04-06only downgrade Error -> Ambiguous if type error is in predicateMichael Goulet-25/+23
2022-04-07Rollup merge of #95714 - KSBilodeau:master, r=Dylan-DPCDylan DPC-4/+20
Add test for issue #83474 Adds test for https://github.com/rust-lang/rust/issues/83474 - second attempt at PR https://github.com/rust-lang/rust/pull/91821 which was abandoned.
2022-04-06Fix unit struct/enum variant in destructuring assignmentMichael Goulet-0/+34
2022-04-07Rollup merge of #95738 - GuillaumeGomez:item-info-switch-to-span, r=jshaDylan DPC-1/+1
Switch item-info from div to span Following discussion in #95684. cc `@jsha` r? `@notriddle`
2022-04-07rustdoc: Early doc link resolution fixes and refactoringsVadim Petrochenkov-0/+30
2022-04-06Rollup merge of #95731 - oli-obk:lazy_tait_regression, r=compiler-errorsDylan DPC-0/+30
Check that all hidden types are the same and then deduplicate them. fixes #95538 This used to trigger a sanity check. Now we accept that there may be multiple places where a hidden type is constrained and we merge all of these at the end. Ideally we'd merge eagerly, but that is a larger refactoring that I don't want to put into a backport
2022-04-06Rollup merge of #95649 - ouz-a:mir-opt, r=oli-obkDylan DPC-4/+119
New mir-opt deref_separator This adds a new mir-opt that split certain derefs into this form: `let x = (*a.b).c;` to => `tmp = a.b; let x = (*tmp).c;` Huge thanks to ``@oli-obk`` for his patient mentoring.
2022-04-06Update rustdoc test following DOM changeGuillaume Gomez-1/+1
2022-04-06Stop flagging certain inner attrs as outer onesLeón Orell Valerian Liehr-10/+32
2022-04-06Check that all hidden types are the same and then deduplicate them.Oli Scherer-0/+30
2022-04-06Auto merge of #95723 - SparrowLii:const_goto, r=fee1-deadbors-118/+151
enhance `ConstGoto` mir-opt by moving up `StorageDead` statements From the `FIXME` in the implementation of `ConstGoto` miropt. We can move `StorageDead` statements up to the predecessor. This can expand the scope of application of this opt.
2022-04-06remove ~const Drop from rustdoc testPietro Albini-15/+5
2022-04-06bless testsPietro Albini-4/+4
2022-04-06enhance `ConstGoto` mir-opt by moving up `StorageDead` statementsSparrowLii-118/+151
2022-04-05Merge remote-tracking branch 'origin/master'kangarooCoder-544/+1205
2022-04-05Add test for issue rust-lang/rust#83474kangarooCoder-4/+20
2022-04-06Rollup merge of #95684 - GuillaumeGomez:fix-item-info-overflow, r=notriddleDylan DPC-0/+38
rustdoc: Fix item info display overflow I came across this issue when reading local `Iterator` docs (reproduced in this screenshot): ![Screenshot from 2022-04-05 17-45-13](https://user-images.githubusercontent.com/3050060/161798150-769ee838-4768-4df8-9d34-b02eb8104eed.png) The problem comes from the fact that `span` isn't `display: block` by default. Since `item-info` was already present on `<div>` in other places, I moved the last one to `div` as well. r? `@notriddle`
2022-04-05trivial cfg(bootstrap) changesPietro Albini-1/+0
2022-04-05Rollup merge of #95681 - petrochenkov:doclinkregr2, r=Dylan-DPCDylan DPC-0/+18
resolve: Fix resolution of empty paths passed from rustdoc Fixes https://github.com/rust-lang/rust/pull/95337#issuecomment-1088426179
2022-04-05Rollup merge of #95663 - notriddle:notriddle/unsafe-fn-closure, ↵Dylan DPC-10/+17
r=compiler-errors diagnostics: give a special note for unsafe fn / Fn/FnOnce/FnMut Fixes #90073
2022-04-05Rollup merge of #95591 - jackh726:nll-revisions-1, r=oli-obkDylan DPC-328/+588
Use revisions to track NLL test output (part 1) The idea here is 2 fold: 1) When we eventually do make NLL default on, that PR should be systematic in "delete revisions and corresponding error annotations" 2) This allows us to look at test NLL outputs in chunks. (Though, I've opted here not to "mark" these tests. There are some tests with NLL revisions *now* that will be missed. I expect we do a second pass once we have all the tests with NLL revisions; these tests should be easy enough to eyeball.) The actual review here should be "easy", but a bit tedious. I expect we should manually go through each test output and confirm it's okay. The majority of these are either: 1) Only span change (the one I see most common is highlighting an entire function call, rather than just the function name in that call) 2) "E0308 mismatched types" -> "lifetime does not live long enough" 3) "E0495 cannot infer an appropriate lifetime for lifetime parameter" -> "lifetime does not live long enough" 4) "E0312 lifetime of reference outlives lifetime of borrowed content" -> "lifetime does not live long enough" 5) "E0759 `XXX` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement" -> "lifetime does not live long enough" 6) "E0623 lifetime mismatch" -> "lifetime does not live long enough" Other than the now lack of an error code, most of these look fine (with most giving more helpful suggestions now). `rfc1623` output isn't great. cc ``@marmeladema`` if you want to look through these Let's r? ``@oli-obk`` since you've commented on the Zulip thread ;)
2022-04-05Rollup merge of #95585 - compiler-errors:ref-clone, r=estebankDylan DPC-0/+31
Explain why `&T` is cloned when `T` is not `Clone` Fixes #95535
2022-04-05kill temp earlyouz-a-3/+3
2022-04-05Improve debuginfo test coverage for simple statics.Cliff L. Biffle-7/+83
- Re-enabled basic-types-globals which has been disabled since 2018 - Updated its now-rotted assertions about GDB's output to pass - Rewrote header comment describing some previous state of GDB behavior that didn't match either the checked-in assertions _or_ the current behavior, and so I assume has just been wrong for some time. - Copy-pasta'd the test into a version that uses LTO to check for regression on #90357, because I don't see a way to matrix the same test into several build configurations.
2022-04-05diagnostics: tweak error message to give more rationale to unsafe FnMichael Howell-17/+17
2022-04-05Auto merge of #94527 - oli-obk:undef_scalars, r=nagisa,erikdesjardinbors-151/+191
Let CTFE to handle partially uninitialized unions without marking the entire value as uninitialized. follow up to #94411 To fix https://github.com/rust-lang/rust/issues/69488 and by extension fix https://github.com/rust-lang/rust/issues/94371, we should stop treating types like `MaybeUninit<usize>` as something that the `Scalar` type in the interpreter engine can represent. So we add a new field to `abi::Primitive` that records whether the primitive is nested in a union cc `@RalfJung` r? `@ghost`
2022-04-05Explain why `&T` is cloned when `T` is not `Clone`Michael Goulet-0/+31
2022-04-05Add GUI test to ensure that the width of the item-info does not overflow its ↵Guillaume Gomez-0/+38
parent
2022-04-05unboxed-closures and type-alias-impl-trait nll revisionsJack Huey-20/+42
2022-04-05underscore-lifetime nll revisionsJack Huey-7/+19
2022-04-05More nll revisionsJack Huey-223/+380
2022-04-05Move some tests with compare-mode=nll output to revisionsJack Huey-78/+147
2022-04-05Rollup merge of #95654 - notriddle:notriddle/issue-95616, r=davidtwcoDylan DPC-55/+90
diagnostics: use correct span for const generics Fixes #95616
2022-04-05Rollup merge of #95525 - ohno418:suggest-derivable-trait-E0277, ↵Dylan DPC-0/+270
r=compiler-errors Suggest derivable trait on E0277 error Closes https://github.com/rust-lang/rust/issues/95099 .
2022-04-05resolve: Fix resolution of empty paths passed from rustdocVadim Petrochenkov-0/+18