Commit Graph

227800 Commits

Author SHA1 Message Date
bohan
8c8c7ef78a fix: add cfg diagnostic for unresolved import error 2023-06-24 21:45:17 +08:00
Ali MJ Al-Nasrawy
a72013f7f0 instantiate hidden types in root universe 2023-06-24 13:00:15 +00:00
Guillaume Gomez
fa1f16116e Migrate GUI colors test to original CSS color format 2023-06-24 14:47:16 +02:00
bors
ed1ce580ec Auto merge of #112802 - lukas-code:fancy-bool, r=Nilstrieb
use ErrorGuaranteed instead of booleans in rustc_builtin_macros

implements https://github.com/rust-lang/rust/pull/112366#discussion_r1233821873

No functional changes.

Best reviewed with whitespace diff disabled.

r? `@Nilstrieb`
2023-06-24 11:43:41 +00:00
León Orell Valerian Liehr
c643bedf7c
rustdoc: render gen params & where-clauses of cross-crate assoc tys in impl blocks 2023-06-24 12:20:26 +02:00
Yuki Okushi
ab87f72a22
Add a regression test for #96699
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24 14:46:02 +09:00
Yuki Okushi
13cc8dd580
Add a regression test for #109141
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-06-24 14:27:58 +09:00
bors
e0ba2d038d Auto merge of #112987 - compiler-errors:rollup-6anskq1, r=compiler-errors
Rollup of 8 pull requests

Successful merges:

 - #111087 (Implement `Sync` for `mpsc::Sender`)
 - #112763 (Bump compiler_builtins)
 - #112963 (Stop bubbling out hidden types from the eval obligation queries)
 - #112965 (Don't emit same goal as input during `wf::unnormalized_obligations`)
 - #112973 (Make sure to include default en-US ftl resources for `rustc_error` crate)
 - #112981 (Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty)
 - #112983 (Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty)
 - #112986 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-24 03:36:19 +00:00
