Commit Graph

232204 Commits

Author SHA1 Message Date
Matthias Krüger
cf9081c0a1
Rollup merge of #114734 - oli-obk:vacation_time, r=oli-obk
Mark oli as "on vacation"
2023-08-12 12:06:37 +02:00
Matthias Krüger
1d0792bd80
Rollup merge of #114703 - ouz-a:smir_allocation, r=oli-obk
Cover ParamConst in smir

Others variants won't be useful for a while or ever(?), but we might need this one.

r? ````@oli-obk````
2023-08-12 12:06:37 +02:00
Matthias Krüger
70cd8d5f3f
Rollup merge of #114692 - lcnr:internal_features-warn, r=Nilstrieb
downgrade `internal_features` to warn

Not sure if this requires an FCP or whatever. By having the lint as deny I need to modify test cases when testing them outside of the test suite as the test suite implicitly allows the lint. This takes maybe 10 to 20 seconds per test, but given just how frequently I end up copying tests to different repos it's a significant annoyance.

r? `@Nilstrieb`
2023-08-12 12:06:36 +02:00
Matthias Krüger
a12c329b35
Rollup merge of #114667 - compiler-errors:issue-114664, r=davidtwco
Record binder for bare trait object in LifetimeCollectVisitor

The `LifetimeCollectVisitor` had a bug where it was not recording the binder of bate trait objects. This was uncovered in #114487, when I changed opaque type lowering to ICE if it encountered a captured fresh lifetime with no def-id to map back to: https://github.com/rust-lang/rust/pull/114487/files#diff-ad0c15bbde97a607d4758ec7eaf88248be5d6b8ae084dfc84127f81e3f7a9bb4R1585

Fixes #114664
2023-08-12 12:06:36 +02:00
Matthias Krüger
83756d97a8
Rollup merge of #114584 - darklyspaced:master, r=cjgillot
E0277 nolonger points at phantom `.await`

fixes #113203
2023-08-12 12:06:35 +02:00
Matthias Krüger
8a997b159c
Rollup merge of #114132 - tamird:better-env-debug-impls, r=Amanieu
Better Debug for Vars and VarsOs

Display actual vars instead of two dots.

The same was done for Args and ArgsOs in 275f9a04af.
2023-08-12 12:06:35 +02:00
Matthias Krüger
9aea966e4b
Rollup merge of #94455 - jhpratt:stabilize-int_roundings, r=joshtriplett
Partially stabilize `int_roundings`

This stabilizes the following:

```rust
impl uX {
    pub const fn div_ceil(self, rhs: Self) -> Self;
    pub const fn next_multiple_of(self, rhs: Self) -> Self;
    pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self>;
}
```

This feature is tracked in #88581.
2023-08-12 12:06:35 +02:00
Guillaume Gomez
611c0ea21c Migrate GUI colors test to original CSS color format 2023-08-12 12:05:13 +02:00
bors
f1b854818d Auto merge of #109356 - jackh726:issue-108544, r=lcnr
Only check outlives goals on impl compared to trait

Fixes #108544

r? `@compiler-errors`
2023-08-12 10:02:45 +00:00
bors
05773210b7 Auto merge of #3026 - rust-lang:rustup-2023-08-12, r=RalfJung
Automatic sync from rustc
2023-08-12 05:53:27 +00:00
The Miri Conjob Bot
b122fa6d6a Merge from rustc 2023-08-12 05:33:13 +00:00
The Miri Conjob Bot
85de27ee87 Preparing for merge from rustc 2023-08-12 05:25:32 +00:00
Jacob Pratt
62ca5aa8e4
Remove unnecessary feature gates 2023-08-12 00:21:04 -04:00
Jacob Pratt
7f08376964
Partially stabilize #![feature(int_roundings)] 2023-08-12 00:12:11 -04:00
Gurinder Singh
0af9dfc0a3 Update Sender documentation for Sync 2023-08-12 09:20:56 +05:30
Jack Huey
3028dc4ef7 Only check outlives goals on impl compared to trait 2023-08-11 21:09:17 -04:00
bors
b08dd92552 Auto merge of #114720 - scottmcm:better-sub, r=workingjubilee
Tell LLVM that the negation in `<*const T>::sub` cannot overflow

Today it's just `sub` <https://rust.godbolt.org/z/8EzEPnMr5>; with this PR it's `sub nsw`.
2023-08-11 23:40:33 +00:00
Michael Goulet
e4cf708d2f Don't add associated type bound for non-types 2023-08-11 21:33:08 +00:00
Ben Kimock
1852bb8d62 Include spans in use-after-free diagnostics 2023-08-11 17:21:22 -04:00
bors
13acd4f239 Auto merge of #3025 - eduardosm:float-to-int, r=RalfJung
Add checked float-to-int helper function

