about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-11-02Merge from rustcThe Miri Conjob Bot-550/+880
2023-11-02Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-11-01Rollup merge of #117488 - GuillaumeGomez:update-minifier, r=notriddleMatthias Krüger-1/+1
Update minifier-rs version to 0.3.0 It fixes https://github.com/GuillaumeGomez/minifier-rs/issues/105. r? ```@notriddle```
2023-11-01Rename hook.Camille GILLOT-1/+1
2023-11-01Update minifier-rs version to 0.3.0Guillaume Gomez-1/+1
2023-11-01Auto merge of #117482 - matthiaskrgr:rollup-doc6jgm, r=matthiaskrgrbors-2/+2
Rollup of 4 pull requests Successful merges: - #115626 (Clean up unchecked_math, separate out unchecked_shifts) - #117397 (Don't emit delayed good-path bugs on panic) - #117401 (Refactor: move suggestion functions from demand to suggestions) - #117475 (Inline and remove `create_session`.) r? `@ghost` `@rustbot` modify labels: rollup
2023-11-01Rollup merge of #115626 - clarfonthey:unchecked-math, r=thomccMatthias Krüger-2/+2
Clean up unchecked_math, separate out unchecked_shifts Tracking issue: #85122 Changes: 1. Remove `const_inherent_unchecked_arith` flag and make const-stability flags the same as the method feature flags. Given the number of other unsafe const fns already stabilised, it makes sense to just stabilise these in const context when they're stabilised. 2. Move `unchecked_shl` and `unchecked_shr` into a separate `unchecked_shifts` flag, since the semantics for them are unclear and they'll likely be stabilised separately as a result. 3. Add an `unchecked_neg` method exclusively to signed integers, under the `unchecked_neg` flag. This is because it's a new API and probably needs some time to marinate before it's stabilised, and while it *would* make sense to have a similar version for unsigned integers since `checked_neg` also exists for those there is absolutely no case where that would be a good idea, IMQHO. The longer-term goal here is to prepare the `unchecked_math` methods for an FCP and stabilisation since they've existed for a while, their semantics are clear, and people seem in favour of stabilising them.
2023-11-01Auto merge of #117436 - nikic:update-llvm-16, r=cuviperbors-0/+0
Update to LLVM 17.0.4 Fixes #116668. Fixes #116941. Fixes #116976. r? `@cuviper`
2023-10-31Auto merge of #117459 - matthiaskrgr:rollup-t3osb3c, r=matthiaskrgrbors-0/+27
Rollup of 5 pull requests Successful merges: - #113241 (rustdoc: Document lack of object safety on affected traits) - #117388 (Turn const_caller_location from a query to a hook) - #117417 (Add a stable MIR visitor) - #117439 (prepopulate opaque ty storage before using it) - #117451 (Add support for pre-unix-epoch file dates on Apple platforms (#108277)) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-31Update cargoWeihang Lo-0/+0
2023-10-31Rollup merge of #113241 - poliorcetics:85138-doc-object-safety, r=GuillaumeGomezMatthias Krüger-0/+27
rustdoc: Document lack of object safety on affected traits Closes #85138 I saw the issue didn't have any recent activity, if there is another MR for it I missed it. I want the issue to move forward so here is my proposition. It takes some space just before the "Implementors" section and only if the trait is **not** object safe since it is the only case where special care must be taken in some cases and this has the benefit of avoiding generation of HTML in (I hope) the common case.
2023-10-31Auto merge of #117450 - oli-obk:rustdoc_verify, r=estebankbors-1/+5
Accept less invalid Rust in rustdoc pulled out of https://github.com/rust-lang/rust/pull/117213 where this change was already approved This only affects rustdoc, and has up to [20% perf regressions in rustdoc](https://github.com/rust-lang/rust/pull/117213#issuecomment-1785776288). These are unavoidable, as we are simply doing more checks now, but it's part of the longer term plan of making rustdoc more resistant to ICEs by only accepting valid Rust code.
2023-10-31Accept less invalid Rust in rustdocOli Scherer-1/+5
2023-10-31Use derivative for CloneMichael Goulet-0/+1
2023-10-31Auto merge of #117377 - dtolnay:deprecatedsince, r=cjgillotbors-41/+39
Store #[deprecated] attribute's `since` value in parsed form This PR implements the first followup bullet listed in https://github.com/rust-lang/rust/pull/117148#issue-1960240108. We centralize error handling to the attribute parsing code in `compiler/rustc_attr/src/builtin.rs`, and thereby remove some awkward error codepaths from later phases of compilation that had to make sense of these #\[deprecated\] attributes, namely `compiler/rustc_passes/src/stability.rs` and `compiler/rustc_middle/src/middle/stability.rs`.
2023-10-31update config.example.tomlSparrowLii-1/+1
2023-10-31update bootstrap change historySparrowLii-1/+1
2023-10-31enable parallel rustc in nightly buildsSparrowLii-4/+7
2023-10-31Update to LLVM 17.0.4Nikita Popov-0/+0
2023-10-30Descriptive variant name deprecation versions outside the standard libraryDavid Tolnay-2/+2
2023-10-30Represent absence of 'since' attribute as a variant of DeprecatedSinceDavid Tolnay-8/+8
2023-10-30Add a DeprecatedSince::Err variant for versions that fail to parseDavid Tolnay-10/+18
2023-10-30Auto merge of #117405 - GuillaumeGomez:rollup-i3jxtwh, r=GuillaumeGomezbors-68/+158
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-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-15/+8
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 #117356 - he32:netbsd-mipsel, r=oli-obkGuillaume Gomez-0/+7
Add support for mipsel-unknown-netbsd, 32-bit LE mips.
2023-10-30Rollup merge of #112463 - fmease:rustdoc-elide-x-crate-def-gen-args, ↵Guillaume Gomez-31/+113
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-30Move deprecation_in_effect to inherent method on DeprecationDavid Tolnay-8/+2
2023-10-30rustdoc: elide cross-crate default generic argumentsLeón Orell Valerian Liehr-31/+113
2023-10-30Auto merge of #117267 - RalfJung:miri-tests, r=Mark-Simulacrumbors-3/+29
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-30update which targets we test Miri onRalf Jung-3/+29
2023-10-30improve and fix x installonur-ozkan-22/+30
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`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-30bootstrap: bump fd-lock, clap and windows.chenx97-86/+68
this also updates target-sensitive dependencies like rustix and libc.
2023-10-30make sure we catch UB with _ pattern in various syntactic positionsRalf Jung-16/+87
2023-10-29Store version of `deprecated` attribute in structured formDavid Tolnay-10/+6
2023-10-29Rename Since -> StableSince in preparation for a DeprecatedSinceDavid Tolnay-18/+18
2023-10-30Delay parsing of `--cfg` and `--check-cfg` options.Nicholas Nethercote-15/+8
By storing the unparsed values in `Config` and then parsing them within `run_compiler`, the parsing functions can use the main symbol interner, and not create their own short-lived interners. This change also eliminates the need for one `EarlyErrorHandler` in rustdoc, because parsing errors can be reported by another, slightly later `EarlyErrorHandler`.
2023-10-30Auto merge of #117328 - lqd:cranelift-rocket, r=Mark-Simulacrumbors-0/+12
pass `CODEGEN_BACKENDS` to docker The backends to build are now defined in the `CODEGEN_BACKENDS` env var. It's correctly set in CI, but wasn't passed to docker, hence cg_clif wasn't actually built in #81746. r? `@Kobzol:` I locally tried `CODEGEN_BACKENDS="cranelift" DEPLOY=1 src/ci/docker/run.sh dist-x86_64-linux` and this change was enough for `ci/run.sh` to read the env var. So I'll try as-is and we'll see.
2023-10-29feat: Add 'object-safety' ID to init_id_map() in rustdocAlexis (Poliorcetics) Bourget-1/+3
2023-10-29feat: render Object Safety informations non-object safe traitsAlexis (Poliorcetics) Bourget-0/+25
2023-10-29Auto merge of #116270 - cjgillot:gvn-aggregate, r=oli-obk,RalfJungbors-3/+2
See through aggregates in GVN This PR is extracted from https://github.com/rust-lang/rust/pull/111344 The first 2 commit are cleanups to avoid repeated work. I propose to stop removing useless assignments as part of this pass, and let a later `SimplifyLocals` do it. This makes tests easier to read (among others). The next 3 commits add a constant folding mechanism to the GVN pass, presented in https://github.com/rust-lang/rust/pull/116012. ~This pass is designed to only use global allocations, to avoid any risk of accidental modification of the stored state.~ The following commits implement opportunistic simplifications, in particular: - projections of aggregates: `MyStruct { x: a }.x` gets replaced by `a`, works with enums too; - projections of arrays: `[a, b][0]` becomes `a`; - projections of repeat expressions: `[a; N][x]` becomes `a`; - transform arrays of equal operands into a repeat rvalue. Fixes https://github.com/rust-lang/miri/issues/3090 r? `@oli-obk`
2023-10-29handle dry runs in `dist::CodegenBackend`Rémy Rakic-0/+4
self.number_of_times_dry_runs_have_caused_issues += 1;
2023-10-29Add support for mipsel-unknown-netbsd, 32-bit LE mips.Havard Eidnes-0/+7
2023-10-29Rollup merge of #117337 - camelid:genparamdefkind-thinvec, r=GuillaumeGomezGuillaume Gomez-11/+11
rustdoc: Use `ThinVec` in `GenericParamDefKind` This should hopefully reduce memory usage and improve performance since these vectors are often empty (and `GenericParamDefKind` is constructed *a lot*).
2023-10-29Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-SimulacrumGuillaume Gomez-17/+66
add bootstrap flag `--skip-stage0-validation` This change introduces the `--skip-stage0-validation` flag, which permits the use of any desired version of the stage0 compiler without verifying its version. Additionally, stage0 compiler validation check is reverted(#115103) to its default enabled state. Helps to #115065 r? Mark-Simulacrum
2023-10-29rustdoc: Use `ThinVec` in `GenericParamDefKind`Noah Lev-11/+11
This should hopefully reduce memory usage and improve performance since these vectors are often empty (and `GenericParamDefKind` is constructed *a lot*).
2023-10-29Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubileebors-2/+7
Rollup of 4 pull requests Successful merges: - #117170 (Add support for i586-unknown-netbsd as target.) - #117259 (Declare rustc_target's dependency on object/macho) - #117322 (change default output mode of `BootstrapCommand`) - #117325 (Small ty::print cleanups) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-29Auto merge of #117335 - workingjubilee:rollup-jsomm41, r=workingjubileebors-1/+4
Rollup of 5 pull requests Successful merges: - #115773 (tvOS simulator support on Apple Silicon for rustc) - #117162 (Remove `cfg_match` from the prelude) - #117311 (-Zunpretty help: add missing possible values) - #117316 (Mark constructor of `BinaryHeap` as const fn) - #117319 (explain why we don't inline when target features differ) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-28Rollup merge of #117322 - onur-ozkan:fix-suppressed-outputs, r=KobzolJubilee-2/+6
change default output mode of `BootstrapCommand` `SuppressOnSuccess` on `BootstrapCommand` is a problematic default mode as it affects the logs during the bootstrapping (as shown in the screenshot below). The default behavior should be to print everything unless we explicitly modify the behavior within build steps. ![image](https://github.com/rust-lang/rust/assets/39852038/8dbaaeb2-0656-4ff9-8e48-1ac0734a913f) Fixes #117315 cc `@Kobzol`
2023-10-28Rollup merge of #117170 - he32:netbsd-i586, r=bjorn3Jubilee-0/+1
Add support for i586-unknown-netbsd as target. This restricts instructions to those offered by Pentium, to support e.g. AMD Geode. There is already an entry for this target in the NetBSD platform support page at src/doc/rustc/src/platform-support/netbsd.md ...so this should forestall its removal. Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.