about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-12-08Auto merge of #133988 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 6 commits in 05f54fdc34310f458033af8a63ce1d699fae8bf6..20a443231846b81c7b909691ec3f15eb173f2b18 2024-12-03 03:14:12 +0000 to 2024-12-06 21:56:56 +0000 - fix(fingerprint): Don't throwaway the cache on RUSTFLAGS changes (rust-lang/cargo#14830) - fix(build-rs)!: Remove meaningless 'cargo_cfg_debug_assertions' (rust-lang/cargo#14901) - docs(fingerprint): cargo-rustc extra flags do not affect the metadata (rust-lang/cargo#14898) - fix(add): Don't select yanked versions when normalizing names (rust-lang/cargo#14895) - fix(fix): Migrate workspace dependencies (rust-lang/cargo#14890) - test(build-std): make mock-std closer to real world (rust-lang/cargo#14896)
2024-12-07Make `Copy` unsafe to implement for ADTs with `unsafe` fieldsJack Wrenn-0/+1
As a rule, the application of `unsafe` to a declaration requires that use-sites of that declaration also require `unsafe`. For example, a field declared `unsafe` may only be read in the lexical context of an `unsafe` block. For nearly all safe traits, the safety obligations of fields are explicitly discharged when they are mentioned in method definitions. For example, idiomatically implementing `Clone` (a safe trait) for a type with unsafe fields will require `unsafe` to clone those fields. Prior to this commit, `Copy` violated this rule. The trait is marked safe, and although it has no explicit methods, its implementation permits reads of `Self`. This commit resolves this by making `Copy` conditionally safe to implement. It remains safe to implement for ADTs without unsafe fields, but unsafe to implement for ADTs with unsafe fields. Tracking: #132922
2024-12-07Coerce two `FnDef`s to fn pointers even if they are the same, if they are ↵Chayim Refael Friedman-1/+21
subtypes That's because they can be the same function but still different substs, which mandates them to coerce to fn pointers in order to unify.
2024-12-07add weak memory consistency test for mixing SC accesses and fencesRalf Jung-0/+30
2024-12-07Watch for user config ratomlAli Bektas-37/+94
2024-12-07Merge pull request #18575 from Giga-Bowser/flip-assistsLukas Wirth-87/+217
minor: Migrate `flip_*` assists to `SyntaxEditor`
2024-12-07Merge pull request #18630 from Veykril/push-ystzsxpywnxnLukas Wirth-19/+37
fix: Temporarily disable completion resolve support for helix and neovim
2024-12-07Auto merge of #133978 - matthiaskrgr:rollup-6gh1iho, r=matthiaskrgrbors-25/+27
Rollup of 7 pull requests Successful merges: - #130209 (Stabilize `std::io::ErrorKind::CrossesDevices`) - #130254 (Stabilize `std::io::ErrorKind::QuotaExceeded`) - #132187 (Add Extend impls for tuples of arity 1 through 12) - #133875 (handle `--json-output` properly) - #133934 (Do not implement unsafe auto traits for types with unsafe fields) - #133954 (Hide errors whose suggestions would contain error constants or types) - #133960 (rustdoc: remove eq for clean::Attributes) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-07fmtThe Miri Cronjob Bot-15/+10
2024-12-07Merge from rustcThe Miri Cronjob Bot-1211/+2197
2024-12-07Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-12-07compiletest: show the difference between the normalized output and the ↵jyn-35/+119
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-07Move more tests into `tests/ui/link-native-libs`Zalathar-6/+6
2024-12-06Update cargoWeihang Lo-0/+0
2024-12-07squashing: recommend --keep-base when squashing without a conflict (#2157)Ralf Jung-8/+14
2024-12-06Remove polymorphizationBen Kimock-5/+0
2024-12-06Rollup merge of #133960 - jdonszelmann:remove-eq-on-attributes, r=notriddleMatthias Krüger-13/+0
rustdoc: remove eq for clean::Attributes This change removes the `PartialEq` and `Eq` implementations from `Attributes`. This implementation was not used, and whether the implementation is useful at all is questionable. I care about removing it, because I'm working #131229. While simplifying the representation of attributes, I intend to remove attr ids from attributes where possible. They're actually rarely useful. This piece of code uses them, but for no real reason, so I think simply removing the implementation makes most sense. Let me know if there are major objections to this.
2024-12-06Rollup merge of #133875 - onur-ozkan:early-return-rustfmt, r=jieyouxuMatthias Krüger-11/+26
handle `--json-output` properly Because `rustfmt` doesn't support JSON output, `x test --json-output` doesn't respect the `--json-output` flag during formatting step. This change makes that `x test` skips the formatting step if `--json-output` is specified. In addition, resolves #133855 with the 2nd commit.
2024-12-06Rollup merge of #130254 - GrigorenkoPV:QuotaExceeded, r=dtolnayMatthias Krüger-1/+1
Stabilize `std::io::ErrorKind::QuotaExceeded` Also drop "Filesystem" from its name. See #130190 for more info. FCP in #130190 cc #86442 r? `@dtolnay`
2024-12-06remove a no-longer-needed work-aroundRalf Jung-6/+2
2024-12-06add testRalf Jung-1/+41
2024-12-06Remove all threading through of ErrorGuaranteed from the driverbjorn3-3/+5
It was inconsistently done (sometimes even within a single function) and most of the rest of the compiler uses fatal errors instead, which need to be caught using catch_with_exit_code anyway. Using fatal errors instead of ErrorGuaranteed everywhere in the driver simplifies things a bit.
2024-12-06Remove all threading through of ErrorGuaranteed from the driverbjorn3-52/+38
It was inconsistently done (sometimes even within a single function) and most of the rest of the compiler uses fatal errors instead, which need to be caught using catch_with_exit_code anyway. Using fatal errors instead of ErrorGuaranteed everywhere in the driver simplifies things a bit.
2024-12-06Store a single copy of the error registry in DiagCtxtbjorn3-13/+19
And pass this to the individual emitters when necessary.
2024-12-06Auto merge of #133089 - eholk:stabilize-noop-waker, r=dtolnaybors-10/+4
Stabilize noop_waker Tracking Issue: #98286 This is a handy feature that's been used widely in tests and example async code and it'd be nice to make it available to users. cc `@rust-lang/wg-async`
2024-12-06Temporarily disable completion resolve support for neovimLukas Wirth-3/+7
2024-12-06Temporarily disable completion resolve support for helixLukas Wirth-19/+33
2024-12-06Auto merge of #133956 - bjorn3:sync_cg_clif-2024-12-06, r=bjorn3bors-0/+2
Sync cg clif 2024 12 06 The main highlights this time are a Cranelift update disabling the clif ir verifier by default for better performance. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2024-12-06Merge pull request #18629 from Veykril/push-wlsvxwomumppLukas Wirth-21/+29
Highlight right angle as part of fat arrow in macro rules arm
2024-12-06Highlight right angle as part of fat arrow in macro rules armLukas Wirth-21/+29
2024-12-06Merge pull request #18628 from Veykril/push-sqpymrtxysmwLukas Wirth-29/+69
Add typing handler for param list pipe
2024-12-06feat: Migrate `flip_comma` assist to `SyntaxEditor`Giga Bowser-43/+79
2024-12-06minor: Add `token_tree` constructor to `SyntaxFactory`Giga Bowser-1/+27
2024-12-06feat: Migrate `flip_trait_bound` assist to `SyntaxEditor`Giga Bowser-6/+8
2024-12-06feat: Migrate `flip_binexpr` assist to `SyntaxEditor`Giga Bowser-26/+29
2024-12-06minor: Add `expr_bin` constructor to `SyntaxFactory`Giga Bowser-0/+17
2024-12-06minor: Add `token` constructor to `SyntaxFactory`Giga Bowser-1/+5
2024-12-06fix: Don't produce `ChangedAncestor` for `SyntaxToken`sGiga Bowser-10/+52
2024-12-06fix: Properly determine `SyntaxEditor` replacement intersectionGiga Bowser-1/+1
Bordering replacements should not be considered intersecting
2024-12-06Add typing handler for param list pipeLukas Wirth-29/+69
2024-12-06Rename the ARM runner YAML anchorJakub Beránek-4/+4
To make it more consistent with the rest of the anchors.
2024-12-06CI: move `dist-arm-linux` to an ARM runnerJakub Beránek-2/+2
2024-12-06Merge pull request #18627 from Veykril/push-tzvnrnytrksrLukas Wirth-2/+25
Improve heuristics for on typing semicolon insertion
2024-12-06Improve heuristics for on typing semicolon insertionLukas Wirth-2/+25
2024-12-06Merge pull request #18551 from ShoyuVanilla/migrate-turbofish-assistLukas Wirth-24/+77
Migrate `add_turbo_fish` to `SyntaxEditor`
2024-12-06Merge pull request #18563 from alibektas/workspace_key_high_precedenceLukas Wirth-3/+1
minor: run `FlycheckHandle::restart_workspace` when `check_workspace` true
2024-12-06remove eq for attributesJonathan Dönszelmann-13/+0
2024-12-06Merge pull request #18594 from ChayimFriedman2/async-closuresLukas Wirth-68/+291
feat: Support `AsyncFnX` traits
2024-12-06Cargo decided to add serde to cg_clif's lockfile despite serde support in ↵bjorn3-0/+2
Cranelift being disabled
2024-12-06Merge pull request #18474 from Veykril/push-nvtxykxkwnvsLukas Wirth-130/+199
Make bracket typing handler work on more things