As discussed in https://github.com/rust-lang/miri/pull/2989#discussion_r1287252367
2023-08-11 20:51:59 +00:00
ouz-a
d5120d4a46 Make Const more useful in smir 2023-08-11 23:43:58 +03:00
bors
a6f8aa5a09 Auto merge of #114735 - RalfJung:miri, r=RalfJung
update Miri

r? `@ghost`
2023-08-11 20:02:14 +00:00
Eduardo Sánchez Muñoz
29b38ed76a Remove float_to_int_unchecked and inline it into its call sites 2023-08-11 20:23:08 +02:00
lcnr
bb76fde734 remove builtin impl for float and int infer 2023-08-11 19:08:11 +02:00
Eduardo Sánchez Muñoz
fe35dd1afc Add checked float-to-int helper function 2023-08-11 17:58:09 +02:00
bors
8ce365ff79 Auto merge of #3024 - RalfJung:nomath, r=RalfJung
llvm.prefetch is not a math function

fixes the comment in src/shims/foreign_items.rs
2023-08-11 15:07:18 +00:00
Ralf Jung
05d5f9887d llvm.prefetch is not a math function 2023-08-11 16:47:23 +02:00
bors
b03864d546 Auto merge of #114729 - flip1995:clippyup, r=Manishearth
Update Clippy

r? `@Manishearth`

cc `@Centri3` This reinstates the `filter_map_bool_then` lint https://github.com/rust-lang/rust/pull/114715, since I think you fixed the ICE in beb57f074e which is included in this sync.
2023-08-11 14:46:07 +00:00
Oli Scherer
2801ae83d5 Mark oli as "on vacation" 2023-08-11 14:18:01 +00:00
bors
a45f181eb0 Auto merge of #2989 - eduardosm:x86-intrinsics, r=RalfJung
miri: implement some `llvm.x86.sse.*` intrinsics and add tests

PR moved from https://github.com/rust-lang/rust/pull/113932.

Implements LLVM intrisics needed to run most SSE functions from `core::arch::x86{,_64}`.

Also adds miri tests for those functions (mostly copied from core_arch tests).

r? `@RalfJung`

The first commit is the same that the commit in the PR I had opened in the Rust repository. I addressed review comments in additional commits to make it easier to review. I also fixed formatting and clippy warnings.
2023-08-11 13:47:30 +00:00
Gurinder Singh
e903752b48 Fix typo 2023-08-11 18:23:57 +05:30
bors
6276e5ad14 Auto merge of #3023 - RalfJung:gamma, r=RalfJung
add gamma function shims

needs a rustup to fetch the new declarations in std
2023-08-11 12:51:25 +00:00
Eduardo Sánchez Muñoz
01140a3eb1 miri: implement some llvm.x86.sse.* intrinsics and add tests
Implements LLVM intrisics needed to run most SSE functions from `core::arch::x86{,_64}`.

Also adds miri tests for those functions (mostly copied from core_arch tests).
2023-08-11 14:12:52 +02:00
bors
08691f0c92 Auto merge of #113432 - klensy:ms-cut-backtrace, r=ChrisDenton
reduce deps for windows-msvc targets for backtrace

(eventually) mirrors https://github.com/rust-lang/backtrace-rs/pull/543

Some dependencies of backtrace don't used on windows-msvc targets, so exclude them:

    miniz_oxide (+ adler)
    addr2line (+ gimli)
    object (+ memchr)

This saves about 30kb of std.dll + 17.5mb of rlibs
2023-08-11 12:07:04 +00:00
Philipp Krones
852bf4e51b
Merge commit '1e8fdf492808a25d78a97e1242b835ace9924e4d' into clippyup 2023-08-11 14:05:13 +02:00
bors
1e8fdf4928 Auto merge of #11320 - max-niederman:redundant_locals_shadow_mutated, r=Alexendoo
redundant_locals: fix FPs on mutated shadows

Fixes #11290.

When a mutable binding is shadowed by
a mutable binding of the same name in a different scope, mutations in that scope have different meaning.
This PR fixes spurious `redundant_locals` emissions on such locals.

cc `@Centri3,` `@flip1995`

changelog: [`redundant_locals`]: fix false positives on mutated shadows
2023-08-11 10:58:13 +00:00
bors
4d7a80d486 Auto merge of #114672 - lenawanel:master, r=compiler-errors
make `typeid::typeid_itanium_cxx_abi::transform_ty` evaluate length in array types

the ICE in https://github.com/rust-lang/rust/issues/114275 was caused by `transform_ty`
in compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs encountering an unevaluated const, while expecting it to already be evaluated.
2023-08-11 09:30:41 +00:00
bors
8703661a9a Auto merge of #11316 - flip1995:rustup, r=flip1995
Rustup

