Commit Graph

238661 Commits

Author SHA1 Message Date
Augie Fackler
5d8d700fd3 tests: update check for inferred nneg on zext
This was broken by upstream
llvm/llvm-project@dc6d077396. It's easy
enough to use a regex match to support both, so we do that.

r? @nikic
@rustbot label: +llvm-main
2023-11-13 10:43:33 -05:00
bors
4bd2fd5c83 Auto merge of #117876 - lcnr:region-kind-rename, r=BoxyUwU
`ReLateBound` -> `ReBound`

first step of https://github.com/rust-lang/types-team/issues/95

already fairly large xx

there's some future work here I intentionally did not contribute as part of this PR, from my notes:
- `DescriptionCtx` to `DescriptionCtxt`
- what is `CheckRegions::Bound`?
- `collect_late_bound_regions` et al
- `erase_late_bound_regions` -> `instantiate_bound_regions_with_erased`?
- `EraseEarlyRegions` should be removed, feels duplicate

r? `@BoxyUwU`
2023-11-13 15:33:01 +00:00
lcnr
8935a1be01 update type flags
- `HAS_RE_LATE_BOUND` -> `HAS_RE_BOUND`
- `HAS_TY_LATE_BOUND` -> `HAS_TY_BOUND`
- `HAS_CT_LATE_BOUND` -> `HAS_CT_BOUND`
- `HAS_LATE_BOUND` -> `HAS_BOUND_VARS`
- `fn has_late_bound_regions` -> `fn has_bound_regions`
- `fnhas_non_region_late_bound` -> `fn has_non_region_bound_vars`
- `fn has_late_bound_vars` -> `fn has_bound_vars`
2023-11-13 14:13:54 +00:00
lcnr
dd0739aabe continue renaming
- `RegionVariableOrigin::~~Late~~BoundRegion`
- `~~Late~~BoundRegionConversionTime`
2023-11-13 14:13:54 +00:00
lcnr
86fa1317a3 rename ReLateBound to ReBound
other changes:
- `Region::new_late_bound` -> `Region::new_bound`
- `Region::is_late_bound` -> `Region::is_bound`
2023-11-13 14:13:54 +00:00
lcnr
28328c8389 remove unnecessary _ in variable name 2023-11-13 14:13:54 +00:00
lcnr
85883503c3 add fixme to RegionCtxt 2023-11-13 14:13:54 +00:00
bors
1ab2bcda43 Auto merge of #117811 - MU001999:master, r=lcnr
Turn assert_eq into a delay_span_bug

Fixes #117789
2023-11-13 12:17:22 +00:00
lcnr
42945fc1e2 args~~_ref~~_may_unify 2023-11-13 11:27:15 +00:00
bors
891c6eebe6 Auto merge of #117864 - notriddle:notriddle/rustdoc-root, r=GuillaumeGomez
rustdoc: use `.rustdoc` class instead of `body`

This didn't show up in our local tests, because the problem is actually caused by docs.rs rewritten HTML (which relocates the classes that this code looked for from the body tag to a child div).

Fixes #117290

r? `@GuillaumeGomez`

Both problems are regressions introduced by #115948
2023-11-13 10:11:19 +00:00
Ralf Jung
6dd2ea0f35 features must be additive 2023-11-13 09:41:45 +01:00
bors
c225c45bce Auto merge of #117862 - SpeedReach:patch-1, r=nnethercote
Fix comment in compiler/rustc_ast/src/token.rs.

Gt -> Greater than -> `>`
Ge -> Greater equal -> `>=`
2023-11-13 08:14:01 +00:00
Michael Howell
8b1bcc8d5b rustdoc: use .rustdoc class instead of body
This didn't show up in our local tests, because the problem is actually
caused by docs.rs rewritten HTML (which relocates the classes that this
code looked for from the body tag to a child div).

Fixes #117290
2023-11-12 23:21:21 -07:00
bors
b5cdb9631f Auto merge of #117827 - Zalathar:bogus-macro-name-span, r=davidtwco
coverage: Avoid creating malformed macro name spans

