Commit graph

241784 commits

Author SHA1 Message Date
DianQK
251322ea3d
Revert "Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix"
This reverts commit 8c2b577217, reversing
changes made to 9cf18e98f8.
2024-01-12 18:27:00 +08:00
DianQK
59ccbe306a
Revert "Auto merge of #118568 - DianQK:no-builtins-symbols, r=pnkfelix"
This reverts commit 503e129328, reversing
changes made to 0e7f91b75e.
2024-01-12 18:26:42 +08:00
bors
f732c37b41 Auto merge of #119861 - cuviper:beta-next, r=cuviper
[beta] backports

- mir-opt and custom target fixes #119619
- Update LLVM submodule #119802

r? ghost
2024-01-12 00:58:24 +00:00
Nikita Popov
5539d3f5b1 Update LLVM submodule
(cherry picked from commit 9ff3083b27)
2024-01-11 10:06:02 -08:00
onur-ozkan
cabbd1ec09 fix the incorrect target on stage1 ui-fulldeps tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit b888e2f82b)
2024-01-11 10:05:54 -08:00
onur-ozkan
57d0a1832b detect user-specified custom targets in compiletest
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 26c71cbcf1)
2024-01-11 10:05:54 -08:00
onur-ozkan
053fa8996d enable RUSTC_BOOTSTRAP on panic=abort mir-opt test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
(cherry picked from commit 8aa7dd06f6)
2024-01-11 10:05:54 -08:00
bors
7bcd95c596 Auto merge of #119743 - lukas-code:beta-z-index, r=notriddle
[beta] rustdoc ui: adjust tooltip z-index to be above sidebar

Backport of https://github.com/rust-lang/rust/pull/119477.
Fixes https://github.com/rust-lang/rust/issues/119472.

range-diff:
```range-diff
446:  d796ad4209 =  11:  53637cdd8e rustdoc ui: adjust tooltip z-index to be above sidebar
459:  b1853eb3bd !  12:  c4c4ff67fa use css variable for z-index of the sidebar
    `@@` src/librustdoc/html/static/css/rustdoc.css: so that we can apply CSS-filters to
        margin-top: 7px;
        border-radius: 3px;
        border: 1px solid var(--border-color);
    -`@@` src/librustdoc/html/static/css/rustdoc.css: a.tooltip:hover::after {
    - }
    - .src #sidebar-button {
    -   left: 8px;
    --  z-index: 101;
    -+  z-index: calc(var(--desktop-sidebar-z-index) + 1);
    - }
    - .hide-sidebar .src #sidebar-button {
    -   position: static;
```

