Commit Graph

239715 Commits

Author SHA1 Message Date
Michael Goulet
b601b40b40 Separate Nan/Inf floats with _ 2023-11-24 23:35:18 +00:00
Vadim Petrochenkov
ad0770eeee resolve: Avoid clones of MacroData
And move declarative macro compilation to an earlier point in def collector, which is required for #118188.
2023-11-25 02:32:33 +03:00
Celina G. Val
f8c2478b6b Reorder imports and remove re-export 2023-11-24 15:09:26 -08:00
Celina G. Val
d7c7236845 Move the compiler interface defs to its own module
Separate items that are exposed in the `stable_mir` crate to be used
by the compiler from items that we expect to be used by tool developers.
2023-11-24 13:49:31 -08:00
bors
37b2813a7b Auto merge of #118138 - Nilstrieb:one-previous-error, r=WaffleLapkin
Fixes error count display is different when there's only one error left

Supersedes #114759

### What did I do?

I did the small change in `rustc_errors` by hand. Then I did the other changes in `/compiler` by hand, those were just find replace on `*.rs` in the workspace. The changes in run-make are find replace for `run-make` in the workspace.

All other changes are blessed using `x test TEST --bless`. I blessed the tests that were blessed in #114759.

### how to review this nightmare

ping bors with an `r+`. You should check that my logic is sound and maybe quickly scroll through the diff, but fully verifying it seems fairly hard to impossible. I did my best to do this correctly.

Thank you `@adrianEffe` for bringing this up and your initial implementation.

cc `@flip1995,` you said you want to do a subtree sync asap
cc `@RalfJung` maybe you want to do a quick subtree sync afterwards as well for Miri

r? `@WaffleLapkin`
2023-11-24 21:40:54 +00:00
Celina G. Val
5ad84ed2e6 Break down rustc_smir/mod.rs file
This file was getting too big and causing a lot of merge conflicts. All
these changes shouldn't be visible to users since this module is private.
2023-11-24 13:26:57 -08:00
Nilstrieb
c73d392a01 Bless ui-fulldeps
We have to ignore some tests in stage1.
2023-11-24 21:56:22 +01:00
onur-ozkan
576a17ecdb move CONFIG_CHANGE_HISTORY to its own module
Because bootstrap lib is already large and complicated, this should
make the "bumping change-id" process easier.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24 23:18:36 +03:00
onur-ozkan
38aba2cb19 use the change-id from source instead of the one from config.tom
This fixes the problem of not being able to see bootstrap config
changes unless the change-id in config.toml changes.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24 23:14:21 +03:00
onur-ozkan
6d881a9946 add change information for PR#117813
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-24 23:14:17 +03:00
Nilstrieb
9b80d85722 Manual find replace updates 2023-11-24 21:04:51 +01:00
bjorn3
3b49b9efd5 Implement the int part of the gather family vendor intrinsics 2023-11-24 20:45:22 +01:00
bjorn3
d5a7ae7976 Implement the float part of the gather family vendor intrinsics 2023-11-24 20:45:22 +01:00
bjorn3
c8729e9216 Implement _mm256_zeroupper vendor intrinsic 2023-11-24 20:45:22 +01:00
bjorn3
65da671694 Implement *fmaddsub_p*, *fmsubadd_p* and *fnmadd_p* vendor intrinsics 2023-11-24 20:45:22 +01:00
bjorn3
705031d017 Implement _mm_cvttps_epi32 2023-11-24 20:45:22 +01:00
bors
0f696e555f Auto merge of #118229 - crlf0710:final_bump_unicode15, r=Mark-Simulacrum
Bump `unicase` crate version.

This bumps `unicase` crate to align with Unicode 15.

