Commit Graph

233634 Commits

Author SHA1 Message Date
Camille GILLOT
f96c6e04cb Propagate PlaceElem::Index. 2023-09-06 16:09:31 +00:00
Camille GILLOT
fc63543792 Support array length. 2023-09-06 16:05:04 +00:00
Camille GILLOT
22986b72e5 Implement algebraic simplifications. 2023-09-06 15:57:50 +00:00
Camille GILLOT
74a967bcec Support a few more rvalues. 2023-09-06 15:52:06 +00:00
Ralf Jung
73d8dcb803 miri: catch function calls where the argument is caller-invalid / the return value callee-invalid 2023-09-06 16:36:00 +02:00
ouz-a
cc7c5ad20b Ty Debug now prints id and kind 2023-09-06 15:02:03 +03:00
bors
a0c28cd9dc Auto merge of #115401 - Zoxc:freeze, r=oli-obk
Add `FreezeLock` type and use it to store `Definitions`

This adds a `FreezeLock` type which allows mutation using a lock until the value is frozen where it can be accessed lock-free. It's used to store `Definitions` in `Untracked` instead of a `RwLock`. Unlike the current scheme of leaking read guards this doesn't deadlock if definitions is written to after no mutation are expected.
2023-09-06 11:48:43 +00:00
Guillaume Gomez
c4bb70f51b Add regression test for private fields in tuple struct 2023-09-06 13:26:56 +02:00
bors
c1d80ba9e2 Auto merge of #115532 - oli-obk:smir_folder, r=compiler-errors
Implement SMIR generic parameter instantiation

Also demonstrates the use of it with a test.

This required a few smaller changes that may conflict with `@ericmarkmartin` work, but should be easy to resolve any conflicts on my end if their stuff lands first.
2023-09-06 09:50:13 +00:00
mojave2
cfa2119563
add a regression test 2023-09-06 17:46:46 +08:00
mojave2
df6e6a6d08
fix #115348 2023-09-06 17:46:46 +08:00
John Kåre Alsaker
35e8b67fc2 Use a reference to the lock in the guards 2023-09-06 11:44:06 +02:00
Oli Scherer
65f25fe194 Don't report any errors in lower_intrinsics. They should have been typecked before. 2023-09-06 09:38:15 +00:00
Michael Goulet
1abbd4cd4f Render missing fields in tuple struct/enum as /* private fields */ 2023-09-06 11:16:05 +02:00
Ralf Jung
e66913f8fe rustc_layout/abi: error when attribute is applied to the wrong thing 2023-09-06 11:11:06 +02:00
Ralf Jung
9570cac019 rustc_abi: also support debugging function pointers 2023-09-06 11:11:06 +02:00
ouz-a
7928c5f830 make comments less cryptic 2023-09-06 12:09:29 +03:00
Oli Scherer
0f4ff52e00 Implement and test monomorphization 2023-09-06 08:16:04 +00:00
Oli Scherer
202fbed1a6 Allow fetching the SMIR body of FnDefs 2023-09-06 08:16:04 +00:00
Oli Scherer
98d26d9c4d Deopaquify ParamConst 2023-09-06 08:16:04 +00:00
Oli Scherer
627fa80bdf Add types to all constants 2023-09-06 08:16:04 +00:00
Oli Scherer
a370f1baa3 Also use Const in SMIR instead of just ConstantKind 2023-09-06 08:16:04 +00:00
Oli Scherer
7f009e54bd Fail to test argument instantiation since we don't have types for most constants 2023-09-06 08:16:04 +00:00
Oli Scherer
b43e3b9f41 Add type folder to SMIR 2023-09-06 08:15:42 +00:00
bors
24bece8420 Auto merge of #115453 - ibraheemdev:patch-16, r=joshtriplett
Stabilize `io_error_other` feature

