- 16 12月, 2021 9 次提交
-
-
由 Matthias Krüger 提交于
Apply rust-logo class only on default logo Fixes #91653. ![image](https://user-images.githubusercontent.com/220205/146138145-a7a62ea6-3205-4bc7-8460-e985284d93ea.png) Demo: https://rustdoc.crud.net/jsha/hashes/sha2/ r? ``@GuillaumeGomez``
-
由 Matthias Krüger 提交于
update stdarch 2 commits in d219ad63c5075098fc224a57deb4852b9734327d..0716b22e902207efabe46879cbf28d0189ab7924 2021-12-9 23:50:37 +0000 to 2021-12-14 16:17:57 +0100 * Fix a bunch of typos ([Fix a bunch of typos stdarch#1267](https://github.com/rust-lang/stdarch/pull/1267)) * Stabilize armv8 neon instruction set on aarch64 ([Stabilize armv8 neon instruction set on aarch64 stdarch#1266](https://github.com/rust-lang/stdarch/pull/1266)) The update stabilizes armv8 neon instructions on aarch64. #90972
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_trait_selection` Another one for #91867
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_symbol_mangling` Helping out with #91867
-
由 bors 提交于
Include rustc version in `rustc_span::StableCrateId` `rustc_span::def_id::StableCrateId` is a hash of various data about a crate during compilation. This PR includes the version of `rustc` in the input when computing this hash. From a cursory reading of [RFC 2603](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html), this appears to be acceptable within that design. In order to pass the `mir-opt` and `ui` test suites, this adds new [normalization for hashes and symbol names in `compiletest`](https://github.com/rust-lang/rust/pull/89836/files#diff-03a0567fa80ca04ed5a55f9ac5c711b4f84659be2d0ac4a984196d581c04f76b). These are enabled by default, but we might prefer it to be configurable. In the UI tests, I had to truncate a significant amount of error annotations in v0 symbols (and maybe some legacy) in order to get the normalization to work correctly. (See https://github.com/rust-lang/rust/issues/90116.) Closes #85142.
-
由 bors 提交于
extend `simplify_type` might cause a slight perf inprovement and imo more accurately represents what types there are. considering that I was going to use this in #85048 it seems like we might need this in the future anyways
🤷 -
由 Sylvan Bowdler 提交于
-
由 Sylvan Bowdler 提交于
-
由 Jacob Hoffman-Andrews 提交于
Also replace ' with " in rustdoc template
-
- 15 12月, 2021 31 次提交
-
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #91880 (fix clippy::single_char_pattern perf findings) - #91885 (Remove `in_band_lifetimes` from `rustc_codegen_ssa`) - #91898 (Make `TyS::is_suggestable` check for non-suggestable types structually) - #91915 (Add another regression test for unnormalized fn args with Self) - #91916 (Fix a bunch of typos) - #91918 (Constify `bool::then{,_some}`) - #91920 (Use `tcx.def_path_hash` in `ExistentialPredicate.stable_cmp`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
Use `tcx.def_path_hash` in `ExistentialPredicate.stable_cmp` This avoids a needless query invocation
-
由 Matthias Krüger 提交于
Constify `bool::then{,_some}` Note on `~const Drop`: it has no effect when called from runtime functions, when called from const contexts, the trait system ensures that the type can be dropped in const contexts.
-
由 Matthias Krüger 提交于
Fix a bunch of typos I hope that none of these files is not supposed to be modified. FYI, I opened separate PRs for typos in submodules, in the respective repositories * https://github.com/rust-lang/stdarch/pull/1267 * https://github.com/rust-lang/backtrace-rs/pull/455
-
由 Matthias Krüger 提交于
Add another regression test for unnormalized fn args with Self Closes #91899
-
由 Matthias Krüger 提交于
Make `TyS::is_suggestable` check for non-suggestable types structually Not sure if I went overboard checking substs in dyn types, etc. Let me know if I should simplify this function. Fixes #91832
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_codegen_ssa` See #91867 for more information. In `compiler/rustc_codegen_ssa/src/coverageinfo/map.rs`, there are several functions with an explicit `'a` lifetime but only a single `&'a self` parameter. These lifetimes should be redundant given lifetime elision, unless the existential `impl Iterator` has weird issues regarding that. Should the redundant lifetimes be removed?
-
由 Matthias Krüger 提交于
fix clippy::single_char_pattern perf findings
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #90521 (Stabilize `destructuring_assignment`) - #91479 (Add `[T]::as_simd(_mut)`) - #91584 (Improve code for rustdoc-gui tester) - #91886 (core: minor `Option` doc correction) - #91888 (Handle unordered const/ty generics for object lifetime defaults) - #91905 (Fix source code page sidebar on mobile) - #91906 (Removed `in_band_lifetimes` from `library\proc_macro`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 lcnr 提交于
-
由 Matthias Krüger 提交于
Removed `in_band_lifetimes` from `library\proc_macro` Issue [#91867](https://github.com/rust-lang/rust/issues/91867) This is my first try, I followed the instructions given. Fixed all the errors that were thrown while compiling. Compiled with stage 0,1, and 2 all of them compiled successfully.
-
由 Matthias Krüger 提交于
Fix source code page sidebar on mobile Current broken behaviour: https://user-images.githubusercontent.com/3050060/145984316-35c82353-5bab-4dc6-9ac6-63ea7e5c27d8.mp4 Fixed: https://user-images.githubusercontent.com/3050060/145984329-8be1127b-d707-424d-ac3c-c1fb3c48a093.mp4 r? `@jsha`
-
由 Matthias Krüger 提交于
Handle unordered const/ty generics for object lifetime defaults *feel like I should have a PR description but cant think of what to put here* r? ```@lcnr```
-
由 Matthias Krüger 提交于
core: minor `Option` doc correction
-
由 Matthias Krüger 提交于
Improve code for rustdoc-gui tester Following advice given in #91391. It nicely improves the code readability. :) r? `@jsha`
-
由 Matthias Krüger 提交于
Add `[T]::as_simd(_mut)` SIMD-style optimizations are the most common use for `[T]::align_to(_mut)`, but that's `unsafe`. So these are *safe* wrappers around it, now that we have the `Simd` type available, to make it easier to use. ```rust impl [T] { pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T]); pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T]); } ``` They're `cfg`'d out for miri because the `simd` module as a whole is unavailable there.
-
由 Matthias Krüger 提交于
Stabilize `destructuring_assignment` Closes #71126 - [Stabilization report](https://github.com/rust-lang/rust/issues/71126#issuecomment-941148058) - [Completed FCP](https://github.com/rust-lang/rust/issues/71126#issuecomment-954914819) `@rustbot` label +F-destructuring-assignment +T-lang Also needs +relnotes but I don't have permission to add that tag.
-
由 bors 提交于
Readd track_caller to Result::from_residual This is a followup on https://github.com/rust-lang/rust/issues/87401 in and an attempt to move the issue towards resolution. As part of the overhaul of the Try trait we removed the ability for errors to grab location information during propagation via `?` with the builtin `std::result::Result`. The previously linked issue has a fair bit of discussion into the reasons for and against the usage of `#[track_caller]` on the `FromResidual` impl on `Result` that I will do my best to summarize. --- ### For - https://github.com/rust-lang/rust/issues/87401#issuecomment-915053533: Difficulties with using non `std::result::Result` like types - https://github.com/rust-lang/rust/issues/87401#issuecomment-978355102: Inconsistency with functionality provided for recoverable (Result) and non-recoverable errors (panic), where panic provides a location and Result does not, pushing some users towards using panic ### Against - https://github.com/rust-lang/rust/issues/84277#issuecomment-885322833: concern that this will bloat callers that never use this data --- Personally, I want to quantify the performance / bloat impact of re-adding this attribute, and fully evaluate the pros and cons before deciding if I need to switch `eyre` to have a custom `Result` type, which would also mean I need `try_trait_v2` to be stabilized, cc `@scottmcm.` If the performance impact is minor enough in the general case I think I would prefer that the default `Result` type has the ability to track location information for consistency with `panic` error reporting, and leave it to applications that need particularly high performance to handle the micro optimizations of introducing their own efficient custom Result type or matching manually. Alternatively, I wonder if the performance penalty on code that doesn't use the location information on `FromResidual` could be mitigated via new optimizations.
-
由 LegionMammal978 提交于
See #91867 for more information.
-
由 Jacob Pratt 提交于
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #90939 (Tweak errors coming from `for`-loop, `?` and `.await` desugaring) - #91859 (Iterator::cycle() — document empty iterator special case) - #91868 (Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`) - #91870 (Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking) - #91881 (Stabilize `iter::zip`) - #91882 (Remove `in_band_lifetimes` from `rustc_typeck`) - #91940 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 SparrowLii 提交于
-
由 Matthias Krüger 提交于
Update cargo 14 commits in 40dc281755137ee804bc9b3b08e782773b726e44..a359ce16073401f28b84840da85b268aa3d37c88 2021-12-06 21:54:44 +0000 to 2021-12-14 18:40:22 +0000 - Support `term.quiet` configuration (rust-lang/cargo#10152) - Display alias target on 'cargo help <alias>` (rust-lang/cargo#10193) - delete --host command and message (rust-lang/cargo#10145) - Improve I/O error message for fingerprint of build script (rust-lang/cargo#10191) - Explicitly mark aliases in `cargo list`. (rust-lang/cargo#10177) - Don't emit "executable" JSON field for non-executables. (rust-lang/cargo#10171) - Move scrape-examples docs to correct section. (rust-lang/cargo#10166) - Do not suggest source config if nothing to vendor (rust-lang/cargo#10161) - Bump versions of local deps. (rust-lang/cargo#10155) - Bump to 0.60.0, update changelog (rust-lang/cargo#10154) - Fix some profile documentation. (rust-lang/cargo#10153) - Document lib before bin. (rust-lang/cargo#10172) - Sync cargo-the-cli version with rustc. (rust-lang/cargo#10178) - Remove `-Z future-incompat-report` from message displayed to user (rust-lang/cargo#10185)
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_typeck` Joining in on the effort to remove the `in_band_lifetimes` features, as described in issue #91867.
-
由 Matthias Krüger 提交于
Stabilize `iter::zip` Hello all! As the tracking issue (#83574) for `iter::zip` completed the final commenting period without any concerns being raised, I hereby submit this stabilization PR on the issue. As the pull request that introduced the feature (#82917) states, the `iter::zip` function is a shorter way to zip two iterators. As it's generally a quality-of-life/ergonomic improvement, it has been integrated into the codebase without any trouble, and has been used in many places across the rust compiler and standard library since March without any issues. For more details, I would refer to `@cuviper's` original PR, or the [function's documentation](https://doc.rust-lang.org/std/iter/fn.zip.html).
-
由 Matthias Krüger 提交于
Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking This reverts commit b376f562, which is the main part of #90499, because it turns out that this causes a good amount of breakage in crates relying on the old behavior. In particular `winit`, `coreaudio` and crates that depend on them are affected. Fixes #91372. Background: Before #90499 the behavior was the following: If MACOSX_DEPLOYMENT_TARGET is not set, we pass the minimum supported OS version to LLVM but not to the linker. The linker default depends on the Xcode version and the version of the OS it is running on. That caused one known problem in libcurl with the most recent Xcode versions. #90499 passed the minumum supported version (10.7 for Macos x86-64) to the linker instead. This has shown to be problematic because some crates such as winit, coreaudio implicitly expect a newer minimum OS version. The libcurl issue has been fixed independently (see https://github.com/alexcrichton/curl-rust/issues/417), so a revert should not really be problematic. Eventually we should probably mimic clang's behavior and fall back to the default of the currently configured Macos SDK for both the LLVM min os target version and MACOSX_DEPLOYMENT_TARGET for linking. That would entail looking at the `Version` property of the `SDKSettings.json` in the currently configured SDK.
-
由 Matthias Krüger 提交于
Use `OutputFilenames` to generate output file for `-Zllvm-time-trace` The resulting profile will include the crate name and will be stored in the `--out-dir` directory. This implementation makes it convenient to use LLVM time trace together with cargo, in the contrast to the previous implementation which would overwrite profiles or store them in `.cargo/registry/..`.
-
由 Matthias Krüger 提交于
Iterator::cycle() — document empty iterator special case
-
由 Matthias Krüger 提交于
Tweak errors coming from `for`-loop, `?` and `.await` desugaring * Suggest removal of `.await` on non-`Future` expression * Keep track of obligations introduced by desugaring * Remove span pointing at method for obligation errors coming from desugaring * Point at called local sync `fn` and suggest making it `async` ``` error[E0277]: `()` is not a future --> $DIR/unnecessary-await.rs:9:10 | LL | boo().await; | -----^^^^^^ `()` is not a future | | | this call returns `()` | = help: the trait `Future` is not implemented for `()` help: do not `.await` the expression | LL - boo().await; LL + boo(); | help: alternatively, consider making `fn boo` asynchronous | LL | async fn boo () {} | +++++ ``` Fix #66731.
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #89825 (Make split_inclusive() on an empty slice yield an empty output) - #91239 (regression test for issue 87490) - #91597 (Recover on invalid operators `<>` and `<=>`) - #91774 (Fix typo for MutVisitor) - #91786 (Return an error when `eval_rvalue_with_identities` fails) - #91798 (Avoid suggest adding `self` in visibility spec) - #91856 (Looser check for overflowing_binary_op) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Scott McMurray 提交于
-