Commit Graph

241827 Commits

Author SHA1 Message Date
Nicholas Nethercote b44315c34c Rename EarlyErrorHandler as EarlyDiagCtxt. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 7c656bc05b Rename CodegenContext::create_diag_handler as CodegenContext::create_dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote dea752e53d Rename ShowSpanVisitor::span_diagnostic as ShowSpanVisitor::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 5ad7144d1b Rename AstValidator::err_handler as AstValidator::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9f3f1ca8c4 Rename DiagnosticBuilder::handler as DiagnosticBuilder::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote d1d0896c40 Rename ParseSess::with_span_handler as ParseSess::with_dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 73bac456d4 Rename Parser::span_diagnostic as Parser::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 09af8a667c Rename Session::span_diagnostic as Session::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9df1576e1d Rename ParseSess::span_diagnostic as ParseSess::dcx. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 9b1f87c7e8 Rename HandlerFlags as DiagCtxtFlags. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote cce1701c4c Rename EarlyErrorHandler as EarlyDiagCtxt. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 45f347681d Rename HandlerInner as DiagCtxtInner. 2023-12-18 16:06:21 +11:00
Nicholas Nethercote 576b9213b3 Rename Handler as DiagCtxt. 2023-12-18 16:06:19 +11:00
Nicholas Nethercote cde19c016e Rename Handler as DiagCtxt. 2023-12-18 16:06:19 +11:00
bors 8681e077b8 Auto merge of #119007 - weihanglo:update-cargo, r=weihanglo
Update cargo