Closes #101840.
2023-11-24 19:41:10 +00:00
Santiago Pastorino
6713f295e2
We should call eq instead of sup as we're relating Ty directly and not Binder<TraitRef> 2023-11-24 16:38:32 -03:00
Santiago Pastorino
f57e1843f3
Make PlaceholderReplacer shallow_resolver when folding const and ty and recur if contain infer vars 2023-11-24 16:26:08 -03:00
Santiago Pastorino
798d2cb6e2
Move EagerResolution to rustc_infer::infer::resolve 2023-11-24 16:22:35 -03:00
Nilstrieb
377da2f06b Bless Miri tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:53 +01:00
Nilstrieb
76a0313285 Bless clippy tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Nilstrieb
0346765100 Bless run-make tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Nilstrieb
87a354b15d Bless rustdoc-ui tests
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Nilstrieb
41e8d152dc Show number in error message even for one error
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Michael Howell
1b7b9540fe rustdoc-search: avoid infinite where clause unbox
Fixes #118242
2023-11-24 10:42:11 -07:00
bors
42ae1a7615 Auto merge of #118248 - compiler-errors:rollup-tye3vgj, r=compiler-errors
Rollup of 7 pull requests

Successful merges:

 - #118187 (Recompile LLVM when it changes in the git sources)
 - #118210 (intercrate ambiguity causes: ignore candidates which don't apply)
 - #118215 (Add common trait for crate definitions)
 - #118238 (memcpy assumptions: update GCC link)
 - #118243 (EvalCtxt::commit_if_ok don't inherit nested goals)
 - #118245 (Add `Span` to `TraitBoundModifier`)
 - #118246 (Remove a hack for effects)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-24 17:24:47 +00:00
David Tolnay
7a6dce3305
Request that rust-analyzer changes are sent upstream first if possible 2023-11-24 09:17:35 -08:00
David Tolnay
8cc7073d64
Replace option.map(cond) == Some(true) with option.is_some_and(cond) 2023-11-24 09:14:09 -08:00
Michael Goulet
592ee12245
Rollup merge of #118246 - fee1-dead-contrib:rm-hack, r=compiler-errors
Remove a hack for effects

Fallback was implemented in #115727, which addresses the inference errors mentioned in the comments.
2023-11-24 07:29:14 -08:00
Michael Goulet
b5d336ffae
Rollup merge of #118245 - fee1-dead-contrib:span-tilde-const, r=compiler-errors
Add `Span` to `TraitBoundModifier`

This improves diagnostics for the message "`~const` is not allowed here", and also fixes the span that we use when desugaring `~const Tr` into `Tr<host>` in effects desugaring.
2023-11-24 07:29:13 -08:00
Michael Goulet
193e6687e9
Rollup merge of #118243 - lcnr:commit-if-ok, r=compiler-errors
EvalCtxt::commit_if_ok don't inherit nested goals

we use it to check whether an alias is rigid, so we want to avoid considering an alias rigid simply because the inference constraints from normalizing it caused another nested goal fail

r? `@compiler-errors`
2023-11-24 07:29:12 -08:00
Michael Goulet
9c1b029559
Rollup merge of #118238 - RalfJung:memcpy, r=Mark-Simulacrum
memcpy assumptions: update GCC link

GCC now has this documented on an official website, not just in the bugtracker.
2023-11-24 07:29:12 -08:00
Michael Goulet
8294352b2d
Rollup merge of #118215 - celinval:smir-def-paths, r=ouz-a
Add common trait for crate definitions

In stable mir, we specialize DefId, however some functionality is the same for every definition, such as def paths, and getting their crate. Use a trait to implement those.
2023-11-24 07:29:12 -08:00
Michael Goulet
ffacd5463a
Rollup merge of #118210 - lcnr:intercrate-ambiguity-causes-uwu, r=compiler-errors
intercrate ambiguity causes: ignore candidates which don't apply

r? `@compiler-errors`
2023-11-24 07:29:11 -08:00
Michael Goulet
7f974b9e07
Rollup merge of #118187 - onur-ozkan:recompile-llvm-on-changes, r=clubby789
Recompile LLVM when it changes in the git sources

Utilize a smart hash for 'llvm-finished-building' to enable recompilation of LLVM with each change in the git sources.

Each change generates a unique hash value in 'llvm-finished-building', which ensures LLVM compilations only triggered with further changes.

Resolves #111893

