Commit Graph

212856 Commits

Author SHA1 Message Date
Jakob Degen
a5beb7abb9 Various cleanups to dest prop 2022-12-14 23:11:52 -08:00
Yuki Okushi
8ba24aedd9
Add regression test for #55976
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-15 15:04:23 +09:00
Michael Howell
6ac0b94f44 rustdoc: remove no-op CSS .item-info:before { color }
No content is set, so this pseudo-element does not exist. The CSS was
obsoleted by 73d0f7c7b6.
2022-12-14 22:11:59 -07:00
bors
a8847df167 Auto merge of #105657 - oli-obk:mk_projection_ty, r=lcnr
Guard ProjectionTy creation against passing the wrong number of substs

r? `@lcnr`
2022-12-15 04:21:25 +00:00
Nicholas Nethercote
5258b655a2 Merge SimplifiedTypeGen<D> into SimplifiedType.
`SimplifiedTypeGen<DefId>` is the only instantiation used, so we don't
need the generic parameter.
2022-12-15 15:13:19 +11:00
Nicholas Nethercote
2a5aabdfc2 Remove SimplifiedTypeGen::map_def.
It's unused.
2022-12-15 15:04:09 +11:00
Esteban Küber
124f19485d Tweak output for bare dyn Trait in arguments
Fix #35825.
2022-12-14 18:51:55 -08:00
bors
939a3ddf94 Auto merge of #104765 - chenyukang:yukang-fix-104639-lifetime-check, r=oli-obk
Find the right lower bound region in the scenario of partial order relations

Fixes #104639
2022-12-15 01:28:16 +00:00
Dan Johnson
da98ef9a5d Ensure async trait impls are async (or otherwise return an opaque type)
As a workaround for the full `#[refine]` semantics not being implemented
yet, forbit returning a concrete future type like `Box<dyn Future>` or a
manually implemented Future.

`-> impl Future` is still permitted; while that can also cause
accidental refinement, that's behind a different feature gate
(`return_position_impl_trait_in_trait`) and that problem exists
regardless of whether the trait method is async, so will have to be
solved more generally.

Fixes #102745
2022-12-14 16:38:21 -08:00
Michael Howell
afcc354bc4 rustdoc: remove no-op CSS .scrape-example .src-line-numbers { margin: 0 }
This is the default CSS for `<pre>` tags in `.code-wrapper` anyway, so this
line does nothing.
2022-12-14 16:25:26 -07:00
Matthias Krüger
de59844c98 more clippy::complexity fixes 2022-12-15 00:09:10 +01:00
bors
16990de53e Auto merge of #105704 - weihanglo:update-cargo, r=weihanglo
Update cargo

