Commit Graph

253575 Commits

Author SHA1 Message Date
Predrag Gruevski
8b0ab42855
Upgrade to actions/checkout@v4 in ci.yml.
This is a newer version of the same action. None of the uses here were particularly special (no complex features of v3 were used) so this is a straightforward as-is upgrade.
2024-04-24 10:57:18 -04:00
Chris Denton
f56afa0477
Stabilize std::path::absolute 2024-04-24 14:35:02 +00:00
Oli Scherer
21906002ed Strengthen tracking issue policy with consequences 2024-04-24 13:55:38 +00:00
Urgau
153b1f0421 Improve diagnostic for unknown --print request 2024-04-24 15:52:01 +02:00
bors
f3dfaa7316 Auto merge of #3510 - RalfJung:sigpipe-default, r=RalfJung
unix_sigpipe: don't inline DEFAULT, just use it from rustc

The default anyway changed since this code was written... it's now 0, not 2.
2024-04-24 13:02:04 +00:00
Ralf Jung
aa19679ff0 unix_sigpipe: don't inline DEFAULT, just use it from rustc 2024-04-24 14:58:12 +02:00
bors
c1073fb36e Auto merge of #3492 - eduardosm:intrinsics-x86-avx2, r=oli-obk
Implement LLVM x86 AVX2 intrinsics
2024-04-24 12:23:03 +00:00
Gary Guo
8169c4c121 Fix miri test 2024-04-24 13:12:33 +01:00
Gary Guo
f8a1cad07c Add cfg_attr(bootstrap) to doc tests 2024-04-24 13:12:33 +01:00
Gary Guo
9d16364198 Fix and bless clippy tests 2024-04-24 13:12:33 +01:00
Gary Guo
cfee72aa24 Fix tests and bless 2024-04-24 13:12:33 +01:00
Gary Guo
94c1920497 Stabilise inline_const 2024-04-24 13:12:25 +01:00
León Orell Valerian Liehr
eaeaeb92a5
Rollup merge of #124308 - CBSpeir:diagnostic-item-enumerate, r=compiler-errors
Add diagnostic item for `std::iter::Enumerate`

This adds a diagnostic item for `std::iter::Enumerate`.  The change will be used by the clippy `unused_enumerate_index` lint to move away from type paths to using diagnostic items.

see: https://github.com/rust-lang/rust-clippy/issues/5393
2024-04-24 14:00:58 +02:00
León Orell Valerian Liehr
388dc0d0b7
Rollup merge of #124282 - RalfJung:fill_utf16_buf, r=ChrisDenton
windows fill_utf16_buf: explain the expected return value

The comment just says "return what the syscall returns", but that doesn't work for all syscalls as the Windows API is not consistent in how buffer size is negotiated. For instance, GetUserProfileDirectoryW works a bit differently, and so home_dir_crt has to translate this to the usual protocol itself. So it's worth describing that protocol.

r? ``@ChrisDenton``
2024-04-24 14:00:57 +02:00
León Orell Valerian Liehr
4eda87603d
Rollup merge of #124281 - RalfJung:win-tls, r=joboet
fix weak memory bug in TLS on Windows

We need to store the `key` *after* we register the dtor.

Now I hope there isn't also some other reason why we have to actually register the dtor last... `@joboet` is there a reason you picked this particular order in https://github.com/rust-lang/rust/pull/102655?

Fixes https://github.com/rust-lang/rust/issues/123583
2024-04-24 14:00:57 +02:00
León Orell Valerian Liehr
bef0f3fb4c
Rollup merge of #123881 - erickt:bump-fuchsia, r=tmandry
Bump Fuchsia versions

This updates the Fuchsia commit used in `auto - x86_64-gnu-integration` CI bot to use the Rust commit 703dc9ce64. This should help improve the coverage of this builder.

It also updates the SDK version to F20.20240412.3.1, and the Fuchsia Clang version to c777c011a709dffd4fa5e79cad7947b7c3405d02.

r? ``@tmandry``
2024-04-24 14:00:56 +02:00
León Orell Valerian Liehr
dc81f6d549
Rollup merge of #123794 - oli-obk:define_opaque_types2, r=lcnr
More DefineOpaqueTypes::Yes

This accepts more code on stable. It is now possible to have match arms return a function item `foo::<ConcreteType>` and a function item `foo::<OpaqueTypeInDefiningScope>` in another, and that will constrain `OpaqueTypeInDefiningScope` to have the hidden type `ConcreteType`. So the following function will now compile, but on master it errors with a type mismatch on the second match arm

