summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #75539 - ehuss:fix-crate-version-rustdoc-bootstrap, ↵HEADmasterbors3 hours3-11/+7
|\ | | | | | | | | | | | | | | | | | | r=Mark-Simulacrum Fix crate-version with rustdoc in bootstrap. Cargo will now automatically use the `--crate-version` flag (see https://github.com/rust-lang/cargo/pull/8509). Cargo has special handling to avoid passing the flag if it is passed in via RUSTDOCFLAGS, but the `rustdoc` wrapper circumvents that check. This causes a problem because rustdoc will fail if the flag is passed in twice. Fix this by using RUSTDOCFLAGS. This will be necessary when 1.47 is promoted to beta, but should be safe to do now.
| * Deal with spaces in the rust version.Eric Huss7 hours1-3/+7
| |
| * Fix crate-version with rustdoc in bootstrap.Eric Huss13 hours3-9/+1
| |
* | Auto merge of #75488 - ssomers:btree_revert_75257, r=Mark-Simulacrumbors5 hours1-49/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | Revert the fundamental changes in #74762 and #75257 Before possibly going over to #75487. Also contains some added and fixed comments. r? @Mark-Simulacrum
| * | Reverts the fundamental changes in #74762 and #75257Stein Somers44 hours1-49/+20
| | |
* | | Auto merge of #75549 - tmandry:rollup-sxjwa0w, r=tmandrybors7 hours89-271/+281
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rollup of 4 pull requests Successful merges: - #75376 (Set CMAKE_SYSTEM_NAME when cross-compiling) - #75448 (merge `as_local_hir_id` with `local_def_id_to_hir_id`) - #75513 (Recover gracefully from `struct` parse errors) - #75545 (std/sys/unix/time: make it easier for LLVM to optimize `Instant` subtraction.) Failed merges: - #75514 (Replaced `log` with `tracing`) r? @ghost
| * \ \ Rollup merge of #75545 - eddyb:instant-sub-branchless, r=sfacklerTyler Mandry7 hours1-8/+20
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std/sys/unix/time: make it easier for LLVM to optimize `Instant` subtraction. This PR is the minimal change necessary to get LLVM to optimize `if self.t.tv_nsec >= other.t.tv_nsec` to branchless instructions (at least on x86_64), inspired by @m-ou-se's own attempts at optimizing `Instant` subtraction. I stumbled over this by looking at the total number of instructions executed by `rustc -Z self-profile`, and found that after disabling ASLR, the largest source of non-determinism remaining was from this `if` taking one branch or the other, depending on the values involved. The reason this code is even called so many times to make a difference, is that `measureme` (the `-Z self-profile` implementation) currently uses `Instant::elapsed` for its event timestamps (of which there can be millions). I doubt it's critical to land this, although perhaps it could slightly improve some forms of benchmarking.
| | * | | std/sys/unix/time: make it easier for LLVM to optimize `Instant` subtraction.Eduard-Mihai Burtescu9 hours1-8/+20
| | | |/ | | |/|
| * | | Rollup merge of #75513 - estebank:confused-parser, r=davidtwcoTyler Mandry7 hours5-18/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recover gracefully from `struct` parse errors Currently the parser tries to recover from finding a keyword where a field name was expected, but this causes extra knock down parse errors that are completely irrelevant. Instead, bail out early in the parsing of the field and consume the remaining tokens in the block. This can reduce output significantly. _Improvements based on the narrative in https://fasterthanli.me/articles/i-am-a-java-csharp-c-or-cplusplus-dev-time-to-do-some-rust_
| | * | | Recover gracefully from `struct ` parse errorsEsteban Küber30 hours5-18/+4
| | | | |
| * | | | Rollup merge of #75448 - lcnr:rn-as_local_hir_id, r=davidtwcoTyler Mandry7 hours82-237/+241
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge `as_local_hir_id` with `local_def_id_to_hir_id` `as_local_hir_id` was defined as just calling `local_def_id_to_hir_id` and I think that having two different ways to call the same method is somewhat confusing. Don't really care about which of these 2 methods we want to keep. Does this require an MCP, considering that these methods are fairly frequently used?
| | * | | | merge `as_local_hir_id` with `local_def_id_to_hir_id`Bastian Kauschke44 hours82-237/+241
| | | | | |
| * | | | | Rollup merge of #75376 - tmiasko:cmake-system-name, r=Mark-SimulacrumTyler Mandry7 hours1-8/+16
| |\ \ \ \ \ |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set CMAKE_SYSTEM_NAME when cross-compiling Configure CMAKE_SYSTEM_NAME when cross-compiling in `configure_cmake`, to tell CMake about target system. Previously this was done only for LLVM step and now applies more generally to steps using cmake. Helps with #74576.
| * | | | | Set CMAKE_SYSTEM_NAME when cross-compilingTomasz Miąsko46 hours1-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure CMAKE_SYSTEM_NAME when cross-compiling in `configure_cmake`, to tell CMake about target system. Previously this was done only for LLVM step and now applies more generally to steps using cmake.
* | | | | | Auto merge of #73851 - matthewjasper:serialize-not-special, r=oli-obkbors10 hours137-2343/+2149
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most specialization use in serialization Switching from specialization to min_specialization in the compiler made the unsoundness of how we used these traits pretty clear. This changes how the `Encodable` and `Decodable` traits work to be more friendly for types need a `TyCtxt` to deserialize. The alternative design of having both `Encodable` and `TyEncodable` traits was considered, but doesn't really work because the following impls would conflict: ``` impl<E: Ecodable> TyEncodable for Encodable impl<E: TyEcodable> TyEncodable for [E] ``` ## How-to guide - `Rustc(De|En)codable` is now spelled `Ty(De|En)coable` in `rustc_middle`, `Metadata(En|De)codable` in `rustc_metadata` where needed, and `(De|En)codable` everywhere else. - Manual implementations of `(De|En)codable` shouldn't be much different. - If you're adding a new interned type that needs to be en/decodable then the simplest thing way to handle this is: - Have the type be a wrapper around a reference to the interned data (i.e. do what `ty::Predicate` does, and not what all of the other interned types do) - Derive `Ty(En|De)codable` on the inner type - Implement `Encodable<impl TyEncoder>` by forwarding to the inner type. - Implement `Decodable<impl TyDecoder>` by decoding the inner type and then creating the wrapper around that (using the `tcx` from the decoder as needed). cc @rust-lang/compiler for opinions on this change r? @oli-obk
| * | | | | | Fix rustc_serialize unit testsMatthew Jasper18 hours5-23/+34
| | | | | | |
| * | | | | | Fix rustc_ast unit testMatthew Jasper18 hours1-1/+4
| | | | | | |
| * | | | | | Fix run-make testMatthew Jasper18 hours1-56/+60
| | | | | | |
| * | | | | | Fix ui fulldeps testsMatthew Jasper18 hours12-88/+75
| | | | | | |
| * | | | | | Fix tests and address review commentsMatthew Jasper18 hours8-202/+47
| | | | | | |
| * | | | | | Add some documentation for (De|En)codableMatthew Jasper18 hours2-0/+33
| | | | | | |
| * | | | | | Simplify arena_types macrosMatthew Jasper18 hours4-112/+65
| | | | | | |
| * | | | | | Rework `rustc_serialize`Matthew Jasper18 hours116-1937/+1907
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the type parameter from `encode` and `decode` methods to the trait. - Remove `UseSpecialized(En|De)codable` traits. - Remove blanket impls for references. - Add `RefDecodable` trait to allow deserializing to arena-allocated references safely. - Remove ability to (de)serialize HIR. - Create proc-macros `(Ty)?(En|De)codable` to help implement these new traits.
* | | | | | | Auto merge of #75538 - tmandry:rollup-i8miv8q, r=tmandrybors12 hours49-567/+725
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rollup of 17 pull requests Successful merges: - #73943 (Document the unsafe keyword) - #74062 (deny(unsafe_op_in_unsafe_fn) in libstd/ffi/c_str.rs) - #74185 (Remove liballoc unneeded explicit link) - #74192 (Improve documentation on process::Child.std* fields) - #74409 (Change Debug impl of SocketAddr and IpAddr to match their Display output) - #75195 (BTreeMap: purge innocent use of into_kv_mut) - #75214 (Use intra-doc links in `mem::manually_drop` & `mem::maybe_uninit`) - #75432 (Switch to intra-doc links in `std::process`) - #75482 (Clean up E0752 explanation) - #75501 (Move to intra doc links in std::ffi) - #75509 (Tweak suggestion for `this` -> `self`) - #75511 (Do not emit E0228 when it is implied by E0106) - #75515 (Bump std's libc version to 0.2.74) - #75517 (Promotion and const interning comments) - #75519 (BTreeMap: refactor splitpoint and move testing over to unit test) - #75530 (Switch to intra-doc links in os/raw/*.md) - #75531 (Migrate unit tests of btree collections to their native breeding ground) Failed merges: r? @ghost
| * | | | | | Rollup merge of #75531 - ssomers:btree_tests_migration, r=Mark-SimulacrumTyler Mandry13 hours9-56/+68
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate unit tests of btree collections to their native breeding ground There's one BTreeSet test case that I couldn't easily convince to come along, maybe because it truly is an integration test. But leaving it in place would mean git wouldn't see the move so I also moved it to a new file. r? @Mark-Simulacrum
| | * | | | | | Move btree unit test to their native, privileged locationStein Somers19 hours9-56/+68
| | | | | | | |
| | * | | | | | BTreeMap: refactor splitpoint and move testing over to unit testStein Somers20 hours3-31/+37
| | | | | | | |
| * | | | | | | Rollup merge of #75530 - nixphix:docs/os-raw, r=jyn514Tyler Mandry13 hours13-33/+13
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to intra-doc links in os/raw/*.md Partial fix for #75080 @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc r? @jyn514
| | * | | | | | | remove primitive type linksPrabakaran Kumaresshan18 hours13-20/+0
| | | | | | | | |
| | * | | | | | | Switch to intra-doc links in os/raw/*.mdPrabakaran Kumaresshan19 hours13-33/+33
| | | | | | | | |
| * | | | | | | | Rollup merge of #75519 - ssomers:btree_splitpoint_cleanup, r=Mark-SimulacrumTyler Mandry13 hours3-31/+37
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BTreeMap: refactor splitpoint and move testing over to unit test r? @Mark-Simulacrum
| | * | | | | | | | BTreeMap: refactor splitpoint and move testing over to unit testStein Somers22 hours3-31/+37
| | | | | | | | | |
| * | | | | | | | | Rollup merge of #75517 - RalfJung:promo-intern-comments, r=oli-obkTyler Mandry13 hours3-2/+9
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Promotion and const interning comments I understood some things today which I felt should be put into comments. Cc @rust-lang/wg-const-eval
| | * | | | | | | | | add a FIXME concerning interning of promotedsRalf Jung23 hours1-0/+6
| | | | | | | | | | |
| | * | | | | | | | | answer an old question re: intern kindsRalf Jung25 hours1-1/+2
| | | | | | | | | | |
| | * | | | | | | | | mention 'lifetime extension' in promotion doc commentsRalf Jung25 hours1-1/+1
| | | | | | | | | | |
| * | | | | | | | | | Rollup merge of #75515 - workingjubilee:patch-4, r=Mark-SimulacrumTyler Mandry13 hours1-1/+1
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump std's libc version to 0.2.74 It's been a while and this should really be using a recent version, that's all. :sparkling_heart:
| | * | | | | | | | | | Bump std's libc version to 0.2.74Jubilee27 hours1-1/+1
| | |/ / / / / / / / /
| * | | | | | | | | | Rollup merge of #75511 - estebank:elide-trait-object-lt-error, r=lcnrTyler Mandry13 hours3-67/+37
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not emit E0228 when it is implied by E0106 Emit E0288 (lifetime bound for trait object cannot be deduced) only on bare trait objects. When the trait object is in the form of `&dyn Trait`, E0106 (missing lifetime specifier) will have been emitted, making the former redundant.
| | * | | | | | | | | | Do not emit E0228 when it is implied by E0106Esteban Küber33 hours3-67/+37
| | | |_|_|_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emit E0288 (lifetime bound for trait object cannot be deduced) only on bare trait objects. When the trait object is in the form of `&dyn Trait`, E0106 (missing lifetime specifier) will have been emitted, making the former redundant.
| * | | | | | | | | | Rollup merge of #75509 - estebank:coming-merrily-from-java-land, r=lcnrTyler Mandry13 hours7-35/+148
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tweak suggestion for `this` -> `self` * When referring to `this` in associated `fn`s always suggest `self`. * Point at ident for `fn` lacking `self` * Suggest adding `self` to assoc `fn`s when appropriate _Improvements based on the narrative in https://fasterthanli.me/articles/i-am-a-java-csharp-c-or-cplusplus-dev-time-to-do-some-rust_
| | * | | | | | | | | | review comment: suggestion message wordingEsteban Küber17 hours2-3/+4
| | | | | | | | | | | |
| | * | | | | | | | | | Suggest adding `&self` when accessing `self` in static assoc `fn`Esteban Küber34 hours5-41/+98
| | | | | | | | | | | |
| | * | | | | | | | | | Tweak suggestion for `this` -> `self`Esteban Küber35 hours3-8/+63
| | |/ / / / / / / / /
| * | | | | | | | | | Rollup merge of #75501 - poliorcetics:intra-links-std-ffi, r=jyn514Tyler Mandry13 hours3-233/+81
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to intra doc links in std::ffi Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
| | * | | | | | | | | | Apply suggestions from code reviewPoliorcetics17 hours1-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Joshua Nelson <joshua@yottadb.com>
| | * | | | | | | | | | Move to intra doc links in std::ffiAlexis Bourget37 hours3-233/+81
| | | | | | | | | | | |
| * | | | | | | | | | | Rollup merge of #75482 - GuillaumeGomez:cleanup-e0752, r=pickfireTyler Mandry13 hours1-5/+13
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up E0752 explanation r? @Dylan-DPC cc @pickfire
| | * | | | | | | | | | | Fix code examplesGuillaume Gomez39 hours1-4/+4
| | | | | | | | | | | | |
| | * | | | | | | | | | | Improve wordingGuillaume Gomez40 hours1-3/+3
| | | | | | | | | | | | |