This is a workaround for #117788. It detects a particular scenario where we would create malformed coverage spans that might cause `llvm-cov` to immediately exit with an error, preventing the user from processing coverage reports.

The patch has been kept as simple as possible so that it's trivial to backport to beta (or stable) if desired.

---

The `maybe_push_macro_name_span` method is trying to detect macro invocations, so that it can split a span into two parts just after the `!` of the invocation.

Under some circumstances (probably involving nested macros), it gets confused and produces a span that is larger than the original span, and possibly extends outside its enclosing function and even into an adjacent file.

In extreme cases, that can result in malformed coverage mappings that cause `llvm-cov` to fail. For now, we at least want to detect these egregious cases and avoid them, so that coverage reports can still be produced.
2023-11-13 06:16:27 +00:00
Nicholas Nethercote
82e396a4ba Remove unnecessary annotation. 2023-11-13 17:09:26 +11:00
Nicholas Nethercote
2433542b41 Remove IndexSlice::convert_index_type. 2023-11-13 17:00:48 +11:00
Nicholas Nethercote
8b18c16ecb Remove impl FiniteBitSetTy for {u64,u128}.
Only the impl for `u32` is used. These can be reinstated easily if
needed in the future.
2023-11-13 16:44:20 +11:00
Nicholas Nethercote
b7cf697a6d Remove BitSet::to_hybrid. 2023-11-13 16:26:26 +11:00
Nicholas Nethercote
06faf589ac Remove BitSet::words. 2023-11-13 16:24:16 +11:00
Sleep_AllDay
8c0ae83723
Fix comment
Gt => Greater than => `>`
Ge => Greater equal => `>=`
2023-11-13 13:15:55 +08:00
Mark Rousskov
8e2da60f0d Cranelift isn't available on non-nightly channels 2023-11-12 21:45:54 -05:00
Michael Goulet
7994b5849c Compute layout with spans for better cycle errors in coroutines 2023-11-13 02:22:25 +00:00
bors
ea1e5cc91f Auto merge of #117770 - sjwang05:issue-117766, r=estebank,TaKO8Ki
Catch stray `{` in let-chains

Fixes #117766
2023-11-13 01:57:59 +00:00
Zalathar
514e324c32 coverage: Regression test for #117788
Without the workaround applied, this test will produce malformed mappings that
cause `llvm-cov` to fail.

(And if it does emit well-formed mappings, they should be obviously incorrect.)
2023-11-13 12:31:44 +11:00
Esteban Küber
69634f2077 Always point at index span on index obligation failure
Use more targetted span for index obligation failures by rewriting the
obligation cause span.

CC #66023
2023-11-13 00:52:10 +00:00
Mu001999
62b6529e03 Turn assert_eq into a delay_span_bug 2023-11-13 08:36:12 +08:00
bors
0828c159c5 Auto merge of #117855 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-11-12 22:47:43 +00:00
sjwang05
274824b917
Fix is_keyword_ahead visibility
Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
2023-11-12 14:46:01 -08:00
Nicholas Nethercote
aefbb616af Remove -Zperf-stats.
The included measurements have varied over the years. At one point there
were quite a few more, but #49558 deleted a lot that were no longer
used. Today there's just four, and it's a motley collection that doesn't
seem particularly valuable.

I think it has been well and truly subsumed by self-profiling, which
collects way more data.
2023-11-13 09:45:20 +11:00
Michael Goulet
99664b0bbf Don't expect a rcvr in print_disambiguation_help 2023-11-12 19:59:13 +00:00
Michael Goulet
121d9f5b16 make LayoutError::Cycle carry ErrorGuaranteed 2023-11-12 18:59:18 +00:00
bors
f86fa09ec6 Auto merge of #3159 - eduardosm:sse41-round, r=RalfJung
Implement round.ps and round.pd SSE4.1 intrinsics

I had forgotten them.

