Commit Graph

239892 Commits

Author SHA1 Message Date
Ralf Jung
73042206dd remove the memcpy-on-equal-ptrs assumption 2023-11-24 21:32:16 +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
bors
34cffbf1d7 Auto merge of #15960 - dtolnay-contrib:issomeand, r=lnicola
Replace `option.map(cond) == Some(true)` with `option.is_some_and(cond)`

Extracted from https://github.com/rust-lang/rust/pull/118253.
2023-11-24 17:14:28 +00:00
David Tolnay
8cc7073d64
Replace option.map(cond) == Some(true) with option.is_some_and(cond) 2023-11-24 09:14:09 -08:00
David Tolnay
b68f5311b5
Replace option.map(cond) == Some(true) with option.is_some_and(cond) 2023-11-24 09:06:44 -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
bors
fec3828c5f Auto merge of #15846 - jprochazk:disable-error-notification, r=Veykril
editor/code: add option to suppress error notifications

Fixes https://github.com/rust-lang/rust-analyzer/issues/14193

- Added the `rust-analyzer.showRequestFailedErrorNotification` configuration option, which defaults to `true`
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `true`, the current behavior is preserved.
- If `rust-analyzer.showRequestFailedErrorNotification` is set to `false`, no error toasts will be displayed for any of the failed requests caused by panics in r-a. This _only_ applies to events that are triggered "implicitly", such as `textDocument/hover`.

To test this, you can manually introduce a panic in one of the language server LSP handlers for non-command events. I added an explicit `panic!()` in the `textDocument/hover` event handler:

#### `rust-analyzer.showRequestFailedErrorNotification` set to `true` (default)

[2023-11-07 17-17-48.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/d0408ab8-79d1-42cf-a4e7-94e99d9783ec)

#### `rust-analyzer.showRequestFailedErrorNotification` set to `false`

[2023-11-07 17-16-49.webm](https://github.com/rust-lang/rust-analyzer/assets/1665677/0496d8d0-fb53-4bc6-a279-1a47f412dbdb)
2023-11-24 14:06:07 +00: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
8733728323 Auto merge of #15956 - ahlinc:label-detail, r=lnicola
Improve completion label details display

This PR improves completion label details display by separating trait and alias info from the `label` LSP field to an additional existing `label_detail` field. Changes look like the following:

### Before

![Screenshot from 2023-11-24 12-03-08](https://github.com/rust-lang/rust-analyzer/assets/14666676/74066f0d-f1ac-4e99-8be5-c5141d513d23)

### After

![Screenshot from 2023-11-24 12-21-57](https://github.com/rust-lang/rust-analyzer/assets/14666676/45fca112-4612-40a3-81b9-07ff12de0962)

_All existing tests are passed without any changes in test themselves logic._
2023-11-24 12:54:33 +00:00
Andrew Hlynskyi
f0adf8c4ec Update tests 2023-11-24 14:38:00 +02:00
Andrew Hlynskyi
615abb3c92 Improve completion label details display 2023-11-24 14:38:00 +02: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
Kashiwa
1928d82385 correct grammar 2023-11-24 17:23:49 +08: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