1
Fork 0
Commit graph

257068 commits

Author SHA1 Message Date
Guillaume Gomez
6aab04e9b7 run fmt 2024-06-07 18:10:31 +02:00
Noah Lev
3670ad59ad Fix broken rustdoc unit tests 2024-06-07 17:53:45 +02:00
Noah Lev
815c447680 Parse full doctest source; extract helper for parsing code
It doesn't really make sense to skip part of the source when we're
parsing it, so parse the whole doctest. This simplifies things too.
2024-06-07 17:53:44 +02:00
Noah Lev
d06a05e262 Move logic for "making" doctests to submodule
This code turns the raw code given by the user into something actually
runnable, e.g. by adding a `main` function if it doesn't already exist.

I also made a couple other items private that didn't need to be
crate-public.
2024-06-07 17:51:48 +02:00
Noah Lev
0dc72d9551 Make doctests before running them; reintroduce RunnableDoctest 2024-06-07 17:48:48 +02:00
Noah Lev
366000dc07 Move some arguments to fields and reorganize fields
I moved some local arguments and options to either the local options
struct or, if it made sense, the global options struct.
2024-06-07 17:48:48 +02:00
Noah Lev
a429afacbc Remove RunnableDoctest
It should instead be the actual input to the running logic. Currently
it's not actually quite runnable since it's still missing some
information.
2024-06-07 17:48:48 +02:00
Noah Lev
e9e2634547 Make two fields computed on-demand 2024-06-07 17:48:48 +02:00
Noah Lev
790b7e9cbf rustdoc: Remove DoctestVisitor::get_line
This was used to get the line number of the first line from the current
docstring, which was then used together with an offset within the
docstring. It's simpler to just pass the offset to the visitor and have
it do the math because it's clearer and this calculation only needs to
be done in one place (the Rust doctest visitor).
2024-06-07 17:48:47 +02:00
Noah Lev
46d2aa5a8f Remove global options from IndividualTestOptions 2024-06-07 17:48:47 +02:00
Noah Lev
279b4d22f7 Merge RustDoctest and MdDoctest into one type 2024-06-07 17:48:47 +02:00
Noah Lev
b7dd401a78 rustdoc: Extract actual doctest running logic into function 2024-06-07 17:48:47 +02:00
Noah Lev
85499ebf13 Separate doctest collection from running 2024-06-07 17:48:47 +02:00
Noah Lev
16db1a1bd0 Move Markdown-specific doctest code into submodule 2024-06-07 17:48:47 +02:00
Noah Lev
516010bd0f Start moving format-specific code into doctest submodule 2024-06-07 17:48:45 +02:00
Noah Lev
f9e12ef946 rustdoc: Use write_all to ensure all content is written 2024-06-07 17:41:04 +02:00
Noah Lev
3ee4629446 rustdoc: Rename Tester to DoctestVisitor
The new name more accurately captures what it is.
2024-06-07 17:41:03 +02:00
bors
e3c3ce62d7 Auto merge of #126110 - workingjubilee:backtrace-0.3.73, r=workingjubilee
Update backtrace to 0.3.73

Fixes #126109

r? `@ghost`
2024-06-07 14:44:46 +00:00
bohan
93feaa6685 mark binding undetermined if target name exist and not obtained 2024-06-07 21:23:56 +08:00
Oli Scherer
9461852363 Add regression test 2024-06-07 13:22:44 +00:00
Zalathar
3eb5341c3d Improve docs for using custom paths with --emit 2024-06-07 23:05:15 +10:00
Zalathar
7c9b469895 Port tests/run-make-fulldeps/hotplug_codegen_backend to ui-fulldeps 2024-06-07 22:28:00 +10:00
Jakub Beránek
c9cb3280f3
Address review comments 2024-06-07 14:07:02 +02:00
Jakub Beránek
4b0842f3ce
Small refactoring 2024-06-07 12:20:47 +02:00
Jakub Beránek
9ce12c4cab
CI: remove Setup Python action 2024-06-07 11:26:36 +02:00
Jakub Beránek
d86c981908
Remove all usages of tmp_dir from tests 2024-06-07 11:12:24 +02:00
Jakub Beránek
94ccb9b34d
Remove dependence on tmp_dir
And also remove some environment variables passed to compilation of `rmake.rs`.
2024-06-07 11:12:04 +02:00
Jakub Beránek
7ebcc37d65
Fix bare-outfile test 2024-06-07 11:12:04 +02:00
Jakub Beránek
3f20c721ce
Fix mixing-formats run-make test 2024-06-07 11:12:04 +02:00
Jakub Beránek
585c898495
Do not run run-make tests in the test source directory 2024-06-07 11:12:04 +02:00
bors
1be24d70ce Auto merge of #125918 - oli-obk:const_block_ice, r=compiler-errors
Revert: create const block bodies in typeck via query feeding

as per the discussion in https://github.com/rust-lang/rust/pull/125806#discussion_r1622563948

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of https://github.com/rust-lang/rust/pull/124650

`@bors` rollup=never had a small perf impact previously

fixes https://github.com/rust-lang/rust/issues/125846

