Commit Graph

263792 Commits

Author SHA1 Message Date
Guillaume Gomez
1e1743a379 Reduce merged doctest source code size 2024-08-13 20:14:56 +02:00
Guillaume Gomez
d512438435 Run mergeable doctest as part of standalone doctests if there is only one 2024-08-13 20:14:56 +02:00
Guillaume Gomez
bfabf1db44 Add documentation on DocTest and RunnableDoctest structs 2024-08-13 20:14:56 +02:00
Guillaume Gomez
6d552ba446 Improve code by removing unneeded function arguments 2024-08-13 20:14:56 +02:00
Guillaume Gomez
84d9b67dab Add 2024 edition doctests to cover corner cases 2024-08-13 20:14:55 +02:00
Guillaume Gomez
14f80f9e69 Correctly handle macros using $crate in merged doctests 2024-08-13 20:14:55 +02:00
Guillaume Gomez
112e44740e Disable merged doctests by default 2024-08-13 20:14:55 +02:00
Guillaume Gomez
0bd2c99ce8 Only show rustdoc doctest compilation output if nocapture is used 2024-08-13 20:14:55 +02:00
Guillaume Gomez
c5ae545fbd If no argument is provided to merged doctests binary, they will be run in the same process (needed for miri) 2024-08-13 20:14:55 +02:00
Guillaume Gomez
ec4d910190 Correctly handle internal_features attribute 2024-08-13 20:14:55 +02:00
Guillaume Gomez
475824d811 Mark location doctest as standalone since file information will not work in merged doctest file 2024-08-13 20:14:55 +02:00
Guillaume Gomez
995858eed3 Don't change indent in merged doctests 2024-08-13 20:14:55 +02:00
Guillaume Gomez
0f0681e941 Make merged doctests run in their own process 2024-08-13 20:14:54 +02:00
Guillaume Gomez
dcc77b4cbc Fix weird memory allocation failure in merged doctests by storing doctest list into a const 2024-08-13 20:14:54 +02:00
Guillaume Gomez
b6831bbdda Don't merge doctests with #[global_allocator] 2024-08-13 20:14:54 +02:00
Guillaume Gomez
6eabffbaec Greatly improve handling of doctests attributes, making it possible to merge doctests more efficiently 2024-08-13 20:14:54 +02:00
Guillaume Gomez
03118fa80a Simplify has_main_fn to be a boolean instead of a Option<Span> 2024-08-13 20:14:54 +02:00
Guillaume Gomez
010731d5b6 Add new run-make tests for doctests 2024-08-13 20:14:54 +02:00
Guillaume Gomez
2fd8d1c1ce Add/update rustdoc-ui tests to check new merged doctests 2024-08-13 20:14:54 +02:00
Guillaume Gomez
7ec3cabe17 Correctly handle doctests with invalid AST 2024-08-13 20:14:54 +02:00
Guillaume Gomez
59a9e0986d Correctly handle the case where there is no doctests to run 2024-08-13 20:14:54 +02:00
Guillaume Gomez
a0ae8ac861 If there is any AST error with a doctest, we make it a standalone test
To do so, AST error detection was improved in order to not filter out
too many doctests.
2024-08-13 20:14:54 +02:00
Guillaume Gomez
b7079c5c83 Prevent merged doctests to break stdin if the generated file is too big 2024-08-13 20:14:53 +02:00
Guillaume Gomez
23badff4fe Add documentation for the doctest standalone attribute 2024-08-13 20:14:53 +02:00
Guillaume Gomez
3147520d34 Add new doc codeblock standalone attribute 2024-08-13 20:14:53 +02:00
Guillaume Gomez
58cd70e062 Only merge doctests starting 2024 edition 2024-08-13 20:14:53 +02:00
Guillaume Gomez
6ae3524835 Split doctests into two categories: mergeable ones and standalone ones 2024-08-13 20:14:53 +02:00
Guillaume Gomez
96051f20e2 Split standalone and mergeable doctests 2024-08-13 20:14:53 +02:00
Guillaume Gomez
39f029a852 Split doctests between standalone and mergeable ones 2024-08-13 20:14:53 +02:00
Guillaume Gomez
7d72482431 Simplify doctest tests 2024-08-13 20:14:53 +02:00
Guillaume Gomez
5e244370fe Add DocTest type 2024-08-13 20:14:53 +02:00
Guillaume Gomez
05fbfde17d Clean up rustdoc make_test function code 2024-08-13 20:14:52 +02:00
Michael Howell
c6fb0f344e diagnostics: use DeepRejectCtxt for check
This makes more things match, particularly applicable blankets.
2024-08-13 10:01:13 -07:00
Jakub Beránek
87a4c325d2 Fix target triple in bootstrap 2024-08-13 18:08:30 +02:00
lcnr
0aa17a4c4d implement a performant and fuzzed solver cache 2024-08-13 17:33:48 +02:00
bors
f96e296927 Auto merge of #17880 - lnicola:sync-from-rust, r=lnicola
minor: sync from downstream
2024-08-13 15:01:50 +00:00
Laurențiu Nicola
28af7e0958 Merge from rust-lang/rust 2024-08-13 17:58:52 +03:00
Laurențiu Nicola
ddb8551e03 Preparing for merge from rust-lang/rust 2024-08-13 17:56:37 +03:00
onur-ozkan
0518e8c7fd detect incompatible CI rustc options more precisely
Previously, the logic here was simply checking whether the option was set in `config.toml`.
This approach was not manageable in our CI runners as we set so many options in config.toml.
In reality, those values are not incompatible since they are usually the same value used to generate
the CI rustc. Now, the new logic compares the configuration values with the values used to generate
the CI rustc, so we get more precise results and make the process more manageable.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-13 17:22:13 +03:00
onur-ozkan
b2f1fc1697 separate inner function (get_toml) of Config::parse
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-13 17:20:39 +03:00
bors
00423bb1d8 Auto merge of #17853 - ShoyuVanilla:min-exhaustive-pat, r=ShoyuVanilla
feat: `min-exhaustive-patterns`

