about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-10-31update config.example.tomlSparrowLii-5/+6
2023-10-31update bootstrap change historySparrowLii-2/+2
2023-10-31enable parallel rustc in nightly buildsSparrowLii-4/+7
2023-10-31Auto merge of #117363 - saethlin:cross-crate-inline-when-inline, r=tmiaskobors-2/+7
Enable cross-crate-inlining when MIR inlining is enabled This would make https://github.com/rust-lang/rust/issues/117355 generally less obscure, and also seems like a good idea, even if for some reason someone wants MIR opts but no codegen opts.
2023-10-30Auto merge of #116405 - estebank:issue-103155, r=davidtwcobors-193/+249
Detect object safety errors when assoc type is missing When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-30Sort errorsEsteban Küber-13/+15
2023-10-30Add testEsteban Küber-0/+25
2023-10-30Detect object safety errors when assoc type is missingEsteban Küber-194/+223
When an associated type with GATs isn't specified in a `dyn Trait`, emit an object safety error instead of only complaining about the missing associated type, as it will lead the user down a path of three different errors before letting them know that what they were trying to do is impossible to begin with. Fix #103155.
2023-10-30Auto merge of #117415 - matthiaskrgr:rollup-jr2p1t2, r=matthiaskrgrbors-149/+286
Rollup of 7 pull requests Successful merges: - #116862 (Detect when trait is implemented for type and suggest importing it) - #117389 (Some diagnostics improvements of `gen` blocks) - #117396 (Don't treat closures/coroutine types as part of the public API) - #117398 (Correctly handle nested or-patterns in exhaustiveness) - #117403 (Poison check_well_formed if method receivers are invalid to prevent typeck from running on it) - #117411 (Improve some diagnostics around `?Trait` bounds) - #117414 (Don't normalize to an un-revealed opaque when we hit the recursion limit) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-30Rollup merge of #117414 - compiler-errors:tait-forevert, r=oli-obkMatthias Krüger-7/+21
Don't normalize to an un-revealed opaque when we hit the recursion limit Currently, we will normalize `Opaque := Option<&Opaque>` to something like `Option<&Option<&Option<&...Opaque>>>`, hitting a limit and bottoming out in an unnormalized opaque after the recursion limit gets hit. Unfortunately, during `layout_of`, we'll simply recurse and try again if the type normalizes to something different than the type: https://github.com/rust-lang/rust/blob/e6e931dda5fffbae0fd87c5b1af753cc95556880/compiler/rustc_ty_utils/src/layout.rs#L58-L60 That means then we'll try to normalize `Option<&Option<&Option<&...Opaque>>>` again, substituting `Opaque` into itself even deeper. Eventually this will get to the point that we're just stack-overflowing on a really deep type before even hitting an opaque again. To fix this, we just bottom out into `ty::Error` instead of the unrevealed opaque type. Fixes #117412 r? `@oli-obk`
2023-10-30Rollup merge of #117411 - oli-obk:query_merge_immobile_game, ↵Matthias Krüger-58/+63
r=compiler-errors,Nilstrieb Improve some diagnostics around `?Trait` bounds * uses better spans * clarifies a message that was only talking about generic params, but applies to `dyn ?Trait` and `impl ?Trait` as well
2023-10-30Rollup merge of #117403 - oli-obk:the_gift_that_keeps_on_giving_116849, ↵Matthias Krüger-17/+41
r=compiler-errors Poison check_well_formed if method receivers are invalid to prevent typeck from running on it fixes #117379 Though if some code invokes typeck without having first invoked `check_well_formed` then we'll encounter this ICE again. This can happen in const and const fn bodies if they are evaluated due to other `check_well_formed` checks or similar
2023-10-30Rollup merge of #117398 - Nadrieril:fix-117378, r=compiler-errorsMatthias Krüger-1/+7
Correctly handle nested or-patterns in exhaustiveness I had assumed nested or-patterns were flattened, and they mostly are but not always. Fixes https://github.com/rust-lang/rust/issues/117378
2023-10-30Rollup merge of #117396 - oli-obk:privacy_visitor_types, r=compiler-errorsMatthias Krüger-28/+56
Don't treat closures/coroutine types as part of the public API Fixes a regression from https://github.com/rust-lang/rust/pull/117076 r? `@compiler-errors`
2023-10-30Rollup merge of #117389 - oli-obk:gen_fn, r=compiler-errorsMatthias Krüger-10/+49
Some diagnostics improvements of `gen` blocks These are leftovers from https://github.com/rust-lang/rust/pull/116447
2023-10-30Rollup merge of #116862 - estebank:issue-57457, r=oli-obkMatthias Krüger-28/+49
Detect when trait is implemented for type and suggest importing it Fix #57457.
2023-10-30Don't super-fold types when we hit the recursion limitMichael Goulet-7/+21
2023-10-30Auto merge of #117405 - GuillaumeGomez:rollup-i3jxtwh, r=GuillaumeGomezbors-1079/+1651
Rollup of 11 pull requests Successful merges: - #112463 (rustdoc: elide cross-crate default generic arguments) - #117068 (Clean up `compiler/rustc*/Cargo.toml`) - #117132 (On object safety error, mention new enum as alternative) - #117317 (share some track_caller logic between interpret and codegen) - #117356 (Add support for mipsel-unknown-netbsd, 32-bit LE mips.) - #117357 (Rename a few remaining references to abort terminator) - #117370 (C-variadic error improvements) - #117376 (More `rustc_interface` cleanups) - #117383 (improve and fix `x install`) - #117390 (Fix unused variables lint issue for args in macro) - #117395 (Fix missing leading space in suggestion) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-30Improve some diagnostics around `?Trait` boundsOli Scherer-58/+63
2023-10-30Detect when trait is implemented for type and suggest importing itEsteban Küber-28/+49
Fix #57457.
2023-10-30Rollup merge of #117395 - gurry:117380-wrong-parent-sugg, r=NilstriebGuillaume Gomez-2/+90
Fix missing leading space in suggestion For a local pattern with no space between `let` and `(` e.g.: ```rust let(_a) = 3; ``` we were previously suggesting this illegal code: ```rust let_a = 3; ``` After this change the suggestion will instead be: ```rust let _a = 3; ``` Fixes #117380
2023-10-30Rollup merge of #117390 - chenyukang:yukang-fix-117284-unused-macro, r=estebankGuillaume Gomez-11/+84
Fix unused variables lint issue for args in macro Fixes #117284 r? ````@estebank````
2023-10-30Rollup merge of #117383 - onur-ozkan:fix-x-install, r=albertlarsan68Guillaume Gomez-22/+30
improve and fix `x install` Fix: Write access check of `prefix` and `sysconfdir` when DESTDIR is present. Improvement: Instead of repeatedly reading `DESTDIR` within each `fn prepare_dir` usage, read it once and pass it to the `fn prepare_dir`. Fixes #117203
2023-10-30Rollup merge of #117376 - nnethercote:rustc_interface-more, r=oli-obkGuillaume Gomez-410/+283
More `rustc_interface` cleanups In particular, following up #117268 with more improvement to `--cfg`/`--check-cfg` handling. r? ``@oli-obk``
2023-10-30Rollup merge of #117370 - nicholasbishop:bishop-better-c-variadic-errors, ↵Guillaume Gomez-49/+135
r=oli-obk C-variadic error improvements A couple improvements for c-variadic errors: 1. Fix the bad-c-variadic error being emitted multiple times. If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once rather than once per `...`. 2. Explicitly reject `const` C-variadic functions. Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic". This also addresses one of the concerns in https://github.com/rust-lang/rust/issues/44930: "Ensure that even when this gets stabilized for regular functions, it is still rejected on const fn."
2023-10-30Rollup merge of #117357 - tmiasko:terminate, r=wesleywiserGuillaume Gomez-2/+2
Rename a few remaining references to abort terminator Follow up to e3f2edc75bf2becb57d7d770bba20606da1c4224
2023-10-30Rollup merge of #117356 - he32:netbsd-mipsel, r=oli-obkGuillaume Gomez-0/+29
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
2023-10-30Rollup merge of #117317 - RalfJung:track-caller, r=oli-obkGuillaume Gomez-238/+196
share some track_caller logic between interpret and codegen Also move the code that implements the track_caller intrinsics out of the core interpreter engine -- it's just a helper creating a const-allocation, doesn't need to be part of the interpreter core.
2023-10-30Rollup merge of #117132 - estebank:issue-80194, r=petrochenkovGuillaume Gomez-1/+130
On object safety error, mention new enum as alternative When we encounter a `dyn Trait` that isn't object safe, look for its implementors. If there's one, mention using it directly If there are less than 9, mention the possibility of creating a new enum and using that instead. Fix #80194.
2023-10-30Rollup merge of #117068 - nnethercote:clean-up-Cargo-toml, r=wesleywiserGuillaume Gomez-303/+400
Clean up `compiler/rustc*/Cargo.toml` Mostly by sorting dependencies, plus some other minor things. r? ``@wesleywiser``
2023-10-30Rollup merge of #112463 - fmease:rustdoc-elide-x-crate-def-gen-args, ↵Guillaume Gomez-41/+272
r=GuillaumeGomez rustdoc: elide cross-crate default generic arguments Elide cross-crate generic arguments if they coincide with their default. TL;DR: Most notably, no more `Box<…, Global>` in `std`'s docs, just `Box<…>` from now on. Fixes #80379. Also helps with #44306. Follow-up to #103885, #107637. r? ``@ghost``
2023-10-30Only run panic tests on targets that can unwindOli Scherer-1/+2
2023-10-30Poison check_well_formed if method receivers are invalid to prevent typeck ↵Oli Scherer-17/+41
from running on it
2023-10-30rustdoc: elide cross-crate default generic argumentsLeón Orell Valerian Liehr-41/+272
2023-10-30Auto merge of #117267 - RalfJung:miri-tests, r=Mark-Simulacrumbors-3/+30
update which targets we test Miri on I hope this doesn't cost too much time; running only the "pass" tests should be reasonably fast (1-2 minutes on my system). Fixes https://github.com/rust-lang/rust/issues/117167
2023-10-30Explicitly reject const C-variadic functionsNicholas Bishop-22/+120
Trying to use C-variadics in a const function would previously fail with an error like "destructor of `VaListImpl<'_>` cannot be evaluated at compile-time". Add an explicit check for const C-variadics to provide a clearer error: "functions cannot be both `const` and C-variadic".
2023-10-30Correctly handle nested or-patterns in column-wise analysesNadrieril-1/+7
2023-10-30Fix bad-c-variadic error being emitted multiple timesNicholas Bishop-43/+31
If a function incorrectly contains multiple `...` args, and is also not foreign or `unsafe extern "C"`, only emit the latter error once.
2023-10-30Some manual rustfmt as rustfmt is broken on this fileOli Scherer-3/+4
2023-10-30Merge two equal match armsOli Scherer-6/+1
2023-10-30Don't treat closures/coroutines as part of the public APIOli Scherer-36/+16
2023-10-30Add regression testOli Scherer-0/+52
2023-10-30Fix #117284, Fix unused variables lint issue for args in macroyukang-11/+84
2023-10-30Fix missing leading space in suggestionGurinder Singh-2/+90
For a local pattern with no space between `let` and `(` e.g.: let(_a) = 3; we were previously suggesting this illegal code: let_a =3; After this change the suggestion will instead be: let _a =3; (Note the space after `let`)
2023-10-30Auto merge of #116939 - chenx97:bootstrap-fd-lock, r=onur-ozkanbors-86/+68
bootstrap: bump fd-lock, clap and windows This update is proposed as an effort to update target-sensitive dependencies like `libc` and `rustix`. Since the Cargo.toml file is modified to prevent downgrading, cargo will update the dependencies automatically when you build the binary.
2023-10-30Auto merge of #117387 - fmease:rollup-5958nsf, r=fmeasebors-459/+386
Rollup of 8 pull requests Successful merges: - #117147 (Print variadic argument pattern in HIR pretty printer) - #117177 (Use ImageDataType for allocation type) - #117205 (Allows `#[diagnostic::on_unimplemented]` attributes to have multiple) - #117350 (coverage: Replace manual debug indents with nested tracing spans in `counters`) - #117365 (Stabilize inline asm usage with rustc_codegen_cranelift) - #117371 (Ignore RPIT duplicated lifetimes in `opaque_types_defined_by`) - #117382 (Fail typeck for illegal break-with-value) - #117385 (deduce_param_attrs: explain a read-only case) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-30Add a custom panic message for resuming `gen` blocks after they panickedOli Scherer-2/+40
2023-10-30Talk about `gen fn` in diagnostics about `gen fn`Oli Scherer-8/+8
2023-10-30update which targets we test Miri onRalf Jung-3/+30
2023-10-30Rollup merge of #117385 - RalfJung:deduce_param_attrs, r=oli-obkLeón Orell Valerian Liehr-0/+1
deduce_param_attrs: explain a read-only case This takes the discussion [here](https://github.com/rust-lang/rust/pull/111517/files#r1243443625) and adds it as comment in the code. Cc `@lukas-code`