r? `@compiler-errors`
2024-06-07 09:08:59 +00:00
Oli Scherer
321d69d195 Fix codegen test 2024-06-07 08:50:18 +00:00
Pietro Albini
6110a51898
set version number to 1.81.0 2024-06-07 10:37:34 +02:00
Oli Scherer
bbcd8794d0 Add regression test 2024-06-07 08:33:58 +00:00
Oli Scherer
cbee17d502 Revert "Create const block DefIds in typeck instead of ast lowering"
This reverts commit ddc5f9b6c1.
2024-06-07 08:33:58 +00:00
Oli Scherer
92c54db22f Revert "Cache whether a body has inline consts"
This reverts commit eae5031ecb.
2024-06-07 08:33:58 +00:00
Jakub Beránek
eac63b7725
Rename S environment variable to SOURCE_ROOT in run-make tests 2024-06-07 09:20:58 +02:00
Jakub Beránek
7eff2d9b22
Do not pass source root when building run-make tests 2024-06-07 09:20:25 +02:00
bors
468310ea0c Auto merge of #126108 - workingjubilee:rollup-g7m92b6, r=workingjubilee
Rollup of 7 pull requests

Successful merges:

 - #125606 (Size optimize int formatting)
 - #125724 (Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`)
 - #126040 (Don't warn on fields in the `unreachable_pub` lint )
 - #126098 (Remove `same-lib-two-locations-no-panic` run-make test)
 - #126099 (Crate loader cleanups)
 - #126101 (Revert "Disallow ambiguous attributes on expressions" on nightly)
 - #126103 (Improve Docs for `hir::Impl` and `hir::ImplItem`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-07 06:49:55 +00:00
Zalathar
58ba77f4aa compiletest: Don't pass --out-dir if the compile flags include -o 2024-06-07 15:55:36 +10:00
Jubilee Young
49c2a1dda9 Update backtrace to 0.3.73 2024-06-06 22:50:45 -07:00
bors
60f7aabd8e Auto merge of #3652 - rust-lang:rustup-2024-06-07, r=RalfJung
Automatic Rustup
2024-06-07 05:45:07 +00:00
The Miri Cronjob Bot
f0ea91c60f Merge from rustc 2024-06-07 05:03:53 +00:00
The Miri Cronjob Bot
14f65cbeea Preparing for merge from rustc 2024-06-07 04:56:19 +00:00
Jubilee
9436304871
Rollup merge of #126103 - veera-sivarajan:improve-docs-hir-impl, r=fmease
Improve Docs for `hir::Impl` and `hir::ImplItem`

Based on https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20Difference.20between.20.60hir.3A.3AImplItem.60.20and.20.60hir.3A.3AImpl.60.3F/near/442650915

r​? fmease
2024-06-06 21:10:11 -07:00
Jubilee
b1ab8d59f4
Rollup merge of #126101 - lqd:revert-124099, r=wesleywiser
Revert "Disallow ambiguous attributes on expressions" on nightly

As discussed in [today's t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-06/near/443079505), this reverts PR #124099 to fix P-critical beta regressions #125199.

r? ``@wesleywiser``

Opening as draft so that ``@wesleywiser`` and ``@apiraino,`` you can tell me whether you wanted:
1. a `beta-accepted` revert of #124099 on nightly (this PR)? That will need to be backported to beta (even though #126093 may be the last of those)
2. a revert of #124099 on beta?
3. all of the above?

I also opened #126102, another draft PR to revert #124099 on beta, should you choose options 2 or 3.
2024-06-06 21:10:11 -07:00
Jubilee
4c771d3117
Rollup merge of #126099 - Nilstrieb:crate-loader-cleanups, r=jieyouxu
Crate loader cleanups

Minor cleanups I found while trying to understand how all of this works
2024-06-06 21:10:10 -07:00
Jubilee
2acb24c462
Rollup merge of #126098 - Kobzol:remove-same-lib-runmake-test, r=jieyouxu
Remove `same-lib-two-locations-no-panic` run-make test

This test doesn't really make any sense anymore, it became broken a long time ago.

r? ``@jieyouxu``
2024-06-06 21:10:10 -07:00
Jubilee
6a42df7517
Rollup merge of #126040 - Urgau:unreachable_pub-fields-less, r=petrochenkov
Don't warn on fields in the `unreachable_pub` lint

This PR restrict the `unreachable_pub` lint by not linting on `pub` fields of `pub(restricted)` structs and unions. This is done because that can quickly clutter the code for an uncertain value, in particular since the "real" visibility is defined by the parent (the struct it-self).

This is meant to address one of the last concern of the `unreachable_pub` lint.

r? ``@petrochenkov``
2024-06-06 21:10:10 -07:00
Jubilee
75aa9d1219
Rollup merge of #125724 - compiler-errors:uplift-relate, r=lcnr
Uplift `Relate`/`TypeRelation` into `rustc_next_trait_solver`

For use in the new solver. This doesn't yet uplift `ObligationEmittingRelation`.

r? lcnr
2024-06-06 21:10:09 -07:00