```rust
// The function item whose generic params we want to merge.
fn foo<T>(t: T) -> T { t }
// Helper ensuring we can constrain `T` on `F` without explicitly specifying it
fn bind<T, F: FnOnce(T) -> T>(_: T, f: F) -> F { f }

fn k() -> impl Sized {
    let x = match true {
        true => {
            // `f` is `FnDef(foo, [infer_var])`
            let f = foo;
            // Get a value of an opaque type on stable
            let t = k();
            // this returns `FnDef(foo, [k::return])`
            bind(t, f)
        }
        false => foo::<()>,
    };
    todo!()
}
```

r? ``@compiler-errors``

cc https://github.com/rust-lang/rust/issues/116652
2024-04-24 14:00:56 +02:00
León Orell Valerian Liehr
453c23f0f5
Rollup merge of #123316 - Enselic:sigpipe-inherit-variants, r=fmease
Test `#[unix_sigpipe = "inherit"]` with both `SIG_DFL` and `SIG_IGN`

Extend our `#[unix_sigpipe = "inherit"]` test so that it detects if  `SIGPIPE` wrongly ends up being `SIG_DFL` when the parent has `SIG_IGN`. We have no current test for this particular case.

Tracking issue: https://github.com/rust-lang/rust/issues/97889
2024-04-24 14:00:55 +02:00
bors
5557f8c9d0 Auto merge of #122500 - petrochenkov:deleg, r=fmease
delegation: Support renaming, and async, const, extern "ABI" and C-variadic functions

Also allow delegating to functions with opaque types (`impl Trait`).
The delegation item will refer to the original opaque type from the callee, fresh opaque type won't be created, which seems like a reasonable behavior.
(Such delegation items will cause query cycles when used in trait impls, but it can be fixed later.)

Part of https://github.com/rust-lang/rust/issues/118212.
2024-04-24 11:57:35 +00:00
Jakub Beránek
c36d78ed64
Turn CI_ONLY_WHEN_CHANNEL from an environment variable to a job attribute 2024-04-24 12:44:13 +02:00
Jakub Beránek
c59bc9a06a
Fix documentation 2024-04-24 12:15:17 +02:00
Oli Scherer
5c55d6a128 Register hidden types when equating function definitions in coercion 2024-04-24 10:05:33 +00:00
Oli Scherer
ca4a18fafc Add some FnDef LUB coercion tests 2024-04-24 10:05:32 +00:00
Jakub Beránek
4942a35f24
Remove step YAML anchor and env.SKIP_JOB 2024-04-24 11:12:39 +02:00
Jakub Beránek
246ee53637
Remove should-skip-this.sh 2024-04-24 11:12:17 +02:00
Jakub Beránek
e25735908f
Skip jobs based on the active channel in Python 2024-04-24 11:11:16 +02:00
Jakub Beránek
2a7fe14acd
Use a type alias for a CI job 2024-04-24 11:09:42 +02:00
bors
e9362896e0 Auto merge of #123792 - oli-obk:coroutine_closures, r=compiler-errors
Require explicitly marking closures as coroutines

instead of relying on patching up the closure to be a coroutine if it happens to contain a `yield` expression.

I only do this in the 2024 edition, as the `gen` keyword is only available there.
2024-04-24 08:43:30 +00:00
Oli Scherer
aef0f4024a Error on using yield without also using #[coroutine] on the closure
And suggest adding the `#[coroutine]` to the closure
2024-04-24 08:05:29 +00:00
bors
bd6766fdcc Auto merge of #3507 - RalfJung:let-underscore, r=RalfJung
avoid 'let _' in tests where we actually want the value to be computed
2024-04-24 08:04:33 +00:00
Ralf Jung
193b37dbaf avoid 'let _' in tests where we actually want the value to be computed 2024-04-24 10:03:11 +02:00
Oli Scherer
a589632dad Add explicit syntax for coroutines instead of relying on closures having yield expressions 2024-04-24 07:54:21 +00:00
Michael Scholten
3c5e88c7d1 Improved the compiler code with clippy 2024-04-24 09:41:44 +02:00
bors
6c34d4605e Auto merge of #3502 - RalfJung:GetUserProfileDirectoryW, r=RalfJung
windows: basic support for GetUserProfileDirectoryW