Resolves #17851
2024-08-13 14:18:14 +00:00
Shoyu Vanilla
4ea0db907c Bump rustc_pattern_analysis 2024-08-13 23:15:37 +09:00
Shoyu Vanilla
6911d9f066 Temporarily remove non-working test case 2024-08-13 23:10:55 +09:00
Shoyu Vanilla
20971602d5 feat: `min-exhaustive-patterns 2024-08-13 23:10:55 +09:00
Guillaume Gomez
afbab80681 Update rustdoc-ui test for --generate-link-to-definition option 2024-08-13 15:08:07 +02:00
Guillaume Gomez
d2177d90b0 Emit a warning instead of an error if --generate-link-to-definition is used with other output formats than HTML 2024-08-13 15:07:26 +02:00
Guillaume Gomez
53e87d211c Remove duplicated rustdoc ui test 2024-08-13 15:03:18 +02:00
bors
80eb5a8e91 Auto merge of #129046 - matthiaskrgr:rollup-9x4xgak, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #128643 (Refactor `powerpc64` call ABI handling)
 - #128655 (std: refactor UNIX random data generation)
 - #128745 (Remove unused lifetime parameter from spawn_unchecked)
 - #128841 (bootstrap: don't use rustflags for `--rustc-args`)
 - #128983 (Slightly refactor `TargetSelection` in bootstrap)
 - #129026 (CFI: Move CFI ui tests to cfi directory)
 - #129040 (Fix blessing of rmake tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-13 11:43:20 +00:00
onur-ozkan
aba675fe75 copy builder-config file into ci-rustc sysroot
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-13 13:48:23 +03:00
Zalathar
355f264d32 Remove a confusing comment
The JSON messages parsed by this file are from the _compiler_, not from
libtest.
2024-08-13 20:24:53 +10:00