I also increased the coverage of rounding tests to make sure the rounding direction is working as expected (e.g. test `1.25`, `1.5`, `1.75`...).
2023-11-12 18:24:42 +00:00
Eduardo Sánchez Muñoz
d927f41fa4 Improve SSE4.1 rounding tests coverage
To make sure the rounding direction is working as expected
2023-11-12 18:55:59 +01:00
bors
2b603f95a4 Auto merge of #116778 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
Add 1.74 release notes

r? `@cuviper` `@rust-lang/release`
2023-11-12 16:30:38 +00:00
Mark Rousskov
ff7c684ed0 Add initial 1.74 release notes 2023-11-12 11:26:20 -05:00
bors
9721690ac5 Auto merge of #3158 - RalfJung:tls-rename, r=RalfJung
more consistent naming for TLS tests

"tls_static" for `#[thread_local] static`, "tls_macro" for `thread_local!`
2023-11-12 16:15:47 +00:00
Ralf Jung
10c9e7594e more consistent naming for TLS tests 2023-11-12 17:14:13 +01:00
bors
eb2c643bf1 Auto merge of #2931 - max-heller:issue-2881, r=RalfJung
Treat thread-local statics on main thread as static roots for leakage analysis

Miri currently treats allocations as leaked if they're only referenced in thread-local statics. For threads other than the main thread, this is correct, since the thread can terminate before the program does, but references in the main thread's locals should be treated as living for the duration of the program since the thread lives for the duration of the program.

This PR adds thread-local statics and TLS keys as "static roots" for leakage analysis, but does not yet bless the example program from #2881. See https://github.com/rust-lang/miri/issues/2881#issuecomment-1585666652

Closes #2881
2023-11-12 15:33:24 +00:00
max-heller
c226533cbd allow allocations referenced by main thread TLS to leak 2023-11-12 16:31:14 +01:00
Eduardo Sánchez Muñoz
7f201f88a4 Implement roundps and roundpd SSE4.1 intrinsics 2023-11-12 16:23:10 +01:00
bors
e25a04fbe5 Auto merge of #3143 - devnexen:fbsd_update, r=RalfJung
freebsd interceptions update proposal
2023-11-12 13:24:22 +00:00
Ralf Jung
ba523be7a8 better error when calling pthread shims on unsupported unixes 2023-11-12 14:22:55 +01:00
Ralf Jung
887ffc68ee tweak comments 2023-11-12 14:18:22 +01:00
Ralf Jung
5b5006916b target_feature: make it more clear what that 'Option' means 2023-11-12 12:46:05 +01:00
David Carlier
be6f27b686 freebsd interceptions update proposal 2023-11-12 11:17:24 +00:00
Nilstrieb
8bcd221b4c Small improvements in object lifetime default code
I found those while trying to understand how the code works.
2023-11-12 11:59:01 +01:00
Zalathar
ed8298b825 coverage: Avoid creating malformed macro name spans
This method is trying to detect macro invocations, so that it can split a span
into two parts just after the `!` of the invocation.

Under some circumstances (probably involving nested macros), it gets confused
and produces a span that is larger than the original span, and possibly extends
outside its enclosing function and even into an adjacent file.

In extreme cases, that can result in malformed coverage mappings that cause
`llvm-cov` to fail. For now, we at least want to detect these egregious cases
and avoid them, so that coverage reports can still be produced.
2023-11-12 18:33:11 +11:00
bors
a04d56b36d Auto merge of #117817 - fmease:deny-more-tilde-const, r=fee1-dead
Deny more `~const` trait bounds

thereby fixing a family of ICEs (delayed bugs) for `feature(const_trait_impl, effects)` code.

As discussed
r? `@fee1-dead`
2023-11-12 04:40:44 +00:00
León Orell Valerian Liehr
8ce5d784a6
Deny more ~const trait bounds 2023-11-12 00:00:12 +01:00
James Dietz
3f0908f47c round to even 2023-11-11 17:22:07 -05:00