summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-08-08Add regression test commentNoah Lev-0/+2
2022-08-08Synthetize a trait ref when none is available.Camille GILLOT-1/+3
2022-08-08Avoid ICE in rustdoc.Camille GILLOT-0/+17
2022-08-08rustdoc: do not mark the contents of a skipped module as inlinedMichael Howell-0/+27
2022-08-05fixup rustdoc testMark Rousskov-2/+2
2022-08-05rustdoc: avoid inlining foreigns with duplicate namesMichael Howell-0/+20
2022-08-05rustdoc: avoid inlining modules with duplicate namesMichael Howell-0/+21
Fixes rust-lang/rust#99734
2022-08-05Move write! and writeln! temporaries test to check-failDavid Tolnay-16/+93
2022-08-05Regression in issue 99684 fixedDavid Tolnay-31/+1
2022-08-05Add regression test minimized from async-std writeDavid Tolnay-0/+67
2022-08-05Fix backwards-compatibility check for tests with `+whole-archive`Daniel Sommermann-3/+30
Fixes #100066
2022-07-30allow numbers with provenance within CTFE executionRalf Jung-464/+359
This effectively reverts https://github.com/rust-lang/rust/pull/97684 for CTFE
2022-07-21beta backport of arg mismatch bugfixMichael Goulet-16/+49
2022-07-21Rollup merge of #99344 - ↵Dylan DPC-0/+70
notriddle:notriddle/multiple-macro-rules-w-same-name, r=GuillaumeGomez rustdoc: avoid inlining items with duplicate `(type, name)` Fixes #99221
2022-07-21Rollup merge of #99435 - CAD97:revert-dollar-dollar-crate, r=Mark-SimulacrumMatthias Krüger-19/+55
Revert "Stabilize $$ in Rust 1.63.0" This mechanically reverts commit 9edaa76adce4de737db54194eb13d6c298827b37, the one commit from #95860. https://github.com/rust-lang/rust/issues/99035; the behavior of `$$crate` is potentially unexpected and not ready to be stabilized. https://github.com/rust-lang/rust/pull/99193 attempts to forbid `$$crate` without also destabilizing `$$` more generally. `@rustbot` modify labels +T-compiler +T-lang +P-medium +beta-nominated +relnotes (applying the labels I think are accurate from the issue and alternative partial revert) cc `@Mark-Simulacrum`
2022-07-15Handle fresh lifetimes on bare trait objects.Camille GILLOT-71/+2
2022-07-15Add known bug test.Camille GILLOT-0/+118
2022-07-15promote placeholder bounds to 'static obligationsNiko Matsakis-1/+52
In NLL, when we are promoting a bound out from a closure, if we have a requirement that `T: 'a` where `'a` is in a higher universe, we were previously ignoring that, which is totally wrong. We should be promoting those constraints to `'static`, since universes are not expressible across closure boundaries.
2022-07-15Fix ui-fulldep testChris Denton-6/+11
2022-07-15Tests for unsound Windows file methodsChris Denton-0/+76
2022-07-15Fix sized check ICE in intrisicckMichael Goulet-0/+45
2022-07-09Fix tests after beta backportMark Rousskov-2/+2
2022-07-09Remove type flag based opaque type workaroundOli Scherer-173/+30
2022-07-09Make `evaluate_obligation` not succeed unconditionally if it registered new ↵Oli Scherer-2/+4
hidden types for opaque types
2022-07-09pessimistically treat all function items as containing an opaque typeOli Scherer-4/+58
2022-07-09rustdoc: filter '_ lifetimes from ty::PolyTraitRefMichael Howell-0/+22
Fixes #98697
2022-07-09Add link to issue for src/test/incremental/async-lifetimes.rsMichael Woerister-0/+2
2022-07-09Add regression test.Camille GILLOT-0/+17
2022-06-24Auto merge of #98447 - JohnTitor:rollup-pponoo3, r=JohnTitorbors-27/+107
Rollup of 9 pull requests Successful merges: - #91264 (Add macro support in jump to definition feature) - #96955 (Remove (transitive) reliance on sorting by DefId in pretty-printer) - #97633 (Session object: Set OS/ABI) - #98039 (Fix `panic` message for `BTreeSet`'s `range` API and document `panic` cases) - #98214 (rustc_target: Remove some redundant target properties) - #98280 (Improve suggestion for calling fn-like expr on type mismatch) - #98394 (Fixup missing renames from `#[main]` to `#[rustc_main]`) - #98411 (Update tendril) - #98419 (Remove excess rib while resolving closures) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-06-24Rollup merge of #98280 - compiler-errors:better-call-closure-on-type-err, ↵Yuki Okushi-11/+66
r=estebank Improve suggestion for calling fn-like expr on type mismatch 1.) Suggest calling values of with RPIT types (and probably TAIT) when we expect `Ty` and have `impl Fn() -> Ty` 2.) Suggest calling closures even when they're not assigned to a local variable first 3.) Drive-by fix of a pretty-printing bug (`impl Fn()-> Ty` => `impl Fn() -> Ty`) r? ```@estebank```
2022-06-24Rollup merge of #96955 - Aaron1011:pretty-print-sort, r=petrochenkovYuki Okushi-16/+16
Remove (transitive) reliance on sorting by DefId in pretty-printer This moves us a step closer to removing the `PartialOrd/`Ord` impls for `DefId`. See #90317
2022-06-24Rollup merge of #91264 - GuillaumeGomez:macro-jump-to-def, r=jshaYuki Okushi-0/+25
Add macro support in jump to definition feature Fixes #91174. To do so, I check if the span comes from an expansion, and if so, I infer the original macro `DefId` or `Span` depending if it's a defined in the current crate or not. There is one limitation due to macro expansion though: ```rust macro_rules! yolo { () => {}} fn foo() { yolo!(); } ``` In `foo`, `yolo!` won't be linked because after expansion, it is replaced by nothing (which seems logical). So I can't get an item from the `Visitor` from which I could tell if its `Span` comes from an expansion. I added a test for this specific limitation alongside others. Demo: https://rustdoc.crud.net/imperio/macro-jump-to-def/src/foo/check-source-code-urls-to-def-std.rs.html As for the empty macro issue that cannot create a jump to definition, you can see it [here](https://rustdoc.crud.net/imperio/macro-jump-to-def/src/foo/check-source-code-urls-to-def-std.rs.html#35). r? ```@jyn514```
2022-06-24Auto merge of #98109 - nikomatsakis:issue-98095, r=jackh726bors-146/+280
fix universes in the NLL type tests In the NLL code, we were not accommodating universes in the `type_test` logic. Fixes #98095. r? `@compiler-errors` This breaks some tests, however, so the purpose of this branch is more explanatory and perhaps to do a crater run.
2022-06-23Rollup merge of #98390 - GuillaumeGomez:keyword-rustdoc-json, r=notriddleMichael Goulet-0/+21
Fixes handling of keywords in rustdoc json output Fixes #98002. Instead of panicking, we just filter them out. cc ```@matthiaskrgr``` r? ```@notriddle```
2022-06-23Rollup merge of #98365 - jyn514:improve-obligation-errors-review-comments, ↵Michael Goulet-8/+8
r=eholk Address review comments from #98259 It got approved so fast I didn't have time to make changes xD r? ``@eholk``
2022-06-23Rollup merge of #98353 - beetrees:builtin-macros-cfg-diag, r=davidtwcoMichael Goulet-1/+10
Migrate two diagnostics from the `rustc_builtin_macros` crate Migrate two diagnostics to use the struct derive and be translatable. r? ```@davidtwco```
2022-06-23Rollup merge of #98310 - jsha:defer-source-sidebar, r=GuillaumeGomezMichael Goulet-6/+6
rustdoc: optimize loading of source sidebar The source sidebar has a setting to remember whether it should be open or closed. Previously, this setting was handled in source-script.js, which is loaded with `defer`, meaning it is often run after the document is rendered. Since CSS renders the source sidebar as closed by default, changing this after the initial render results in a relayout. Instead, handle the setting in storage.js, which is the first script to load and is the only script that blocks render. This avoids a relayout and means navigating between files with the sidebar open is faster. Demo: https://rustdoc.crud.net/jsha/defer-source-sidebar/src/alloc/ffi/c_str.rs.html r? ````@GuillaumeGomez````
2022-06-23Rollup merge of #98283 - TaKO8Ki:point-at-private-fields-in-struct-literal, ↵Michael Goulet-6/+45
r=compiler-errors Point at private fields in struct literal closes #95872
2022-06-23Rollup merge of #98269 - compiler-errors:provide-more-segment-res, ↵Michael Goulet-115/+115
r=petrochenkov Provide a `PathSegment.res` in more cases I find that in many cases, the `res` associated with a `PathSegment` is `Res::Err` even though the path was fully resolved. A few diagnostics use this `res` and their error messages suffer because of the lack of resolved segment. This fixes it a bit, but it's obviously not complete and I'm not exactly sure if it's correct.
2022-06-23Rollup merge of #98259 - jyn514:improve-obligation-errors, r=estebankMichael Goulet-60/+296
Greatly improve error reporting for futures and generators in `note_obligation_cause_code` Most futures don't go through this code path, because they're caught by `maybe_note_obligation_cause_for_async_await`. But all generators do, and `maybe_note` is imperfect and doesn't catch all futures. Improve the error message for those it misses. At some point, we may want to consider unifying this with the code for `maybe_note_async_await`, so that `async_await` notes all parent constraints, and `note_obligation` can point to yield points. But both functions are quite complicated, and it's not clear to me how to combine them; this seems like a good incremental improvement. Helps with https://github.com/rust-lang/rust/issues/97332. r? ``@estebank`` cc ``@eholk`` ``@compiler-errors``
2022-06-23Rollup merge of #98184 - compiler-errors:elided-lifetime-in-impl-nll, r=cjgillotMichael Goulet-0/+69
Give name if anonymous region appears in impl signature Fixes #98170 We probably should remove the two unwraps in [`report_general_error`](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_borrowck/diagnostics/region_errors.rs.html#683-685), but I have no idea what to provide if those regions are missing, so I've kept those in. Let me know if I should try harder to remove those.
2022-06-23add regression tests found in craterNiko Matsakis-1/+69
2022-06-23normalize if-eq bounds before testingNiko Matsakis-0/+37
Hat-tip: aliemjay
2022-06-22Remove (transitive) reliance on sorting by DefId in pretty-printerAaron Hill-16/+16
This moves us a step closer to removing the `PartialOrd/`Ord` impls for `DefId`. See #90317
2022-06-22Add test for keywords in rustdoc JSON outputGuillaume Gomez-0/+21
2022-06-22Auto merge of #98279 - cjgillot:all-fresh-nofn, r=petrochenkovbors-36/+46
Create elided lifetime parameters for function-like types Split from https://github.com/rust-lang/rust/pull/97720 This PR refactor lifetime generic parameters in bare function types and parenthesized traits to introduce the additional required lifetimes as fresh parameters in a `for<>` bound. This PR does the same to lifetimes appearing in closure signatures, and as-if introducing `for<>` bounds on closures (without the associated change in semantics). r? `@petrochenkov`
2022-06-22Rollup merge of #98005 - compiler-errors:impossible-bounds, r=Mark-SimulacrumYuki Okushi-18/+151
Add some tests for impossible bounds Adds test for #93008 Adds test for #94680 Closes #94999 Closes #95640
2022-06-22Rollup merge of #97818 - compiler-errors:rpit-error-spanned, r=oli-obkYuki Okushi-0/+27
Point at return expression for RPIT-related error Certainly this needs some diagnostic refining, but I wanted to show that it was possible first and foremost. Not sure if this is the right approach. Open to feedback. Fixes #80583
2022-06-22add "was" to pluralize macro and use itTakayuki Maeda-3/+3
2022-06-22stop pointing at definitions of missing fieldsTakayuki Maeda-24/+4