Fixes https://github.com/rust-lang/miri/issues/3499
2024-04-24 07:09:38 +00:00
Ralf Jung
ccb87f1baa avoid some unnecessary Scalar-i32-Scalar roundtrips 2024-04-24 08:49:42 +02:00
Ralf Jung
ccb43b6a95 make the obsucre truncating variant of this.write_os_str_to_wide_str a non-default function 2024-04-24 08:49:41 +02:00
Ralf Jung
00acfabcee windows buffer size protocol: turns out std resets last_error to 0; let's require that in general 2024-04-24 08:48:59 +02:00
Ralf Jung
342943bc77 windows: basic support for GetUserProfileDirectoryW 2024-04-24 08:48:59 +02:00
bors
e7da0fa62f Auto merge of #124175 - Kobzol:ci-dynamic-job, r=pietroalbini
CI: dynamic jobs

This PR modifies our CI workflows to be dynamic. This means that when a GitHub event is generated, we will run a Python script (`calculate-job-matrix.py`), which decides which CI jobs should be generated. These jobs are defined in `src/ci/github-actions/jobs.yml`).

This should provide a few benefits:
- Once the migration to dynamic jobs is complete, we shouldn't need `expand-yaml-anchors` anymore.
- The job table on PRs (and also the left job column on auto/try builds) should be much cleaner and contain only the jobs that are actually relevant/executed.
- It should be much easier to support dynamic try builds, i.e. to run an arbitrary CI job on a try build.

See [this Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/job.20matrix.20re-ordered.20PR.20list) for more context.

r? `@ghost`
2024-04-24 06:40:14 +00:00
bors
a3fddf2384 Auto merge of #3506 - rust-lang:rustup-2024-04-24, r=RalfJung
Automatic Rustup
2024-04-24 06:37:41 +00:00
Nicholas Nethercote
78e7c7b9f9 Whitespace fixes. 2024-04-24 16:28:49 +10:00
Nicholas Nethercote
748b0a2e35 Remove unnecessary pubs in mut_visit.rs.
This makes it clearer what is actually used outside of this crate.
2024-04-24 16:28:34 +10:00
Nicholas Nethercote
8d4655d9ec Rename NestedMetaItem::name_value_literal.
It's a highly misleading name, because it's completely different to
`MetaItem::name_value_literal`. Specifically, it doesn't match
`MetaItemKind::NameValue` (e.g. `#[foo = 3]`), it matches
`MetaItemKind::List` (e.g. `#[foo(3)]`).
2024-04-24 16:28:34 +10:00
Nicholas Nethercote
d5ec9b458a Remove MetaItemKind::value_str.
`MetaItem::value_str` is good enough. And this makes
`MetaItem::value_str` more like `MetaItem::meta_item_list` and
`name_value_literal`.
2024-04-24 16:28:34 +10:00
Nicholas Nethercote
15e71b6e43 Make LazyAttrTokenStream::encode panic.
It's unreachable, because AST JSON printing support was removed some
time ago.
2024-04-24 16:28:34 +10:00
whosehang
65d7c1d2d6 chore: fix some typos in comments
Signed-off-by: whosehang <whosehang@outlook.com>
2024-04-24 13:58:51 +08:00
The Miri Cronjob Bot
7e968351aa Merge from rustc 2024-04-24 05:04:52 +00:00
The Miri Cronjob Bot
b3affd3e90 Preparing for merge from rustc 2024-04-24 04:57:24 +00:00
bors
29a56a3b1c Auto merge of #122053 - erikdesjardins:alloca, r=nikic
Stop using LLVM struct types for alloca

The alloca type has no semantic meaning, only the size (and alignment, but we specify it explicitly) matter. Using `[N x i8]` is a more direct way to specify that we want `N` bytes, and avoids relying on LLVM's struct layout. It is likely that a future LLVM version will change to an untyped alloca representation.

Split out from #121577.

r? `@ghost`
2024-04-24 03:00:44 +00:00
bors
c1feb3ecee Auto merge of #124312 - weihanglo:update-cargo, r=weihanglo
Update cargo

7 commits in 80d5b607dde6ef97dfff4e23923822c01d2bb036..c9392675917adc2edab269eea27c222b5359c637
2024-04-19 18:39:22 +0000 to 2024-04-23 19:35:19 +0000
- fix(install): Don't respect MSRV for non-local installs (rust-lang/cargo#13790)
- gate some libc usages under cfg(unix), drop os_info features (rust-lang/cargo#13782)
- feat(resolver): Add default Edition2024 to resolver v3 (rust-lang/cargo#13785)
- Fix 2 tests for offline execution (rust-lang/cargo#13789)
- fix(toml): Report `_` fied variants (e.g. `dev_dependencies`) as deprecated (rust-lang/cargo#13783)
- feat(resolver): Add v3 resolver for MSRV-aware resolving (rust-lang/cargo#13776)
- Unused dependencies cleanup (rust-lang/cargo#13778)

r? ghost
2024-04-24 00:54:27 +00:00