Michael Goulet
d28f0375c2
Rollup merge of #112986 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in 4cebd130ebca3bc219180a54f3e26cc1b14a91de..03bc66b55c290324bd46eb22e369c8fae1908f91
2023-06-21 18:59:29 +0000 to 2023-06-23 23:27:46 +0000
- fix(script): Be quiet on programmatic output (rust-lang/cargo#12305)
- docs(unstable): Update script documentation (rust-lang/cargo#12308)
- cargo script example needs nightly -Zscript feature (rust-lang/cargo#12287)
- fix(script): Process config relative to script, not CWD (rust-lang/cargo#12303)
- -Znext-lockfile-bump: Don't suggest using -Z on stable (rust-lang/cargo#12302)
- build(deps): bump openssl from 0.10.54 to 0.10.55 (rust-lang/cargo#12300)
- Add `.toml` file extension restriction for `-Zconfig-include` (rust-lang/cargo#12298)
- docs(unstable): Point stable-unstable docs to nightly docs (rust-lang/cargo#12299)

r? `@ghost`
2023-06-23 19:47:22 -07:00
Michael Goulet
bfe6e5c418
Rollup merge of #112983 - spastorino:new-rpitit-23, r=compiler-errors
Fix return type notation associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty

This avoid suggesting the associated types generated for RPITITs when the one the code refers to doesn't exist and rustc looks for a suggestion.

r? `@compiler-errors`
2023-06-23 19:47:22 -07:00
Michael Goulet
4a175523b1
Rollup merge of #112981 - spastorino:new-rpitit-22, r=compiler-errors
Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty

This just adjust the way we check for RPITITs and uses the new helper method to do the "old" and "new" check at once.

r? `@compiler-errors`
2023-06-23 19:47:21 -07:00
Michael Goulet
3148bcf0a9
Rollup merge of #112973 - compiler-errors:oops-forgot-ftl, r=jyn514
Make sure to include default en-US ftl resources for `rustc_error` crate

Fixes #112928
2023-06-23 19:47:21 -07:00
Michael Goulet
766db8161b
Rollup merge of #112965 - compiler-errors:circular-wf, r=aliemjay
Don't emit same goal as input during `wf::unnormalized_obligations`

r? `@aliemjay` cc `@lcnr`

I accidentally pruned the logic to handle `WF(?0)` when writing `wf::unnormalized_obligations`.

idk if you wanted to construct a test first, but this is an obvious fix. Copied the comment from above.

Fixes rust-lang/trait-system-refactor-initiative#36
2023-06-23 19:47:21 -07:00
Michael Goulet
fdce450eb5
Rollup merge of #112963 - oli-obk:tait_solver_decoupling, r=compiler-errors
Stop bubbling out hidden types from the eval obligation queries

r? `@compiler-errors`

I don't know why these were added, but they are not needed anymore. The relevant test is unaffected and I didn't see anything interesting in logging that would have justified it.

This PR has no effect on the new solver behaviour of cf2dff2b1e/tests/ui/impl-trait/issue-99642.rs (which is overflow) and cf2dff2b1e/tests/ui/impl-trait/issue-99642-2.rs (which is "unstable certainty ICE")
2023-06-23 19:47:20 -07:00
Michael Goulet
ee8b035fab
Rollup merge of #112763 - Patryk27:bump-compiler-builtins, r=Amanieu
Bump compiler_builtins

Actually closes https://github.com/rust-lang/rust/issues/108489.

Note that the example code given [in compiler_builtins](https://github.com/rust-lang/compiler-builtins/pull/527) doesn't compile on current rustc since we're still waiting for https://reviews.llvm.org/D153197 (aka `LLVM ERROR: Expected a constant shift amount!`), but it's a step forward anyway.
2023-06-23 19:47:20 -07:00
Michael Goulet
4a01a38466
Rollup merge of #111087 - ibraheemdev:patch-15, r=dtolnay
Implement `Sync` for `mpsc::Sender`

`mpsc::Sender` is currently `!Sync` because the previous implementation contained an optimization where the channel started out as single-producer and was dynamically upgraded on the first clone, which relied on a unique reference to the sender. This optimization is one of the main reasons the old implementation was so complex and was removed in #93563. `mpsc::Sender` can now soundly implement `Sync`.

Note for any potential confusion, this chance does *not* add MPMC behavior. This only affects the already `Send + Clone` *sender*, not *receiver*.

It's technically possible to rely on the `!Sync` behavior in the same way as a `PhantomData<*mut T>`, but that seems very unlikely in practice. Either way, this change is insta-stable and needs an FCP.

`@rustbot` label +T-libs-api -T-libs
2023-06-23 19:47:19 -07:00
jyn
c7af6fb5b8 Test color/verbose/warnings properly
These weren't being passed in to bootstrap consistently before; in particular `serialize_and_parse` forgot to pass them in.
2023-06-23 21:13:36 -05:00
jyn
c5820b50c5 Test cargo arguments passed by bootstrap.py
This moves a lot of code around, but the logic itself is not too terribly complicated.

- Move almost all logic in `def bootstrap` to the `RustBuild` class, to avoid mixing setting configuration with running commands
- Update various doctests to the new (more complete) RustBuild config. In particular, don't pretend that `bin_root` supports `build` being unset.
- Change `parse_args` not to use a global, to allow testing it
- Set BUILD_DIR appropriately so bootstrap.py doesn't panic because cargo isn't found
2023-06-23 21:13:36 -05:00
jyn
3508cde815 Allow passing arguments to bootstrap_test.py
Previous, it used the built-in test runner, which doesn't support options unless they're manually passed in the script.
2023-06-23 21:13:34 -05:00
jyn
7d2373e48f Fix progress messages for configure in bootstrap_test.py
Before it would unconditionally print `configure-args = []`.
2023-06-23 21:12:06 -05:00
Weihang Lo
4246e5079e
Update cargo 2023-06-24 01:38:42 +01:00
bors
1d67eba687 Auto merge of #112891 - oli-obk:impl_trait_in_assoc_tys_cleanup, r=compiler-errors
Various impl trait in assoc tys cleanups

r? `@compiler-errors`

All commits except for the last are pure refactorings. 274dab5bd658c97886a8987340bf50ae57900c39 allows struct fields to participate in deciding whether a function has an opaque in its signature.

best reviewed commit by commit
2023-06-23 23:26:38 +00:00
Santiago Pastorino
6d997876c1
Fix associated type suggestion when -Zlower-impl-trait-in-trait-to-assoc-ty 2023-06-23 18:23:52 -03:00
bors
22e9fe644e Auto merge of #112974 - matthiaskrgr:rollup-hnk7ans, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #112616 (Improve tests on targets without unwinding)
 - #112643 (Always register sized obligation for argument)
 - #112740 (Add link to rustdoc book search chapter in help popover)
 - #112810 (Don't ICE on unnormalized struct tail in layout computation)
 - #112870 (Migrate `item_bounds` to `ty::Clause`)
 - #112925 (Stop hiding const eval limit in external macros)
 - #112960 ([tests/rustdoc] Add `@files` command)
 - #112962 (Fix rustdoc gui tester)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-06-23 20:45:23 +00:00
Santiago Pastorino
d77e55bbb9
Fix return type notation errors with -Zlower-impl-trait-in-trait-to-assoc-ty 2023-06-23 17:34:33 -03:00
Noah Lev
5f433f33ed Reduce typename width to 6.25rem
This makes "existential type" look slightly cramped (though still
readable), but it makes all other typenames look better. Existential
types are currently very rare, and we can always tweak this later if
necessary.
2023-06-23 12:02:55 -07:00
Matthias Krüger
9d7f297f3c
Rollup merge of #112962 - GuillaumeGomez:fix-rustdoc-gui-tester, r=ozkanonur
Fix rustdoc gui tester

Problem was that the `main` was always exiting with `0`, whether or not there was an error. It led to failing GUI tests being ignored in the CI since no one saw them.

r? ````@klensy````
2023-06-23 19:40:01 +02:00
Matthias Krüger
4821f80716
Rollup merge of #112960 - GuillaumeGomez:rustdoc-files-check, r=notriddle
[tests/rustdoc] Add @files command

The ``````@!has`````` checks is very problematic as it wouldn't catch if the file scheme is updated and the file is generated again. ``````@files`````` allows to ensure that the given folder contains exactly the provided entries (files and folders).

I'm wondering if we should forbid the ``````@!has`````` for files. To be discussed after this PR I suppose.

r? `````@notriddle`````
2023-06-23 19:40:00 +02:00
Matthias Krüger
c9139521e7
Rollup merge of #112925 - oli-obk:timeout_lint, r=cjgillot
Stop hiding const eval limit in external macros

fixes #112748

We don't emit a hard error if there was a previous deny lint triggering with the same message. If that lint ends up not being emitted, we ICE and don't emit an error either.
2023-06-23 19:39:59 +02:00
Matthias Krüger
4e8983050e
Rollup merge of #112870 - compiler-errors:clause-2, r=oli-obk
Migrate `item_bounds` to `ty::Clause`

Should be simpler than the next PR that's coming up. Last three commits are the relevant ones.

r? ``@oli-obk`` or ``@lcnr``
2023-06-23 19:39:59 +02:00
Matthias Krüger
cea5ae00d2
Rollup merge of #112810 - compiler-errors:dont-ice-on-bad-layout, r=wesleywiser
Don't ICE on unnormalized struct tail in layout computation

1. We try to compute a `SizeSkeleton` even if a layout error occurs, but we really only need to do this if we get `LayoutError::Unknown`, since that means our type is too polymorphic to actually compute the full layout. If we have other errors, like `LayoutError::NormalizationError` or `LayoutError::Cycle`, then we can't really make any progress, since this represents an actual error.
2. Avoid using `normalize_erasing_regions` and `struct_tail_erasing_lifetimes` since those ICE on normalization errors, and since we may call `layout_of` in HIR typeck, we don't know for certain that we're on the happy path.

Fixes #112736
2023-06-23 19:39:58 +02:00
Matthias Krüger
afe337d2f1
Rollup merge of #112740 - GuillaumeGomez:link-to-search-chapter, r=notriddle
Add link to rustdoc book search chapter in help popover

One thing that was missing in the rustdoc output and its help popover was a link back to the search feature chapter in the rustdoc book.

It looks like this:

![image](https://github.com/rust-lang/rust/assets/3050060/425413e5-e734-4d40-b675-8b2dcef874a2)

r? `@notriddle`
2023-06-23 19:39:58 +02:00
Matthias Krüger
27ae068de3
Rollup merge of #112643 - compiler-errors:sized-obl-for-arg, r=wesleywiser
Always register sized obligation for argument

Removes a "hack" that skips registering sized obligations for parameters that are simple identifiers. This doesn't seem to affect diagnostics because we're probably already being smart enough about deduplicating identical error messages anyways.

Fixes #112608
2023-06-23 19:39:57 +02:00
Matthias Krüger
ff596144be
Rollup merge of #112616 - ferrocene:pa-more-test-suite-fixes, r=Nilstrieb
Improve tests on targets without unwinding

This PR makes more miscellaneous changes to tests, to make it work on targets without unwinding support.
2023-06-23 19:39:57 +02:00
Guillaume Gomez
3b17012ac9 Fix GUI test for popover 2023-06-23 19:34:37 +02:00
Michael Goulet
0710040648 Make sure to include default en-US ftl resources for rustc_error crate 2023-06-23 17:22:07 +00:00
Noah Lev
12de5b7ff3 Make typenames a bit wider to support "existential type" 2023-06-23 10:12:27 -07:00
Matthias Krüger
5a0c8e3a08 issue template: add clippy entry which points to the clippy repo 2023-06-23 18:54:19 +02:00
Noah Lev
c4fca7202b Abbreviate long typenames so they don't get wrapped in results 2023-06-23 09:51:53 -07:00
bors
c79d6be6a2 Auto merge of #109982 - durin42:plt-no-x86_64-only, r=nikic
rustc_session: default to -Z plt=yes on non-x86_64

Per the discussion in #106380 plt=no isn't a great default, and rust-lang/compiler-team#581 decided that the default should be PLT=yes for everything except x86_64. Not everyone agrees about the x86_64 part of this change, but this at least is an improvement in the state of things without changing the x86_64 situation, so I've attempted making this change in the name of not letting the perfect be the enemy of the good.

Please let me know if I've messed this up somehow - I'm not wholly confident I got this right.

r? `@nikic`
2023-06-23 16:50:37 +00:00
Michael Goulet
2eb7d69309 Resolve vars when reporting WF error 2023-06-23 16:26:22 +00:00
Michael Goulet
f12695b53b Don't emit same goal as input during wf obligations 2023-06-23 16:23:27 +00:00
Christopher Serr
471cd785cc
Update wasi-libc
This updates wasi-libc to the latest master.

Resolves #112749
2023-06-23 18:19:40 +02:00
Guillaume Gomez
7b5577985d Make try_run return a Result<(), ()> instead of a boolean 2023-06-23 17:07:34 +02:00
Oli Scherer
c996cfec80 Stop bubbling out hidden types from the eval obligation queries 2023-06-23 14:53:31 +00:00
Guillaume Gomez
2f1939ab8b Link to the corresponding channel in the help popover 2023-06-23 16:32:55 +02:00
Guillaume Gomez
2f3bed0c4c Add link to rustdoc book search chapter in help popover 2023-06-23 15:58:10 +02:00
Guillaume Gomez
d70faf3645 Fix failing rustdoc GUI test 2023-06-23 15:50:30 +02:00
Guillaume Gomez
616469aa8a Fix rustdoc-gui tester 2023-06-23 15:50:20 +02:00
Augie Fackler
52d50fba2a tests: be even more permissive on attributes in one test 2023-06-23 09:48:00 -04:00