11 commits in 1aa9df1a5be205cce621f0bc0ea6062a5e22a98c..1a2666ddd14cf0a255d4ddb61c63531c259a7b39
2023-12-12 14:52:31 +0000 to 2023-12-17 17:53:53 +0000
- chore: downgrade to openssl v1.1.1 (rust-lang/cargo#13179)
- docs(home): prepare the changelog for 0.5.9 (rust-lang/cargo#13177)
- refactor: Pull name validation into `util_schemas` (rust-lang/cargo#13166)
- chore(deps): bump zerocopy from 0.7.29 to 0.7.31 (rust-lang/cargo#13174)
- Replace SHGetFolderPathW with SHGetKnownFolderPath (rust-lang/cargo#13173)
- chore(bump-check): dont check `home` against beta/stable branches (rust-lang/cargo#13167)
- fix: Fill in more empty name holes (rust-lang/cargo#13164)
- Do not allow empty name in package ID spec (rust-lang/cargo#13152)
- chore(deps): update rust crate openssl to 0.10.61 (rust-lang/cargo#13159)
- `all-static` feature should include `vendored-libgit2` (rust-lang/cargo#13134)
- doc/registry-web-api: Adjust success response code documentation (rust-lang/cargo#13160)

r? ghost
2023-12-18 04:04:55 +00:00
Caleb Zulawski d655dd6dca Add new intrinsics 2023-12-17 23:00:29 -05:00
Caleb Zulawski 4767aaf826 Further explain semantics 2023-12-17 21:17:00 -05:00
Caleb Zulawski e245bafa9c Apply suggestions from code review
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-12-17 21:17:00 -05:00
Caleb Zulawski 71a5698989 Improve simd_bitmask documentation and other minor fixes 2023-12-17 21:17:00 -05:00
Caleb Zulawski 560ac23b70 State type requirements first 2023-12-17 21:17:00 -05:00
Caleb Zulawski 1fd7de062e Clarify UB and improve grammar
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-12-17 21:17:00 -05:00
Caleb Zulawski ef4cf01542 Add core::intrinsics::simd 2023-12-17 21:16:59 -05:00
bors 321b6565a5 Auto merge of #118657 - petrochenkov:feedvis, r=cjgillot
resolve: Replace visibility table in resolver outputs with query feeding

Also feed missing visibilities for import stems and trait impl items, which were previously evaluated lazily.

I suspect that in general this approach should work for queries that are 1) executed for most keys and 2) have results that are cheap to hash (do not have spans, in particular).
Visibility query matches that description.
2023-12-18 02:06:02 +00:00
Michael Goulet bb33200047 Make sure all kinds of generators only return unit 2023-12-18 01:45:42 +00:00
Michael Goulet 454bff7682 Ensure yield expressions desugar correctly in async generators 2023-12-18 01:42:19 +00:00
Kai Luo a8e1da3171 Address comment 2023-12-18 09:41:36 +08:00
León Orell Valerian Liehr 4a5dd169f7 Deny ~const trait bounds in inherent impl headers 2023-12-18 01:48:49 +01:00
Camille GILLOT 503af0deb2 Fortify test. 2023-12-17 23:31:58 +00:00
Vadim Petrochenkov be321aa473 resolve: Replace visibility table in resolver outputs with query feeding
Also feed missing visibilities for import stems and trait impl items, which were previously evaluated lazily.
2023-12-18 02:26:55 +03:00
bors 43dcc9b786 Auto merge of #114962 - darklyspaced:debug, r=est31
adds a column number to `dbg!()`

this would be very nice to have for a few reasons:
1. the rfc, when deciding not to add column numbers to macro, failed to acknowledge any potential ambiguous cases -- such as the one provided in #114910 -- which do exist
2. would be able to consistently and easily jump directly to the `dbg!()` regardless of the sutation
3. takes up, at a maximum, 3 characters of _horizontal_ screen space

fixes #114910
2023-12-17 23:01:18 +00:00
Weihang Lo 8ed5b293f4 Update cargo 2023-12-17 17:58:57 -05:00
Camille GILLOT 3ea5cfaa11 Tolerate overaligned MIR constants for codegen. 2023-12-17 22:56:42 +00:00
Alistair Francis d66a96495e ci: docker: dist-various-1: Include RISC-V C compilers
The compiler-builtins for RISC-V are missing some key functions, such as
__bswapsi2 [1].

We can't just pull in the LLVM compiler-rt builtins as the rust-lang/rust
distribution container doesn't have a C compiler [2].

This patch adds RISC-V C compilers to the CI Dockerfile as the first
step towards enabling LLVM compiler-rt builtins for RISC-V Rust.

1: https://github.com/rust-lang/compiler-builtins/issues/350
2: https://github.com/rust-lang/compiler-builtins/commit/e4f46b91ca843297fc065e20f1591e4971ae608c

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-12-18 08:23:06 +10:00
bors 6a62871320 Auto merge of #119053 - matthiaskrgr:rollup-hky3ld3, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #118880 (More expressions correctly are marked to end with curly braces)
 - #118928 (fix: Overlapping spans in delimited meta-vars)
 - #119022 (Remove unnecessary constness from ProjectionCandidate)
 - #119052 (Avoid overflow in GVN constant indexing.)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-12-17 20:57:02 +00:00
Matthias Krüger 39fe059a35 Rollup merge of #119052 - cjgillot:gvn-index-overflow, r=compiler-errors
Avoid overflow in GVN constant indexing.

Fixes https://github.com/rust-lang/rust/issues/118992
Fixes https://github.com/rust-lang/rust/issues/119008
2023-12-17 21:30:00 +01:00
Matthias Krüger 677bb6cd60 Rollup merge of #119022 - compiler-errors:no-constness, r=fee1-dead
Remove unnecessary constness from ProjectionCandidate

Constness in an item bound will be represented by an effect param, so no need to record constness here.

r? fee1-dead
2023-12-17 21:30:00 +01:00
Matthias Krüger 93d3a4231e Rollup merge of #118928 - EliseZeroTwo:EliseZeroTwo/fix-issue-118786, r=cjgillot
fix: Overlapping spans in delimited meta-vars

Closes #118786

Delimited meta-vars inside of MBE's spans were set to have the same opening and closing position resulting in an ICE when debug assertions were enabled and an error was present in the templated code.

This ensures that the spans do not overlap, whilst still having the spans point at the usage of the meta-var inside the macro definition.

It includes a regression test.

🖤
2023-12-17 21:29:59 +01:00
Matthias Krüger 6269bf1a3a Rollup merge of #118880 - GearsDatapacks:issue-118859-fix, r=compiler-errors
More expressions correctly are marked to end with curly braces

Fixes #118859, and replaces the mentioned match statement with an exhaustive list, so that this code doesn't get overlooked in the future
2023-12-17 21:29:59 +01:00
Camille GILLOT 8022057ebb Avoid overflow in GVN constant indexing. 2023-12-17 19:50:38 +00:00
bors 4283aeaca5 Auto merge of #119048 - aliemjay:perf-register-pred, r=compiler-errors
don't fold ParamEnv in register_predicate_obligation

\>5% perf gain for diesel!
2023-12-17 18:27:09 +00:00
Chris Denton e585b0ed58 Use FileEndOfFileInfo, not FileAllocationInfo
This fixes WINE support
2023-12-17 17:57:33 +00:00
Ali MJ Al-Nasrawy e0df93b07e don't fold ParamEnv in register_predicate_obligation 2023-12-17 17:24:04 +00:00
bors d14e52b47a Auto merge of #117884 - bvanjoi:fix-117794, r=compiler-errors
skip rpit constraint checker if borrowck return type error

Fixes #117794
Fixes #117886
Fixes #119025

Prior to change #117418, the value of `concrete_opaque_types` for `mir_borrock(T::a::opaque)` was `None`. However, due to modifications in `body.local_decls`, the return value had been changed.

The changed of `body.local_decls` has let to the addition of `ty:Error` to `infcx.opaque_type_storage.opaque_types` during `TypeChecker::equate_inputs_and_outputs`. This is due to it utilizing the output of a function signature that was appended during `construct_error`(which previously only appended a `ty::Error`) and then execute `TypeChecker::Related_types`.

Therefore, in this PR, I've implemented a condition to bypass the rpit check when an error is encountered.

r? `@compiler-errors`
2023-12-17 16:28:37 +00:00
bors 3a2aa5854c Auto merge of #119020 - onur-ozkan:remove-hex, r=albertlarsan68
remove `hex` dependency in bootstrap

First commit removes the `hex` dependency, as we can achieve the same output with the added function, which is very small and simple.

Second commit creates a test module for the helpers util and adds unit tests for multiple helper functions, including `hex_encode`.
2023-12-17 14:26:54 +00:00
bors e95a69d306 Auto merge of #118828 - mu001999:master, r=b-naber
Remove dead codes in rustc_codegen_gcc

Detected by #118257
2023-12-17 12:15:56 +00:00
bors 5151b8c427 Auto merge of #119039 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-12-17 10:18:25 +00:00
bohan 64e311add2 skip rpit constraint check if borrowck return type error 2023-12-17 16:49:00 +08:00
Ralf Jung c7e3b3f84c do not allow ABI mismatches inside repr(C) types 2023-12-17 09:34:25 +01:00
bors 9f13b9d9ca Auto merge of #119000 - celinval:smir-cstr, r=ouz-a
Add a method to StableMIR to check if a type is a CStr

Also add a check that StableMIR works properly with C string literal.
2023-12-17 08:18:17 +00:00
bors 00a82a5f3c Auto merge of #3229 - saethlin:protector-gc-ice, r=RalfJung
Visit the AllocIds and BorTags in borrow state FrameExtra

Fixes https://github.com/rust-lang/miri/issues/3228

I said

> The obvious way would be to visit the AllocIds in borrow_tracker::FrameExtra in the GC.

Since I have had no new ideas, that's what this does.
2023-12-17 07:58:17 +00:00