r? `@ghost`

cc `@max-niederman` With the latest sync, I'm getting a lot of FP in the `redundant_locals` lint you recently added. Any ideas where this could come from?

changelog: none
2023-08-11 08:54:35 +00:00
Philipp Krones
3927677234
Dogfood and bless tests 2023-08-11 10:53:18 +02:00
Vadim Petrochenkov
7353c96be8 rustc: Move features from Session to GlobalCtxt
Removes two pieces of mutable state.
Follow up to #114622.
2023-08-11 16:51:50 +08:00
Philipp Krones
0fc051ddba
Fix redundant_locals for Async desugaring 2023-08-11 10:51:18 +02:00
bors
7d8386f05c Auto merge of #114719 - compiler-errors:rollup-bf1vr51, r=compiler-errors
Rollup of 5 pull requests

Successful merges:

 - #114194 (Inline trivial (noop) flush calls)
 - #114257 (Avoid using `ptr::Unique` in `LinkedList` code)
 - #114359 ([library/std] Replace condv while loop with `cvar.wait_while`.)
 - #114402 (Fix documentation of impl From<Vec<T>> for Rc<[T]>)
 - #114715 (Revert clippy lint [`filter_map_bool_then`])

r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-11 06:54:10 +00:00
Scott McMurray
ab6e2bc3d0 Tell LLVM that the negation in <*const T>::sub cannot overflow
Today it's just `sub` <https://rust.godbolt.org/z/8EzEPnMr5>; with this PR it's `sub nsw`.
2023-08-10 23:00:39 -07:00
danflapjax
b75351e98e
Optimized implementations of max, min, and clamp for bool 2023-08-10 22:38:30 -07:00
bors
a07bc13e14 Auto merge of #114718 - compiler-errors:rollup-1am5rpn, r=compiler-errors
Rollup of 7 pull requests

Successful merges:

 - #114599 (Add impl trait declarations to SMIR)
 - #114622 (rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`)
 - #114662 (Unlock trailing where-clauses for lazy type aliases)
 - #114693 (Remove myself from the review rotation)
 - #114694 (make the provisional cache slightly less broken)
 - #114705 (Add spastorino to mailmap)
 - #114712 (Fix a couple of bad comments)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-08-11 04:17:57 +00:00
Michael Goulet
35a76a6c32
Rollup merge of #114715 - Centri3:revert-clippy-11115, r=Manishearth
Revert clippy lint [`filter_map_bool_then`]

r? `@Manishearth`

Issue in question is https://github.com/rust-lang/rust-clippy/issues/11309.

We usually wait until the next sync but this ICE is entirely unpreventable and happens often for code where type annotations are needed alongside a lifetime parameter so I think it's a good idea to revert it here. Also, this got into 1.71.1: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=620a95846a0e4810dffb39d7594d62d7
2023-08-10 21:17:38 -07:00
Michael Goulet
9546d7140e
Rollup merge of #114402 - tifv:tifv-fix-rc-doc, r=cuviper
Fix documentation of impl From<Vec<T>> for Rc<[T]>

The example in the documentation of `impl From<Vec<T>> for <Rc<[T]>` is irrelevant (likely was copied from `impl From<Box<T>> for <Rc<T>`). I suggest taking corresponding example from the documentation of `Arc` and replacing `Arc` with `Rc`.
2023-08-10 21:17:37 -07:00
Michael Goulet
5da7f36485
Rollup merge of #114359 - ttsugriy:barrier-simpl, r=cuviper
[library/std] Replace condv while loop with `cvar.wait_while`.

`wait_while` takes care of spurious wake-ups in centralized place, reducing chances for mistakes and potential future optimizations (who knows, maybe in future there will be no spurious wake-ups? :)
2023-08-10 21:17:37 -07:00
Michael Goulet
3791f6dded
Rollup merge of #114257 - rytheo:linked-list-avoid-unique, r=cuviper
Avoid using `ptr::Unique` in `LinkedList` code

Addresses a [comment](https://github.com/rust-lang/rust/pull/103093#discussion_r1268506747) by `@RalfJung` about avoiding use of `core::ptr::Unique` in the standard library.
2023-08-10 21:17:36 -07:00
Michael Goulet
0c241e6bdb
Rollup merge of #114194 - thomcc:flushinline, r=cuviper
Inline trivial (noop) flush calls

At work I noticed that `writer.flush()?` didn't get optimized away in cases where the flush is obviously a no-op, which I had expected (well, desired).

I went through and added `#[inline]` to a bunch of cases that were obviously noops, or delegated to ones that were obviously noops. I omitted platforms I don't have access to (some tier3). I didn't do this very scientifically, in cases where it was non-obvious I left `#[inline]` off.
2023-08-10 21:17:36 -07:00