Per the FCP for https://github.com/rust-lang/rust/issues/91946.
2023-09-06 08:00:25 +00:00
John Kåre Alsaker
fe614712dd Extract parallel operations in rustc_data_structures::sync into a new parallel submodule 2023-09-06 09:47:34 +02:00
Goldstein
e0593f30fb
fix log formatting in bootstrap 2023-09-06 10:14:09 +03:00
Nicholas Nethercote
42dbc72d7b Adjust to_attr_token_stream.
It uses `once` chained with `(0..self.num_calls).map(...)` followed by
`.take(self.num_calls`. I found this hard to read. It's simpler to just
use `repeat_with`.
2023-09-06 17:12:07 +10:00
bors
3767e315ac Auto merge of #115593 - weihanglo:update-cargo, r=weihanglo
Update cargo

21 commits in 96fe1c9e1aecd8f57063e3753969bb6418fd2fd5..d14c85f4e6e7671673b1a1bc87231ff7164761e1
2023-08-29 20:10:34 +0000 to 2023-09-05 22:28:10 +0000
- fix(resolver): Make resolver behavior independent of package order (rust-lang/cargo#12602)
- cargo-credential: change serialization of cache expiration (rust-lang/cargo#12622)
- Update registry-web-api.md yank/unyank comments (rust-lang/cargo#12619)
- test: new options of debuginfo are no longer unstable (rust-lang/cargo#12618)
- use split_once for cleaner code (rust-lang/cargo#12615)
- stop using lazy_static (rust-lang/cargo#12616)
- doc: adjust all doc headings one level up (rust-lang/cargo#12595)
- chore(deps): update compatible (rust-lang/cargo#12609)
- chore(deps): update rust crate cargo_metadata to 0.17.0 (rust-lang/cargo#12610)
- Prepare for partial-version package specs (rust-lang/cargo#12591)
- refactor: Use more serde_untagged (rust-lang/cargo#12581)
- fix(cli): Help users know possible `--target` values (rust-lang/cargo#12607)
- Tab completion for --target uses rustup but fallsback to rustc (rust-lang/cargo#12606)
- Fewer temporary needless strings (rust-lang/cargo#12604)
- fix(help): Provide better commands heading for styling (rust-lang/cargo#12593)
- fix(update): Clarify meaning of --aggressive as --recursive (rust-lang/cargo#12544)
- docs(changelog): Clarify language for Cargo.lock policy (rust-lang/cargo#12601)
- fix typo: "default branch branch" -> "default branch" (rust-lang/cargo#12598)
- fix: add error for unsupported credential provider version (rust-lang/cargo#12590)
- fix(help): Explain --explain (rust-lang/cargo#12592)
- fix(help): Remove redundant information from new/init (rust-lang/cargo#12594)

r? ghost
2023-09-06 06:11:25 +00:00
Weihang Lo
2619a6ea51
Update cargo 2023-09-06 12:58:59 +08:00
bors
51a9df8c70 Auto merge of #115584 - ezekielathome:docs-pattern-inconsistency, r=compiler-errors
replace doc occurrences of ItemLikeVisitor

Solves #114885

ItemLikeVisitor used to have comments describing visit patterns. After it was removed, it was moved to `rustc_hir::intravisit` but references in `intravisit.rs` weren't updated.
2023-09-06 04:24:36 +00:00
Gurinder Singh
6a286e775c Add explanatory note to 'expected item' error 2023-09-06 09:05:07 +05:30
bors
aeddd2ddfd Auto merge of #115529 - chenyukang:yukang-fix-115402-overflowsize, r=compiler-errors
Fix error report for size overflow from transmute

Fixes #115402

The span in the error reporting always points to the `dst`, this is an old issue, I may open another PR to fix it.
2023-09-06 02:37:41 +00:00
David Koloski
c18da3ccd4 Add regression test for LLVM 17-rc3 miscompile
See #115385 for more details.
2023-09-06 02:23:48 +00:00
bors
25283f4e13 Auto merge of #115371 - matthewjasper:if-let-guard-parsing, r=cjgillot
Make if let guard parsing consistent with normal guards

- Add tests that struct expressions are not allowed in `if let` and `while let` (no change, consistent with `if` and `while`)
- Allow struct expressions in `if let` guards (consistent with `if` guards).

r? `@cjgillot`

Closes #93817
cc #51114
2023-09-06 00:46:21 +00:00
bors
ff902fff1f Auto merge of #115581 - djkoloski:update_llvm_submodule, r=cuviper
Update LLVM submodule to 17.0.0-rc4

Updates the in-tree LLVM submodule to the 17.0.0-rc4 branch from https://github.com/rust-lang/llvm-project/pull/151.
2023-09-05 22:56:02 +00:00
yukang
00010eda8b Fix error report for size overflow from transmute 2023-09-06 06:48:34 +08:00
Camille GILLOT
7ef555d84a Support non-trivial scalars in ConstProp. 2023-09-05 21:25:41 +00:00
Camille GILLOT
09ce0f6ebc Remove type from ScalarTy. 2023-09-05 21:25:41 +00:00
Camille GILLOT
d35be6c097 Do not assert in try_to_int. 2023-09-05 21:25:41 +00:00
bors
a991861ec9 Auto merge of #115507 - cjgillot:relative-source-file, r=oli-obk
Use relative positions inside a SourceFile.

This allows to remove the normalization of start positions for hashing, and simplify allocation of global address space.

cc `@Zoxc`
2023-09-05 21:03:56 +00:00
ezekiel
13f17e1a93 replace doc occurrences of ItemLikeVisitor
ItemLikeVisitor was removed, and the visit strategy was moved to `rustc_hir::intravisit`
2023-09-05 22:40:36 +02:00
bors
f91c53d738 Auto merge of #115579 - matthiaskrgr:rollup-n4ijxl7, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #114794 (clarify safety documentation of ptr::swap and ptr::copy)
 - #115397 (Add support to return value in StableMIR interface and not crash due to compilation error)
 - #115559 (implied bounds: do not ICE on unconstrained region vars)

Failed merges:

 - #115532 (Implement SMIR generic parameter instantiation)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-05 19:21:46 +00:00
David Koloski
fba61a8233 Update LLVM submodule to 17.0.0-rc4 2023-09-05 18:34:53 +00:00
Eduardo Sánchez Muñoz
0b6ee86d37 Remove special handling in codegen for some AVX and SSE2 shift by immediate intrinsics
Those were removed from stdarch in https://github.com/rust-lang/stdarch/pull/1463 (`simd_shl` and `simd_shr` are used instead)
2023-09-05 20:17:01 +02:00
Matthias Krüger
8c0490782e
Rollup merge of #115559 - lcnr:implied-bounds-unconstrained, r=aliemjay
implied bounds: do not ICE on unconstrained region vars

fixes #112832

see tests/ui/implied-bounds/implied-bounds-unconstrained-2.rs for a minimal example showing why this is necessary.

r? types

cc ``@compiler-errors`` ``@aliemjay`` https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/assoc.20type.20bound.20in.20super.20trait
2023-09-05 20:15:03 +02:00
Matthias Krüger
c7d5c12cc8
Rollup merge of #115397 - celinval:smir-interface, r=oli-obk
Add support to return value in StableMIR interface and not crash due to compilation error

Invoking `StableMir::run()` on a crate that has any compilation error was crashing the entire process. Instead, return a `CompilerError` so the user knows compilation did not succeed. I believe ICE will also be converted to `CompilerError`.

I'm also adding a possibility for the callback to return a value. I think it will be handy for users (at least it was for my current task of implementing a tool to validate stable-mir). However, if people disagree, I can remove that.
2023-09-05 20:15:02 +02:00
Matthias Krüger
14c57f1adb
Rollup merge of #114794 - RalfJung:swap-safety, r=m-ou-se
clarify safety documentation of ptr::swap and ptr::copy

Closes https://github.com/rust-lang/rust/issues/81005
2023-09-05 20:15:01 +02:00
Eduardo Sánchez Muñoz
c3edc57981 Remove special handling in codegen for some SSE2 "storeu" intrinsics
Those were removed from stdarch in https://github.com/rust-lang/stdarch/pull/1463 (`<*mut _>::write_unaligned` is used instead)
2023-09-05 20:06:50 +02:00
Eduardo Sánchez Muñoz
537edd0be4 Bump stdarch submodule 2023-09-05 19:56:20 +02:00