Commit Graph

234050 Commits

Author SHA1 Message Date
Deadbeef
a0a801cd38 treat host effect params as erased generics in codegen
This fixes the changes brought to codegen tests when effect params are
added to libcore, by not attempting to monomorphize functions that get
the host param by being `const fn`.
2023-09-14 07:34:35 +00:00
bors
e17235105c Auto merge of #115825 - cjgillot:expr-field-lint, r=compiler-errors
Visit ExprField for lint levels.

Fixes https://github.com/rust-lang/rust/issues/115823
2023-09-14 06:29:23 +00:00
Ralf Jung
19fb2c7ccd found another place where we can eval() a const, and go through valtrees 2023-09-14 07:56:01 +02:00
Ralf Jung
292d5bba86 always evaluate ConstantKind::Ty through valtrees 2023-09-14 07:44:49 +02:00
Ralf Jung
06947be196 valtree_to_const_value: add fast-path for Scalar tuples/structs 2023-09-14 07:40:05 +02:00
Ralf Jung
430c386821 make it more clear which functions create fresh AllocId 2023-09-14 07:27:31 +02:00
Ralf Jung
0f8908da27 cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect 2023-09-14 07:27:30 +02:00
Ralf Jung
551f481ffb use AllocId instead of Allocation in ConstValue::ByRef 2023-09-14 07:26:24 +02:00
Ralf Jung
3aedb85a27 a bit of cleanup in valtree_to_const_value 2023-09-14 07:22:44 +02:00
bors
2394959310 Auto merge of #115751 - lcnr:inspect-cleanup, r=compiler-errors
some inspect improvements

split from #114810 because I still want to experiment a bunch with that PR and these changes are self-contained.

r? `@compiler-errors`
2023-09-14 04:42:07 +00:00
Michael Goulet
7ae301ec47 Properly consider binder vars in HasTypeFlagsVisitor 2023-09-14 03:49:59 +00:00
Zalathar
c397ca0677 Fix the error message for #![feature(no_coverage)] 2023-09-14 13:01:54 +10:00
bors
c728bf3963 Auto merge of #114656 - bossmc:rework-no-coverage-attr, r=oli-obk
Rework `no_coverage` to `coverage(off)`

As discussed at the tail of https://github.com/rust-lang/rust/issues/84605 this replaces the `no_coverage` attribute with a `coverage` attribute that takes sub-parameters (currently `off` and `on`) to control the coverage instrumentation.

Allows future-proofing for things like `coverage(off, reason="Tested live", issue="#12345")` or similar.
2023-09-14 01:05:18 +00:00
ouz-a
fa57a48cf5 span is index 2023-09-14 00:32:21 +03:00
clubby789
731b221df3 Remove clubby789 from users_on_vacation 2023-09-13 21:13:05 +00:00
bors
8142a319ed Auto merge of #115790 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`
2023-09-13 20:28:02 +00:00
Camille GILLOT
01d7bf09f3 Visit ExprField for lint levels. 2023-09-13 19:47:20 +00:00
bors
eb2446a57e Auto merge of #115820 - matthiaskrgr:rollup-kyglvpu, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #115736 (Remove `verbose_generic_activity_with_arg`)
 - #115771 (cleanup leftovers of const_err lint)
 - #115798 (add helper method for finding the one non-1-ZST field)
 - #115812 (Merge settings.css into rustdoc.css)
 - #115815 (fix: return early when has tainted in mir pass)
 - #115816 (Disabled socketpair for Vita)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-13 18:19:15 +00:00
Matthias Krüger
156f50bef4
Rollup merge of #115816 - vita-rust:vita, r=cuviper
Disabled socketpair for Vita

There is no `socketpair` syscall in Vita newlib. This is reflected in a rust-lang/libc#3284, in which this method is removed for vita target.

Also, we would need the fixes from the abovementioned PR for sockets in std (previously we had some incorrect constant values),  but that can be done separately when rust-lang/libc#3284 is reviewed, merged, and released.
2023-09-13 18:37:44 +02:00
Matthias Krüger
48d89a8759
Rollup merge of #115815 - bvanjoi:fix-115809, r=oli-obk
fix: return early when has tainted in mir pass

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

As in #115643, `run_pass` is skipped if the body has tainted errors.

r? `@oli-obk`
2023-09-13 18:37:43 +02:00
Matthias Krüger
27c6099c79
Rollup merge of #115812 - GuillaumeGomez:merge-settings-into-rustdoc-css, r=notriddle
Merge settings.css into rustdoc.css

There aren't that many CSS rules in `settings.css`, however quite some code is needed around it, making it more costly than useful. I think it's better to merge into `rustdoc.css` to simplify this.

r? `@notriddle`
2023-09-13 18:37:43 +02:00
Matthias Krüger
565b9c2264
Rollup merge of #115798 - RalfJung:non_1zst_field, r=wesleywiser
add helper method for finding the one non-1-ZST field
2023-09-13 18:37:42 +02:00
Matthias Krüger
1ec29fb24f
Rollup merge of #115771 - RalfJung:no-more-const-err-lint, r=oli-obk
cleanup leftovers of const_err lint

Some code / comments seem to not have been updated when const_err was turned into a hard error, so we can do a bit of cleanup here.

r? `@oli-obk`
2023-09-13 18:37:42 +02:00
Matthias Krüger
5dc37c1966
Rollup merge of #115736 - Zoxc:time-cleanup, r=wesleywiser
Remove `verbose_generic_activity_with_arg`