The "show sidebar" button on the [source view page](https://doc.rust-lang.org/nightly/src/std/lib.rs.html) works differently on beta and nightly, but it is in fact above the sidebar in both versions.

beta button:
![beta button](https://github.com/rust-lang/rust/assets/26522220/24d7e86f-d19e-452f-bef2-6b6004b42255)

nightly button:
![nightly button](https://github.com/rust-lang/rust/assets/26522220/239dfdda-d9ca-4945-94dd-96254ed1c13f)

cc `@Mark-Simulacrum`
2024-01-11 06:24:20 +00:00
bors
3a3478ec4f Auto merge of #119528 - wesleywiser:revert_117472, r=nnethercote
[beta] Revert #117472: Stabilize C string literals

Based on discussion in [#t-lang](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/rfc.203349.3A.20mixed.20utf8.20literals), revert the stabilization of C string literals in Rust 1.76.

I also reverted #118566 as it uses the newly stabilized C string literals in various places.
2024-01-10 20:04:25 +00:00
Wesley Wiser
b2d48cad85 Revert reference and edition-guide c-str literal changes 2024-01-09 10:43:49 -06:00
Lukas Markeffsky
c4c4ff67fa use css variable for z-index of the sidebar
and calculate the z-indices of things that go over the sidebar
2024-01-08 14:16:15 +00:00
Lukas Markeffsky
53637cdd8e rustdoc ui: adjust tooltip z-index to be above sidebar 2024-01-08 14:15:04 +00:00
bors
650745ceb2 Auto merge of #119719 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backport rollup

This PR backports:

- #119544: Fix: Properly set vendor in i686-win7-windows-msvc target
- #118796: Exhaustiveness: Improve complexity on some wide matches
- #119546: Temporarily disable M1 runners on GitHub Actions
- #119584: [beta] Clippy (early) beta backport
- #119559: [beta-1.76] Update cargo

And also:

- Bumps stage0 to released stable.

r? `@Mark-Simulacrum`
2024-01-08 02:08:02 +00:00
Weihang Lo
94fdd66dd6 [beta-1.76] Update cargo 2024-01-07 18:02:45 -05:00
Mark Rousskov
fbae4830f8 Bump to released 1.75 stable 2024-01-07 18:02:45 -05:00
Jan David
671ef1a1e1 Temporarily disable M1 runners on GitHub Actions
This commit temporarily reverts the addition of M1 runners on GitHub
Actions to work around a billing issue related to their beta. It also
removes the `aarch64-apple` job, which was only added after the addition
of M1 runners. Since it has never been tested on the prior hardware, we
are skipping the tests to reduce the risk of build failures.
2024-01-07 18:02:45 -05:00
Tethys Svensson
e5b49e0b10 Move uninhabited_references to nursery 2024-01-07 18:02:45 -05:00
Nadrieril
dc9a050835 Rework the explanation of relevancy 2024-01-07 18:02:45 -05:00
Nadrieril
2e26527251 Improve performance on wide matches 2024-01-07 18:02:45 -05:00
roblabla
875ee3974a Fix: Properly set vendor in i686-win7-windows-msvc target 2024-01-07 17:26:29 -05:00
Wesley Wiser
99aa435b70 Fix fallout of making c_str_literals unstable again 2024-01-02 16:57:56 -06:00
Wesley Wiser
13f11301cc Revert "Stabilize C string literals"
This reverts commit 0f41bc21b9.
2024-01-02 15:27:05 -06:00
bors
0e09125c6c Auto merge of #119187 - pietroalbini:pa-beta-1.76, r=pietroalbini
[beta] Prepare 1.76 beta

This PR bumps the channel to beta and updates the version placeholders for stabilizations.

r? `@ghost`
2023-12-21 18:50:31 +00:00
Pietro Albini
e3bcfca286
run fuchsia tests only on nightly 2023-12-21 18:26:02 +01:00
Pietro Albini
efd6564318
update version placeholders 2023-12-21 15:43:00 +01:00
Pietro Albini
3652749b79
bump channel to beta 2023-12-21 15:42:56 +01:00
bors
920e0051cf Auto merge of #119056 - cjgillot:codegen-overalign, r=wesleywiser
Tolerate overaligned MIR constants for codegen.

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

cc `@saethlin`
2023-12-21 04:01:36 +00:00
bors
3694a6b20a Auto merge of #119170 - matthiaskrgr:rollup-nllgdf2, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #119135 (Fix crash due to `CrateItem::kind()` not handling constructors)
 - #119141 (Add method to get instance instantiation arguments)
 - #119145 (Give `VariantData::Struct`  named fields, to clairfy `recovered`.)
 - #119167 (E0761: module directory has .rs suffix)
 - #119168 (resolve: Stop feeding visibilities for import list stems)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-21 01:43:07 +00:00
Matthias Krüger
c36bb5dbb1
Rollup merge of #119168 - petrochenkov:feedvis4, r=compiler-errors
resolve: Stop feeding visibilities for import list stems

Fixes https://github.com/rust-lang/rust/issues/119126
2023-12-20 21:19:00 +01:00
Matthias Krüger
906606d5a3
Rollup merge of #119167 - alef:patch-1, r=compiler-errors
E0761: module directory has .rs suffix

`rustc --explain E0761` example seems wrong.
2023-12-20 21:19:00 +01:00
Matthias Krüger
d0d814ff48
Rollup merge of #119145 - aDotInTheVoid:variantdata-struct-struct, r=compiler-errors
Give `VariantData::Struct`  named fields, to clairfy `recovered`.

Implements https://github.com/rust-lang/rust/pull/119121#discussion_r1431467066. Supersedes #119121

This way, it's clear what the bool fields means, instead of having to find where it's generated. Changes both ast and hir.

r? `@compiler-errors`
2023-12-20 21:18:59 +01:00
Matthias Krüger
f6a04f693b
Rollup merge of #119141 - celinval:smir-instance-args, r=compiler-errors
Add method to get instance instantiation arguments

Add a method to get the instance instantiation arguments, and include that information in the instance debug.
2023-12-20 21:18:59 +01:00
Matthias Krüger
b55887dc7a
Rollup merge of #119135 - celinval:smir-small-changes, r=compiler-errors
Fix crash due to `CrateItem::kind()` not handling constructors

Also add a method to get the instance instantiation arguments, and include that information in the instance debug.
2023-12-20 21:18:58 +01:00
Celina G. Val
e0a4693294 Add method to get instance instantiation arguments 2023-12-20 11:07:06 -08:00
Celina G. Val
7ab38b80eb Add ItemKind::Ctor to stable mir 2023-12-20 10:53:40 -08:00
Celina G. Val
48c7cc2090 Add a small test for the case that was crashing 2023-12-20 10:50:40 -08:00
Celina G. Val
a8556da672 Fix crash for CrateItem::kind() with constructors
Change how we classify item kind for DefKind::Ctor
2023-12-20 10:50:40 -08:00
bors
5ac4c8a63e Auto merge of #119037 - RalfJung:repr-c-abi-mismatch, r=scottmcm
do not allow ABI mismatches inside repr(C) types

In https://github.com/rust-lang/rust/pull/115476 we allowed ABI mismatches inside `repr(C)` types. This wasn't really discussed much; I added it because from how I understand calling conventions, this should actually be safe in practice. However I entirely forgot to actually allow this in Miri, and in the mean time I have learned that too much ABI compatibility can be a problem for CFI (it can reject fewer calls so that gives an attacker more room to play with).

So I propose we take back that part about ABI compatibility in `repr(C)`. It is anyway something that C and C++ do not allow, as far as I understand.

In the future we might want to introduce a class of ABI compatibilities where we say "this is a bug and it may lead to aborting the process, but it won't lead to arbitrary misbehavior -- worst case it'll just transmute the arguments from the caller type to the callee type". That would give CFI leeway to reject such calls without introducing the risk of arbitrary UB. (The UB can still happen if the transmute leads to bad results, of course, but it wouldn't be due to ABI weirdness.)

#115476 hasn't reached beta yet so if we land this before Dec 22nd we can just pretend this all never happened. ;)  Otherwise we should do a beta backport (of the docs change at least).

Cc `@rust-lang/opsem` `@rust-lang/types`
2023-12-20 18:04:40 +00:00
Vadim Petrochenkov
006e0ef18d resolve: Stop feeding visibilities for import list stems 2023-12-20 20:27:10 +03:00
alef
821fddeba5
E0761: module directory has .rs suffix 2023-12-20 17:05:56 +01:00
bors
92ad4b433a Auto merge of #119166 - GuillaumeGomez:rollup-qfgj76w, r=GuillaumeGomez
Rollup of 3 pull requests

Successful merges:

 - #119115 (Update documentation for `--env` compilation flag)
 - #119155 (coverage: Check for `async fn` explicitly, without needing a heuristic)
 - #119159 (Update LLVM submodule)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-20 16:01:46 +00:00
Guillaume Gomez
c76841928d
Rollup merge of #119159 - petrochenkov:llvmup, r=nikic
Update LLVM submodule

to pick up "[M68k] Fix ODR violation in GISel code (#72797)" https://github.com/rust-lang/llvm-project/pull/159.

Fixes https://github.com/rust-lang/rust/issues/107668
2023-12-20 16:29:55 +01:00
Guillaume Gomez
5906d8f0cf
Rollup merge of #119155 - Zalathar:async-fn, r=compiler-errors
coverage: Check for `async fn` explicitly, without needing a heuristic

The old code used a heuristic to detect async functions and adjust their coverage spans to produce better output. But there's no need to resort to a heuristic when we can just look back at the original definition and check whether the current function is actually an `async fn`.

In addition to being generally nicer, this also gets rid of the one piece of code that specifically cares about `CoverageSpan::is_closure` representing an actual closure. All remaining code that inspects that field just uses it as an indication that the span is a hole that should be carved out of other spans, and then discarded.

That opens up the possibility of introducing other kinds of “hole” spans, e.g. for nested functions/types/macros, and having them all behave uniformly.

---

`@rustbot` label +A-code-coverage
2023-12-20 16:29:55 +01:00
Guillaume Gomez
0bbcdb2aa3
Rollup merge of #119115 - GuillaumeGomez:env-docs, r=Nilstrieb
Update documentation for `--env` compilation flag

Part of https://github.com/rust-lang/rust/issues/80792.
As mentioned in https://github.com/rust-lang/rust/pull/118830.

It adds a mention to `tracked_env::var` and also clarifies what triggers a new compilation.

r? `@Nilstrieb`
2023-12-20 16:29:54 +01:00
Guillaume Gomez
2679bca97a Add link to explanations about dep-info files 2023-12-20 15:37:45 +01:00
bors
8fca8295cb Auto merge of #119136 - petrochenkov:feedvis3, r=WaffleLapkin
resolve: Eagerly feed closure visibilities

Also factor out all tcx-dependent operations performed for every created definition into `TyCtxt::create_def`.

Addresses https://github.com/rust-lang/rust/pull/118657#discussion_r1421424277
2023-12-20 14:03:00 +00:00
Vadim Petrochenkov
8468840a56 Update LLVM submodule
to pick up "[M68k] Fix ODR violation in GISel code (#72797)" https://github.com/rust-lang/llvm-project/pull/159
2023-12-20 16:50:43 +03:00
bors
f9d52dc594 Auto merge of #119134 - petrochenkov:feedvis2, r=compiler-errors
resolve: Feed visibilities for unresolved trait impl items

Fixes https://github.com/rust-lang/rust/issues/119073
2023-12-20 11:13:22 +00:00
Vadim Petrochenkov
5e5d82e803 resolve: Eagerly feed closure visibilities
Also factor out all tcx-dependent operations performed for every created definition into `TyCtxt::create_def`
2023-12-20 13:42:58 +03:00
bors
3e4a15ea06 Auto merge of #119156 - matthiaskrgr:rollup-482ow65, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #118691 (Add check for possible CStr literals in pre-2021)
 - #118973 (rustc_codegen_ssa: Don't drop `IncorrectCguReuseType` , make `rustc_expected_cgu_reuse` attr work)
 - #119071 (-Znext-solver: adapt overflow rules to avoid breakage)
 - #119089 (effects: fix a comment)
 - #119094 (Add function ABI and type layout to StableMIR)
 - #119102 (Add arm-none-eabi and armv7r-none-eabi platform-support documentation.)
 - #119107 (subtype_predicate: remove unnecessary probe)

Failed merges:

 - #119135 (Fix crash due to `CrateItem::kind()` not handling constructors)
 - #119141 (Add method to get instance instantiation arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-20 09:14:25 +00:00