cc `@rust-lang/wg-llvm`
2023-11-24 07:29:11 -08:00
bors
4fd68eb47b Auto merge of #117934 - Young-Flash:dev, r=petrochenkov
feat: make `let_binding_suggestion` more reasonable

This is my first PR for rustc, which trying to fix https://github.com/rust-lang/rust/issues/117894, I am not familiar with some internal api so maybe some modification here isn't the way to go, appreciated for any review suggestion.
2023-11-24 15:26:04 +00:00
Deadbeef
0626de439d Remove a hack for effects 2023-11-24 14:51:48 +00:00
Deadbeef
16040a1628 Add Span to TraitBoundModifier 2023-11-24 14:32:05 +00:00
lcnr
42a9b0d7ab EvalCtxt::commit_if_ok don't inherit nested goals 2023-11-24 15:22:10 +01:00
bjorn3
3ec8d7aa4a Implement _mm_cmpestri and _mm_cmpestrm using inline asm 2023-11-24 13:39:51 +00:00
bors
44aceb5d18 Auto merge of #3185 - eduardosm:float_to_int_checked-generic, r=RalfJung
Refactor `float_to_int_checked` to remove its generic parameter and reduce code duplication a bit
2023-11-24 13:25:41 +00:00
Eduardo Sánchez Muñoz
2855024063 Refactor float_to_int_checked to remove its generic parameter and reduce code duplication a bit 2023-11-24 14:22:20 +01:00
bors
beebcdeb6f Auto merge of #117782 - majaha:tidy_fix, r=onur-ozkan
Fix tidy tripping up on  untracked files with special characters in their name

Previously, the tidy tool would fault if an untracked file had a space or other special characters in its name. If there was an untracked file "foo bar", it would include the quoting in it's path and split on the first space, giving output like this:
`skip untracked path "foo during rustfmt invocations`
2023-11-24 13:16:10 +00:00
bors
b06258cde4 Auto merge of #118228 - Mark-Simulacrum:alloc-opt, r=scottmcm
Indicate that multiplication in Layout::array cannot overflow

Since https://github.com/rust-lang/rust/pull/113113, we have added a check that skips calling into the allocator at all if `capacity == 0`. The global, default allocator will not actually try to allocate though; it returns a dangling pointer explicitly. However, these two checks are not merged/deduplicated by LLVM and so we're comparing to zero twice whenever vectors are allocated/grown. Probably cheap, but also potentially expensive in code size and seems like an unfortunate miss.

This removes that extra check by telling LLVM that the multiplication as part of Layout::array can't overflow, turning the original non-zero value into a zero value afterwards. In my checks locally this successfully drops the duplicate comparisons.

See https://rust.godbolt.org/z/b6nPP9dcK for a code example.

```rust
pub fn foo(elements: usize) -> Vec<u32> {
    Vec::with_capacity(elements)
}
```

r? `@scottmcm` since you touched this in a32305a80f - curious if you have thoughts on doing this / can confirm my model of this being correct.
2023-11-24 11:19:34 +00:00
Ralf Jung
a5dff378f5 memcpy assumptions: update GCC link 2023-11-24 11:15:53 +01:00
bjorn3
9c958196e7 Fix polymorphization for coroutines
Fixes rust-lang/rustc_codegen_cranelift#1429
2023-11-24 10:46:22 +01:00
bjorn3
430ab4e923 Allow function pointers in CValue::const_val
Fixes rust-lang/rustc_codegen_cranelift#1430
2023-11-24 10:22:59 +01:00
bors
f74f700952 Auto merge of #118232 - matthiaskrgr:rollup-x8crvm0, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #116807 (Improve rewind documentation)
 - #117656 (Update windows-bindgen and define `INVALID_HANDLE_VALUE` ourselves)
 - #117940 (chore: remove unnecessary drop)
 - #118028 (Document behavior of `<dyn Any as Any>::type_id()`)
 - #118060 (Use an absolute path to the NUL device)
 - #118224 (Sort unstable items last in rustdoc, instead of first)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-24 09:21:23 +00:00
Petr Sumbera
879aff9cf0 Fix build on Solaris after #117815. 2023-11-24 09:45:23 +01:00