This removes `verbose_generic_activity_with_arg` and changes users to `generic_activity_with_arg`. This keeps the output of `-Z time` readable while these repeated events are still available with the self profiling mechanism.
2023-09-13 18:37:41 +02:00
bors
5adddad28c Auto merge of #115797 - cjgillot:const-prop-noclone, r=oli-obk
Do not clone the Body for ConstProp

~Based on https://github.com/rust-lang/rust/pull/115748 for the `POST_MONO_CHECKS` flag.~
2023-09-13 16:30:07 +00:00
Jakub Beránek
f13b54546b
Resolve clippy warnings 2023-09-13 18:12:41 +02:00
Jakub Beránek
6c718b5b8a
Refactor rustc-perf building 2023-09-13 18:11:34 +02:00
bohan
7c53e87d55 fix: skip opt if body has tainted error 2023-09-13 23:07:39 +08:00
Matthew Jasper
e324a59eb6 Address review comments
- Add doc comment to new type
- Restore "only supported directly in conditions of `if` and `while` expressions" note
- Rename variant with clearer name
2023-09-13 15:00:31 +00:00
bors
76e59c71e8 Auto merge of #115803 - RalfJung:const-eval, r=oli-obk
make the eval() functions on our const types return the resulting value

This is a part of https://github.com/rust-lang/rust/pull/115748 that's hopefully perf-neutral, and that does not depend on https://github.com/rust-lang/rust/pull/115764.
2023-09-13 14:41:55 +00:00
Nikolay Arhipov
41ee874fa9 Disabled socketpair for Vita 2023-09-13 16:41:38 +03:00
bors
735bb7e5df Auto merge of #115269 - bvanjoi:fix-113834, r=petrochenkov
resolve: mark binding is determined after all macros had been expanded

Fixes #113834
Fixes #115377

r? `@petrochenkov`
2023-09-13 12:11:53 +00:00
Guillaume Gomez
9944f01c66 Merge settings.css into rustdoc.css 2023-09-13 13:59:43 +02:00
John Kåre Alsaker
c64e15e817 Bring back verbose_generic_activity_with_arg 2023-09-13 13:41:19 +02:00
John Kåre Alsaker
9624c30965 Generate MIR pass names for profiling on the fly and pass the body DefId as argument 2023-09-13 13:41:19 +02:00
bors
7e0261e7ea Auto merge of #115735 - bjorn3:better_list_crate_metadata, r=wesleywiser
Extend rustc -Zls

This makes it show a lot more things and thus a lot more useful.
2023-09-13 10:23:57 +00:00
Ralf Jung
8ef6b7a417 restore the old logic adjusting ty::UnevaluatedConst before evaluation 2023-09-13 11:47:21 +02:00
bohan
f1536507e1 resolve: determined binding after parent module macro expand 2023-09-13 16:38:05 +08:00
Kai Luo
122d1cc8c3 Adjust comment 2023-09-13 16:10:26 +08:00
Kai Luo
5049a7167c Adjust comment 2023-09-13 16:08:23 +08:00
Kai Luo
fc17e09029 Add comment to elaborate 2023-09-13 16:05:50 +08:00
bors
38a16ef731 Auto merge of #115810 - nnethercote:folding-comments, r=WaffleLapkin
Folding comments

r? `@WaffleLapkin`
2023-09-13 07:38:50 +00:00
Kai Luo
2962528b4a Make AIX known by bootstrap 2023-09-13 15:04:34 +08:00
Nicholas Nethercote
4d8e50b2d3 Comments to clarify the working of HasTypeFlagsVisitor. 2023-09-13 16:50:35 +10:00
Nicholas Nethercote
df98a74c32 Explain why TypeFoldable is a sub-trait of TypeVisitable. 2023-09-13 16:50:35 +10:00
Nicholas Nethercote
593373f17d Fix some minor mistakes in comments. 2023-09-13 16:50:26 +10:00
Ralf Jung
11a4a24d8e make the set of methods between our two Const types more consistent 2023-09-13 07:29:34 +02:00
Ralf Jung
6e4779ab17 make the eval() functions on our const types return the resulting value 2023-09-13 07:29:34 +02:00
bors
1fe747c160 Auto merge of #115793 - spastorino:smir-explicit-predicates-of, r=oli-obk
Add explicit_predicates_of to SMIR

Adding `explicit_predicates_of` so we can use it from Mir formality.

r? `@oli-obk`
2023-09-13 04:51:19 +00:00
bors
8e455dba67 Auto merge of #115706 - RalfJung:compiletest-truncation, r=wesleywiser
Make compiletest output truncation less disruptive

When the test output becomes too large, compiletest stops recording all of it. However:
- this can lead to invalid JSON, which then causes compiletest itself to throw further errors
- the note that output was truncated is in the middle of the output, with >100kb of text on each side; that makes it almost impossible to actually see that note in the terminal

So assuming that we do need to keep the output truncation, I propose that we only ever do a cut at the end, so that it is very clear by looking at the end of the log that truncation happened. I added a message at the beginning of the output as well. Also I added some logic to make it less likely that we'll cut things off in the middle of a JSON record. (I tested that successfully by reducing the output limit to something very low and running a few ui tests.) Furthermore I increased the max buffer size to 512KB; that's really not a lot of memory compared to how much RAM it takes to build rustc (it's ~25% more than the previous maximum HEAD+TAIL length). And finally, the information that things got truncated is now propagated to the higher levels, so that we can fail the test instead of comparing the truncated output with the reference.

Fixes https://github.com/rust-lang/rust/issues/115675
Fixes https://github.com/rust-lang/rust/issues/96229
Fixes https://github.com/rust-lang/rust/issues/94322
Fixes https://github.com/rust-lang/rust/issues/92211
2023-09-13 01:54:47 +00:00