about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-12-09Rollup merge of #134055 - RalfJung:interpret-alloc-dedup, r=oli-obkLeón Orell Valerian Liehr-104/+3
interpret: clean up deduplicating allocation functions The "align" and "kind" arguments would be largely ignored in the "dedup" case, so let's move that to entirely separate function. Let's also remove support for old-style miri_resolve_frame while we are at it. The docs have already said for a while that this must be set to 1.
2024-12-09Rollup merge of #134040 - clubby789:bootstrap-eprintln, r=jieyouxuLeón Orell Valerian Liehr-207/+211
bootstrap: print{ln}! -> eprint{ln}! (take 2) r? `@jieyouxu` Reland of #133817 with the `print!`s changed as well.
2024-12-09Rollup merge of #133996 - Zalathar:ui-link-native-libs, r=jieyouxuLeón Orell Valerian Liehr-6/+6
Move most tests for `-l` and `#[link(..)]` into `tests/ui/link-native-libs` Tests for the closely-related `-l` flag and `#[link(..)]` attribute are spread across a few different directories, and in some cases have ended up in a test directory intended for other linker-related functionality. This PR moves most of them into a single `tests/ui/link-native-libs` directory. --- Part of #133895. try-job: i686-mingw r? jieyouxu
2024-12-09Introduce `default_field_values` featureEsteban Küber-29/+44
Initial implementation of `#[feature(default_field_values]`, proposed in https://github.com/rust-lang/rfcs/pull/3681. Support default fields in enum struct variant Allow default values in an enum struct variant definition: ```rust pub enum Bar { Foo { bar: S = S, baz: i32 = 42 + 3, } } ``` Allow using `..` without a base on an enum struct variant ```rust Bar::Foo { .. } ``` `#[derive(Default)]` doesn't account for these as it is still gating `#[default]` only being allowed on unit variants. Support `#[derive(Default)]` on enum struct variants with all defaulted fields ```rust pub enum Bar { #[default] Foo { bar: S = S, baz: i32 = 42 + 3, } } ``` Check for missing fields in typeck instead of mir_build. Expand test with `const` param case (needs `generic_const_exprs` enabled). Properly instantiate MIR const The following works: ```rust struct S<A> { a: Vec<A> = Vec::new(), } S::<i32> { .. } ``` Add lint for default fields that will always fail const-eval We *allow* this to happen for API writers that might want to rely on users' getting a compile error when using the default field, different to the error that they would get when the field isn't default. We could change this to *always* error instead of being a lint, if we wanted. This will *not* catch errors for partially evaluated consts, like when the expression relies on a const parameter. Suggestions when encountering `Foo { .. }` without `#[feature(default_field_values)]`: - Suggest adding a base expression if there are missing fields. - Suggest enabling the feature if all the missing fields have optional values. - Suggest removing `..` if there are no missing fields.
2024-12-09jsondocck: Parse, don't validate commands.Alona Enraght-Moony-262/+169
2024-12-10crates/r-a: Fix typo in debug messageYuki Sireneva-1/+1
2024-12-09Unite more bool hashingKirill Bulatov-15/+16
2024-12-09Stop excluding Helix from the general resolve pathKirill Bulatov-2/+2
2024-12-09Always compute the hash when r-a wants the imports to be resolvedKirill Bulatov-17/+6
2024-12-09Draft completion hashingKirill Bulatov-24/+142
2024-12-10minor: enhance name suggestion for `Arc<T>` and `Rc<T>`roife-1/+27
2024-12-09Move dist-powerpc64le-linux to job-linux-4c-largediskJens Reidel-1/+1
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-09Merge pull request #18647 from Veykril/push-nsrrmmnzzoymLukas Wirth-3/+3
internal: Disable pipe on typing handler
2024-12-09Disable pipe on typing handlerLukas Wirth-3/+3
2024-12-09fix ICE on type error in promotedRalf Jung-2/+5
2024-12-09interpret: clean up deduplicating allocation functionsRalf Jung-104/+3
2024-12-09Merge pull request #18645 from Veykril/push-yruoyrvrsntwLukas Wirth-12/+21
fix: Non-exhaustive structs may be empty
2024-12-09fix: Non-exhaustive structs may be emptyLukas Wirth-12/+21
2024-12-09Enable `[bot-pull-requests]` triagebot featureJakub Beránek-0/+3
2024-12-09compiletest: `print{,ln}!` -> `eprint{,ln}!`clubby789-57/+57
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2024-12-09bootstrap: `print{,ln}!` -> `eprint{,ln}!`clubby789-150/+154
2024-12-09Merge pull request #18644 from Veykril/push-nolvpzqvoqwxLukas Wirth-53/+18
Remove patch sysroot cfg-if hack
2024-12-09Merge pull request #18643 from Veykril/push-muwuzmowptnnLukas Wirth-397/+407
internal: Rename test fixture crates to ra_test_fixture
2024-12-09Remove patch sysroot cfg-if hackLukas Wirth-53/+18
2024-12-09Rename test fixture crates to ra_test_fixtureLukas Wirth-397/+407
2024-12-09dist: Re-work how we describe the licence of Rust in our distributionsJonathan Pallant-24/+54
) add COPYRIGHT*.html files to the rustc binary distribution ) add contents of LICENSE folder to dist tarballs, because some of our in-tree licences will require that the license text is reproduced. ) The wording of COPYRIGHT is adjusted to not include license text (`reuse` ensures that it's in the LICENSE folder) ) A blanket copyright notice is added to LICENCE-MIT as required by the text. The general approach is that the license statements are now compiled using a tool in CI (generate-copyright), and you get either: * the source code (COPYRIGHT, LICENCE-APACHE, LICENCE-MIT, REUSE.toml and the LICENCES folder), or * the compiled version (COPYRIGHT.html, COPYRIGHT-library.html and the LICENCES folder).
2024-12-09Remove unstable attributes in minicoreLaurențiu Nicola-4/+0
2024-12-09Merge pull request #18441 from Veykril/lw-psyvmlotlvqnLukas Wirth-54/+107
internal: Do not cache the config directory path
2024-12-09Fix config guard lock for ratoml testsLukas Wirth-63/+59
2024-12-09Merge pull request #18635 from ChayimFriedman2/fix-testLukas Wirth-47/+49
minor: Fix a test that didn't test what it should
2024-12-09Merge from rustcRalf Jung-109/+227
2024-12-09Preparing for merge from rustcRalf Jung-1/+1
2024-12-09Auto merge of #134052 - matthiaskrgr:rollup-puxwqrk, r=matthiaskrgrbors-1233/+1824
Rollup of 7 pull requests Successful merges: - #133567 (A bunch of cleanups) - #133789 (Add doc alias 'then_with' for `then` method on `bool`) - #133880 (Expand home_dir docs) - #134036 (crash tests: use individual mir opts instead of mir-opt-level where easily possible) - #134045 (Fix some triagebot mentions paths) - #134046 (Remove ignored tests for hangs w/ new solver) - #134050 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-09Rollup merge of #134050 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-1163/+1755
Miri subtree update r? `@ghost`
2024-12-09Rollup merge of #134046 - lqd:new-solver-hangs, r=compiler-errorsMatthias Krüger-5/+12
Remove ignored tests for hangs w/ new solver As asked on zulip [here](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/needs_help.3A.20look.20through.20compare-mode.20hangs). As far as I can tell there are no more UI tests that hang anymore, so this removes the ignore directives for the compare mode. (As I was using `--compare-mode new-solver` and that failed in an obscure way without any info about what to do, I've also fixed its error handling in `compiletest`: it didn't show the invalid `--compare-mode`, nor the valid values one can pass). r? lcnr
2024-12-09Rollup merge of #133567 - bjorn3:various_cleanups, r=cjgillotMatthias Krüger-65/+57
A bunch of cleanups These are all extracted from a branch I have to get rid of driver queries. Most of the commits are not directly necessary for this, but were found in the process of implementing the removal of driver queries. Previous PR: https://github.com/rust-lang/rust/pull/132410
2024-12-08Auto merge of #134039 - matthiaskrgr:rollup-ix8kdg1, r=matthiaskrgrbors-38/+136
Rollup of 7 pull requests Successful merges: - #133424 (Parse guard patterns) - #133733 ( compiletest: show the difference between the normalized output and the actual output for lines which didn't match) - #133993 (Fix: typo in E0751 error explanation) - #134013 (Adds new intrinsic declaration) - #134020 (Remove unnecessary `int_type_width_signed` function) - #134024 (Advent of `tests/ui` (misc cleanups and improvements) [2/N]) - #134038 (deps: Update psm) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-08fix: Map new replacement nodes to their mutable equivalents in `SyntaxEditor`Giga Bowser-20/+22
2024-12-08improve `--compare-mode` error handlingRémy Rakic-5/+12
- show the erroneous value - show the valid values
2024-12-08Auto merge of #133134 - Walnut356:synth_prov, r=Mark-Simulacrumbors-1/+22
Don't use a SyntheticProvider for literally every type Replaces a glob regex with individualized imports for each standard library type. This improves debugger performance by quite a bit when populating lots of values with lots of fields With the glob, afaik every single value of every single type that the debugger renders is run through a python function that does quite a few string comparisons (i plan to fix those next) to determine the SyntheticProvider to use. It looks like DefaultSyntheticProvider's functions internally call the liblldb c++ functions, which ends up with identical behavior to not using a SyntheticProvider at all, except you have extra python round trips slowing things down. These sample vidoes were run on x86-64-pc-windows-gnu. `vect` is a 1000 element `Vec<Big>`, `Big` contains a dozen or so `Small`, and `Small` contains a dozen or so `[i32; 5]` Before: https://github.com/user-attachments/assets/07c31fe7-e126-4c2e-8ae9-cfe36e351d3f After: https://github.com/user-attachments/assets/6c0d1a45-1ffe-46de-95a0-5dbe59a173b5 --- try-job: aarch64-apple
2024-12-08Downgrade ccclubby789-2/+2
2024-12-08Rollup merge of #133733 - jyn514:compiletest-diffs, r=jieyouxuMatthias Krüger-35/+119
compiletest: show the difference between the normalized output and the actual output for lines which didn't match example output: ``` failures: ---- [ui] tests/ui/layout/enum.rs stdout ---- diff of stderr: - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIGN } + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } 2 --> $DIR/enum.rs:9:1 3 | 4 LL | enum UninhabitedVariantAlign { Note: some mismatched output was normalized before being compared - error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(8 bytes) } - --> /home/jyn/src/rust2/tests/ui/layout/enum.rs:9:1 + error: align: AbiAndPrefAlign { abi: Align(2 bytes), pref: $PREF_ALIN } ```
2024-12-08Rollup merge of #133424 - Nadrieril:guard-patterns-parsing, r=fee1-deadMatthias Krüger-3/+17
Parse guard patterns This implements the parsing of [RFC3637 Guard Patterns](https://rust-lang.github.io/rfcs/3637-guard-patterns.html) (see also [tracking issue](https://github.com/rust-lang/rust/issues/129967)). This PR is extracted from https://github.com/rust-lang/rust/pull/129996 with minor modifications. cc `@max-niederman`
2024-12-08handle cygwin environments in `install::sanitize_sh`onur-ozkan-12/+13
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-08implement `TargetSelection::is_cygwin` functiononur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-08Fix a test that didn't test what it shouldChayim Refael Friedman-47/+49
That is, fix the helper function and disable the tests for now.
2024-12-08fix buildRalf Jung-2/+2
2024-12-08Merge pull request #18633 from ChayimFriedman2/unify-fnLukas Wirth-1/+21
fix: Coerce two `FnDef`s to fn pointers even if they are the same, if they are subtypes
2024-12-08Merge from rustcThe Miri Cronjob Bot-25/+27
2024-12-08Preparing for merge from rustcThe Miri Cronjob Bot-1/+1