Commit Graph

300 Commits

Author SHA1 Message Date
bors
8be3c2bda6 Auto merge of #107932 - petrochenkov:onlyexport, r=jyn514
rustdoc: Skip doc link resolution for non-exported items
2023-03-24 21:10:51 +00:00
Guillaume Gomez
415a3ca909 Put back is_derive_trait_collision check 2023-03-24 16:10:31 +01:00
Guillaume Gomez
ec43cb3e9c Update UI tests for primitive type ambiguity error renaming 2023-03-24 14:50:12 +01:00
Guillaume Gomez
c78ebab258 Add regression tests for #108653 2023-03-24 13:41:21 +01:00
Matthias Krüger
acd7f878ae
Rollup merge of #107718 - Zoxc:z-time, r=nnethercote
Add `-Z time-passes-format` to allow specifying a JSON output for `-Z time-passes`

This adds back the `-Z time` option as that is useful for [my rustc benchmark tool](https://github.com/Zoxc/rcb), reverting https://github.com/rust-lang/rust/pull/102725. It now uses nanoseconds and bytes as the units so it is renamed to `time-precise`.
2023-03-23 19:55:43 +01:00
Vadim Petrochenkov
bec4eab3f9 rustdoc: Skip doc link resolution for non-exported items 2023-03-23 16:19:59 +04:00
Guillaume Gomez
c8c342c072 Add regression test for #109282 2023-03-23 12:53:30 +01:00
John Kåre Alsaker
f60d2eb6c1 Add -Z time-passes-format to allow specifying a JSON output for -Z time-passes 2023-03-21 18:18:25 +01:00
Vadim Petrochenkov
d3a5541939 rustdoc: Cleanup parent module tracking for doc links
Keep ids of the documented items themselves, not their parent modules.
Parent modules can be retreived from those ids when necessary.
2023-03-21 17:36:57 +04:00
Vadim Petrochenkov
5e0fc0459e rustdoc: Correctly merge import's and its target's docs in one more case 2023-03-17 18:46:27 +04:00
Mara Bos
a080165148 Bless -Zhelp output test. 2023-03-16 12:26:20 +01:00
Adrian Heine
c84c5e6439 rustdoc: Don't crash on crate references in blocks
This is a regression from #94857.
2023-03-10 17:49:13 +01:00
Santiago Pastorino
e74f50ecc2
Add unstable option new_rpitit to be used for new RPITIT lowering system 2023-03-01 12:56:39 -03:00
bors
70fd012439 Auto merge of #108473 - matthiaskrgr:rollup-qjyae58, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #107062 (Do some cleanup of doc/index.md)
 - #107890 (Lint against `Iterator::map` receiving a callable that returns `()`)
 - #108431 (Add regression test for #107918)
 - #108432 (test: drop unused deps)
 - #108436 (make "proc macro panicked" translatable)
 - #108444 (docs/test: add UI test and docs for `E0476`)
 - #108449 (Do not lint ineffective unstable trait impl for unresolved trait)
 - #108456 (Complete migrating `ast_passes` to derive diagnostics)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-02-26 02:04:23 +00:00
Matthias Krüger
5196e9114c
Rollup merge of #108431 - GuillaumeGomez:regression-test-for-107918, r=notriddle
Add regression test for #107918

Fixes https://github.com/rust-lang/rust/issues/107918.

r? ```@notriddle```
2023-02-26 00:46:26 +01:00
Michael Goulet
1a599d7d97
Rollup merge of #107675 - jsgf:link-directives, r=davidtwco
Implement -Zlink-directives=yes/no

`-Zlink-directives=no` will ignored `#[link]` directives while compiling a crate, so nothing is emitted into the crate's metadata.  The assumption is that the build system already knows about the crate's native dependencies and can provide them at link time without these directives.

This is another way to address issue # #70093, which is currently addressed by `-Zlink-native-libraries` (implemented in #70095). The latter is implemented at link time, which has the effect of ignoring `#[link]` in *every* crate. This makes it a very large hammer as it requires all native dependencies to be known to the build system to be at all usable, including those in sysroot libraries. I think this means its effectively unused, and definitely under-used.

Being able to control this on a crate-by-crate basis should make it much easier to apply when needed.

I'm not sure if we need both mechanisms, but we can decide that later.

cc `@pcwalton` `@cramertj`
2023-02-25 11:53:09 -08:00
Michael Goulet
a4119ba0ae
Rollup merge of #107291 - oli-obk:rustdoc_breaking_change, r=estebank
[breaking change] Remove a rustdoc back compat warning

This warning was introduced in https://github.com/rust-lang/rust/pull/62855 for users who use `rustdoc` directly on proc macro crates (instead of using `cargo doc`) without passing `--crate-type proc-macro` (which `cargo doc` passed automatically).
2023-02-25 11:53:08 -08:00
Guillaume Gomez
c934ee8300 Don't run issue-107918.rs test on windows 2023-02-25 12:12:21 +01:00
Guillaume Gomez
37d4302c25 Add regression test for #107918 2023-02-24 18:15:56 +01:00
Michael Howell
0241e493b1 rustdoc: update UI test for dropping "this" article 2023-02-23 11:59:26 -07:00
Oli Scherer
60b0da1541 Test rustdoc encountering proc_macro_derive in a non-proc-macro crate 2023-02-23 09:00:33 +00:00
Jeremy Fitzhardinge
fde2e40e43 link-directives: clarify usage message 2023-02-22 10:34:51 -08:00
Jeremy Fitzhardinge
fc5db2cd4f Implement -Zlink-directives=yes/no
`-Zlink-directives=no` will ignored `#[link]` directives while compiling a
crate, so nothing is emitted into the crate's metadata.  The assumption is
that the build system already knows about the crate's native dependencies
and can provide them at link time without these directives.

This is another way to address issue # #70093, which is currently addressed
by `-Zlink-native-libraries` (implemented in #70095). The latter is
implemented at link time, which has the effect of ignoring `#[link]`
in *every* crate. This makes it a very large hammer as it requires all
native dependencies to be known to the build system to be at all usable,
including those in sysroot libraries. I think this means its effectively
unused, and definitely under-used.

Being able to control this on a crate-by-crate basis should make it much
easier to apply when needed.

I'm not sure if we need both mechanisms, but we can decide that later.
2023-02-22 10:18:01 -08:00
Dylan DPC
6a21237bb8
Rollup merge of #108285 - BoxyUwU:remove_pick_stable_before_unstable_flag, r=oli-obk
remove unstable `pick_stable_methods_before_any_unstable` flag

This flag was only added in #90329 in case there was any issue with the impl so that it would be easy to tell nightly users to use the flag to disable the new logic to fix their code. It's now been enabled for two years and also I can't find any issues corresponding to this new functionality? This flag made it way harder to understand how this code works so it would be nice to remove it and simplify what's going on.

cc `@nbdd0121`

r? `@oli-obk`
2023-02-21 14:20:00 +05:30
Boxy
4f2001aab7 remove flag 2023-02-20 23:43:29 +00:00
Oli Scherer
37e2f4f487 Make configure_and_expand "infalllible" by just aborting the compilation if it fails instead of bubbling out an error 2023-02-20 15:28:59 +00:00
Noah Lev
fbd548acc3 Only include stable lints in rustdoc::all group
Including unstable lints in the lint group produces unintuitive behavior
on stable (see #106289). Meanwhile, if we only included unstable lints
on nightly and not on stable, we could end up with confusing bugs that
were hard to compare across versions of Rust that lacked code changes.

I think that only including stable lints in `rustdoc::all`, no matter
the release channel, is the most intuitive option. Users can then
control unstable lints individually, which is reasonable since they have
to enable the feature gates individually anyway.
2023-02-19 22:05:58 -08:00
Dylan DPC
4a0f088f7c
Rollup merge of #107951 - petrochenkov:procmacdoc, r=jackh726
resolve: Fix doc links referring to other crates when documenting proc macro crates directly

Fixes https://github.com/rust-lang/rust/issues/107950
2023-02-19 13:03:41 +05:30
Vadim Petrochenkov
ccdb598d1b rustdoc: Cleanup broken link callbacks 2023-02-18 14:45:01 +04:00
Nicholas Nethercote
22a5125a36 Remove save-analysis.
Most tests involving save-analysis were removed, but I kept a few where
the `-Zsave-analysis` was an add-on to the main thing being tested,
rather than the main thing being tested.

For `x.py install`, the `rust-analysis` target has been removed.

For `x.py dist`, the `rust-analysis` target has been kept in a
degenerate form: it just produces a single file `reduced.json`
indicating that save-analysis has been removed. This is necessary for
rustup to keep working.

Closes #43606.
2023-02-16 15:14:45 +11:00
Camille GILLOT
facecf6e1b Fetch less HIR in signature check. 2023-02-14 20:26:03 +00:00
Matthias Krüger
780beae7bd
Rollup merge of #107838 - estebank:terminal_hyperlinks, r=nagisa
Introduce `-Zterminal-urls` to use OSC8 for error codes

Terminals supporting the OSC8 Hyperlink Extension can support inline anchors where the text is user defineable but clicking on it opens a browser to a specified URLs, just like `<a href="URL">` does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-13 11:34:57 +01:00
Vadim Petrochenkov
efbf6547cf resolve: Fix doc links referring to other crates when documenting proc macro crates directly 2023-02-13 00:51:29 +04:00
clubby789
ef8de38c84 rustdoc: Don't resolve link to field on different variant 2023-02-11 12:28:35 +00:00
bors
a12d31d5a6 Auto merge of #102963 - ilammy:xray-basic, r=estebank
Add `-Z instrument-xray` flag

Implement MCP https://github.com/rust-lang/compiler-team/issues/561, adding `-Z instrument-xray` flag which enables XRay instrumentation in LLVM.
2023-02-10 00:02:43 +00:00
Esteban Küber
a576514e13 Introduce -Zterminal-urls to use OSC8 for error codes
Terminals supporting the OSC8 Hyperlink Extension can support inline
anchors where the text is user defineable but clicking on it opens a
browser to a specified URLs, just like `<a href="URL">` does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
2023-02-09 14:52:54 +00:00
Oleksii Lozovskyi
0e60df9ed1 Parse "-Z instrument-xray" codegen option
Recognize all bells and whistles that LLVM's XRay pass is capable of.
The always/never settings are a bit dumb without attributes but they're
still there. The default instruction count is chosen by the compiler,
not LLVM pass. We'll do it later.
2023-02-09 12:25:21 +09:00
Oli Scherer
f95b553eb4 Replace a command line flag with an env var to allow tools to initialize the tracing loggers at their own discretion 2023-02-07 16:33:03 +00:00
bors
6c991b0740 Auto merge of #107000 - GuillaumeGomez:fix-items-in-doc-hidden-block, r=notriddle,petrochenkov
Fix handling of items inside a `doc(hidden)` block

Fixes #106373.

cc `@aDotInTheVoid`
r? `@notriddle`
2023-02-02 21:14:44 +00:00
Esteban Küber
62ba3e70a1 Modify primary span label for E0308
The previous output was unintuitive to users.
2023-01-30 20:12:19 +00:00
bors
3cdd0197e7 Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk
Use stable metric for const eval limit instead of current terminator-based logic

This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.

The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).

Also see: #103877
2023-01-29 04:11:27 +00:00
Camille GILLOT
a20078f044 Add drop_tracking_mir option. 2023-01-27 18:57:34 +00:00
Guillaume Gomez
3623613dc7 Update newly failing UI tests 2023-01-27 14:41:33 +01:00
Bryan Garza
a8c9528e06 Bless z-help test for new flag 2023-01-23 23:56:22 +00:00
Guillaume Gomez
69de8fbbeb Revert "Update newly failing UI tests"
This reverts commit 9c46173895.
2023-01-19 20:27:00 +01:00
Matthias Krüger
8e0eecdba6
Rollup merge of #106566 - clubby789:contiguous-weird-unicode, r=cjgillot
Emit a single error for contiguous sequences of unknown tokens

Closes #106101

On encountering a sequence of identical source characters which are unknown tokens, note the amount of subsequent characters and advance past them silently. The old behavior was to emit an error and 'help' note for every single one.

`@rustbot` label +A-diagnostics +A-parser
2023-01-14 13:04:24 +01:00
clubby789
a3d6bc3468 Emit a single error for contiguous sequences of Unicode homoglyphs 2023-01-12 00:15:32 +00:00
Yuki Omoto
4e2a3567bc Add log-backtrace option to show backtraces along with logging 2023-01-12 00:17:48 +09:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests 2023-01-11 09:32:13 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00