8 commits in 70898e522116f6c23971e2a554b2dc85fd4c84cd..cc0a320879c17207bbfb96b5d778e28a2c62030d 2022-12-05 19:43:44 +0000 to 2022-12-14 14:46:57 +0000
- artifact deps should works when target field specified coexists with `optional = true` (rust-lang/cargo#11434)
- Add `home` crate to cargo crates (rust-lang/cargo#11359)
- Use proper git URL for GitHub repos (rust-lang/cargo#11475)
- Fixes flock(fd, LOCK_UN) emulation on Solaris. (rust-lang/cargo#11474)
- Allow Check targets needed for optional doc-scraping to fail without killing the build (rust-lang/cargo#11450)
- fix: gleaning rustdocflags from `target.cfg(…)` is not supported (rust-lang/cargo#11323)
- Fix typo (rust-lang/cargo#11470)
- resolver.md: Fix naming in example (rust-lang/cargo#11469)

r? `@ghost`
2022-12-14 22:24:31 +00:00
b-naber
ff41359e65 address review 2022-12-14 21:32:42 +01:00
Rémy Rakic
b720847917 wrap output in BufWriter 2022-12-14 20:17:52 +00:00
Rémy Rakic
6379e5e78c bless rustdoc test for unstable options 2022-12-14 20:17:52 +00:00
Rémy Rakic
7611933e6a add -Z dump-mono-stats
This option will output some stats from the monomorphization collection
pass to a file, to show estimated sizes from each instantiation.
2022-12-14 20:17:52 +00:00
Rémy Rakic
74f4da44a5 add helper to get DefId from MonoItem 2022-12-14 20:17:52 +00:00
Michael Goulet
3eb5b62898 always use anonymize_bound_vars 2022-12-14 20:06:25 +00:00
Esteban Küber
2a0d7126e7 Do not mention long types in E0599 label
The type is already mentioned in the main message and the list of unmet
bounds.
2022-12-14 11:26:32 -08:00
bors
b70baa4f92 Auto merge of #105703 - matthiaskrgr:rollup-tfpeam2, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #105399 (Use more LFS functions.)
 - #105578 (Fix transmutes between pointers in different address spaces (e.g. fn ptrs on AVR))
 - #105598 (explain mem::forget(env_lock) in fork/exec)
 - #105624 (Fix unsoundness in bootstrap cache code)
 - #105630 (Add a test for #92481)
 - #105684 (Improve rustdoc markdown variable naming)
 - #105697 (Remove fee1-dead from reviewers)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-14 19:14:39 +00:00
Oli Scherer
b41a483e8a Fix rustdoc 2022-12-14 18:55:55 +00:00
bjorn3
13e33c03ff Add tidy exceptions 2022-12-14 19:47:46 +01:00
Michael Goulet
d10f6b44e1 Add test 2022-12-14 18:44:26 +00:00
Michael Goulet
34d194d41c Highlight conflicting param-env candidates, again 2022-12-14 18:44:26 +00:00
Michael Goulet
cfa6a93a36 Auto traits in dyn are suggestable 2022-12-14 18:39:39 +00:00
Michael Goulet
7bf36de6ab Make report_projection_error more term agnostic 2022-12-14 18:32:31 +00:00
bjorn3
949699931e Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
Michael Goulet
1225a65389 drive-by: Fix path spans 2022-12-14 18:26:09 +00:00
Michael Goulet
ae60015e76 Use impl's def id when calculating type to specify UFCS 2022-12-14 18:26:09 +00:00
Michael Goulet
bcaf210575 bail in collect_trait_impl_trait_tys if signatures reference errors 2022-12-14 18:25:12 +00:00
Michael Howell
9e3d847d7b rustdoc: remove unnecessary CSS kbd { cursor: default }
Added along with theme picker changes in
e78f1392b7, but no reason seems to have been
given at the time for why this particular rule was added.

Removing this rule results in `<kbd>` elements getting an I-bar, while the
rule causes them to use the "default" arrow, but since selecting the text in
these elements works fine, the I-bar is not misleading.
2022-12-14 11:11:25 -07:00
Michael Goulet
d0db3279ab Don't bug if we're trying to cast dyn* to a nother type 2022-12-14 18:00:56 +00:00
Michael Goulet
bdc3c4bf55 Make print_type_sizes test not use feature(start) 2022-12-14 17:50:20 +00:00
Michael Goulet
5f5ae17f4e Consider discriminant fields that are ordered before variant fields 2022-12-14 17:50:20 +00:00
Weihang Lo
fb0ca599cd
Update cargo
8 commits in 70898e522116f6c23971e2a554b2dc85fd4c84cd..cc0a320879c17207bbfb96b5d778e28a2c62030d
2022-12-05 19:43:44 +0000 to 2022-12-14 14:46:57 +0000
- artifact deps should works when target field specified coexists with `optional = true` (rust-lang/cargo#11434)
- Add `home` crate to cargo crates (rust-lang/cargo#11359)
- Use proper git URL for GitHub repos (rust-lang/cargo#11475)
- Fixes flock(fd, LOCK_UN) emulation on Solaris. (rust-lang/cargo#11474)
- Allow Check targets needed for optional doc-scraping to fail without killing the build (rust-lang/cargo#11450)
- fix: gleaning rustdocflags from `target.cfg(…)` is not supported (rust-lang/cargo#11323)
- Fix typo (rust-lang/cargo#11470)
- resolver.md: Fix naming in example (rust-lang/cargo#11469)
2022-12-14 16:21:02 +00:00
Matthias Krüger
3069bc0c14
Rollup merge of #105697 - fee1-dead-contrib:rm-fee1-dead, r=Mark-Simulacrum
Remove fee1-dead from reviewers

.. for now. I have been burned out a bit from reviews and I think I should take a break.
2022-12-14 17:17:59 +01:00
Matthias Krüger
37bf2bce96
Rollup merge of #105684 - GuillaumeGomez:improve-rustdoc-var-name, r=notriddle
Improve rustdoc markdown variable naming

Opened on the right repository this time. 😆

r? `@notriddle`
2022-12-14 17:17:59 +01:00
Matthias Krüger
e2c9823693
Rollup merge of #105630 - albertlarsan68:test-92481, r=TaKO8Ki
Add a test for #92481

The test was copied ad-hoc from #92481, but I can't get the test to pass, because of needing to get twice the same error on the last line of the source.

Closes #92481
2022-12-14 17:17:58 +01:00
Matthias Krüger
0e861ccb9e
Rollup merge of #105624 - compiler-errors:cache-unsound, r=jyn514
Fix unsoundness in bootstrap cache code

Discovered via #105575, which showed that rustc was failing to build during a perf run.
2022-12-14 17:17:58 +01:00
Matthias Krüger
6d3a93c823
Rollup merge of #105598 - RalfJung:more-comments, r=the8472
explain mem::forget(env_lock) in fork/exec

I stumbled upon this while doing triage for https://github.com/rust-lang/rust/issues/64718.
2022-12-14 17:17:57 +01:00
Matthias Krüger
ba71a63fde
Rollup merge of #105578 - erikdesjardins:addrspacecast, r=bjorn3
Fix transmutes between pointers in different address spaces (e.g. fn ptrs on AVR)

Currently, this causes a verifier error (https://godbolt.org/z/YYohed4bj), since it uses `bitcast`, which can't convert between address spaces.

Uncovered due to https://github.com/rust-lang/rust/pull/105545#discussion_r1045269309

r? `@bjorn3`
2022-12-14 17:17:57 +01:00
Matthias Krüger
35ff2cf295
Rollup merge of #105399 - mikebenfield:lfs, r=thomcc
Use more LFS functions.

On Linux, use mmap64, open64, openat64, and sendfile64 in place of their non-LFS counterparts.

This is relevant to #94173.

With these changes (together with rust-lang/backtrace-rs#501), the simple binaries I produce with rustc seem to have no non-LFS functions, so maybe #94173 is fixed. But I can't be sure if I've missed something and maybe some non-LFS functions could sneak in somehow.
2022-12-14 17:17:56 +01:00
bors
fbf8b937b4 Auto merge of #105233 - mejrs:always_eager, r=estebank
Always evaluate vecs of subdiagnostics eagerly

See https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20lists!/near/310186705 for context
2022-12-14 16:16:50 +00:00
Oli Scherer
18373fae35 Debug assertions hate this trick 2022-12-14 15:37:47 +00:00
Oli Scherer
49536667ff Fix some comments and only get the generics in debug mode 2022-12-14 15:36:39 +00:00
Oli Scherer
9f6ae8828e Fix a freshly detected wrong TraitRef 2022-12-14 15:36:39 +00:00
Oli Scherer
0ae3da34c3 Remove TraitRef::new 2022-12-14 15:36:39 +00:00
Oli Scherer
6af3638709 Prevent the creation of TraitRef without dedicated methods 2022-12-14 15:36:39 +00:00
Oli Scherer
a5cd3bde95 Ensure no one constructs AliasTys themselves 2022-12-14 15:36:39 +00:00
Oli Scherer
4ffe3bdf99 Remove one more usage of mk_substs_trait 2022-12-14 15:36:39 +00:00