- 19 12月, 2021 11 次提交
-
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #91834 (Update browser-ui-test version and improve rustdoc-gui tests readability) - #91894 (Remove `in_band_lifetimes` from `rustc_incremental`) - #91932 (Add user seed to `-Z randomize-layout`) - #91956 (fix(rustc_lint): better detect when parens are necessary) - #92020 (Remove P: Unpin bound on impl Stream for Pin) - #92063 (docs: fix typo) - #92082 (rustdoc: Write doc-comments directly instead of using FromIterator) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
rustdoc: Write doc-comments directly instead of using FromIterator The FromIterator impl made the code much harder to understand. The types don't make sense until you realize there's a custom FromIterator impl. This is the first commit from https://github.com/rust-lang/rust/pull/91305; since ``@camelid`` wrote it originally I don't feel bad unilaterally approving it. r? ``@ghost`` ``@bors`` r+ Note that this will conflict with https://github.com/rust-lang/rust/pull/92078.
-
由 Matthias Krüger 提交于
docs: fix typo Add missing `'s` to ` Let check it out.`
-
由 Matthias Krüger 提交于
Remove P: Unpin bound on impl Stream for Pin Similar to https://github.com/rust-lang/rust/pull/81363.
-
由 Matthias Krüger 提交于
fix(rustc_lint): better detect when parens are necessary Fixes #90807
-
由 Matthias Krüger 提交于
Add user seed to `-Z randomize-layout` Allows users of -`Z randomize-layout` to provide `-Z layout-seed=<seed>` in order to further randomizing type layout randomization. Extension of [compiler-team/#457](https://github.com/rust-lang/compiler-team/issues/457), allows users to change struct layouts without changing code and hoping that item path hashes change, aiding in detecting layout errors
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_incremental` #91867
-
由 Matthias Krüger 提交于
Update browser-ui-test version and improve rustdoc-gui tests readability Since the `0.5.1`, we can use trailing commas. I also used the opportunity to clean up the existing tests. r? `@notriddle`
-
由 bors 提交于
Avoid sorting in hash map stable hashing Suggested by `@the8472` [here](https://github.com/rust-lang/rust/pull/89404#issuecomment-991813333). I hope that I understood it right, I replaced the sort with modular multiplication, which should be commutative. Can I ask for a perf. run? However, locally it didn't help at all. Creating the `StableHasher` all over again is probably slowing it down quite a lot. And using `FxHasher` is not straightforward, because the keys and values only implement `HashStable` (and probably they shouldn't be just hashed via `Hash` anyway for it to actually be stable). Maybe the `StableHash` interface could be changed somehow to better suppor these scenarios where the hasher is short-lived. Or the `StableHasher` implementation could have variants with e.g. a shorter buffer for these scenarios.
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #91566 (Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF) - #91926 (Remove `in_band_lifetimes` from `rustc_metadata`) - #91931 (Remove `in_band_lifetimes` from `rustc_codegen_llvm`) - #92024 (rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all platforms, not just Apple ones.) - #92037 (Use a const ParamEnv when in default_method_body_is_const) - #92047 (Set `RUST_BACKTRACE=0` when running location-detail tests) - #92050 (Add a space and 2 grave accents ) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Noah Lev 提交于
The FromIterator impl made the code much harder to understand. The types don't make sense until you realize there's a custom FromIterator impl.
-
- 18 12月, 2021 29 次提交
-
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #91858 (pass -Wl,-z,origin to set DF_ORIGIN when using rpath) - #91923 (Remove `in_band_lifetimes` from `rustc_query_impl`) - #91925 (Remove `in_band_lifetimes` from `rustc_privacy`) - #91977 (Clean up search code and unify function returned values) - #92018 (Fix typo in "new region bound" suggestion) - #92022 (Eliminate duplicate codes of expected_found_bool) - #92032 (hir: Do not introduce dummy type names for `extern` blocks in def paths) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
Add a space and 2 grave accents I only noticed this because I have this implementation copy pasted in some places in my code and I really can't wait for this to be stabilized...
-
由 Matthias Krüger 提交于
Set `RUST_BACKTRACE=0` when running location-detail tests This ensures that the output does not depend on environment variables set in the shell.
-
由 Matthias Krüger 提交于
Use a const ParamEnv when in default_method_body_is_const r? `@oli-obk` This PR fixes the param_env function to return `constness: Const` correctly for trait methods marked with `#[default_method_body_is_const]`. The snippet below is erroneously accepted by the compiler and has been fixed by this change. ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=12dc6681b2eeee5f604203d96259eeb4)) ```rust #![feature(const_fn_trait_bound)] #![feature(const_trait_impl)] trait Tr {} impl Tr for () {} const fn foo<T>() where T: ~const Tr {} pub trait Foo { #[default_method_body_is_const] fn foo() { foo::<()>(); } } ```
-
由 Matthias Krüger 提交于
rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all platforms, not just Apple ones. To avoid breaking split DWARF, we need to ensure that each codegen unit has a unique `DW_AT_name`. This is because there's a remote chance that different codegen units for the same module will have entirely identical DWARF entries for the purpose of the DWO ID, which would violate Appendix F ("Split Dwarf Object Files") of the DWARF 5 specification. LLVM uses the algorithm specified in section 7.32 "Type Signature Computation" to compute the DWO ID, which does not include any fields that would distinguish compilation units. So we must embed the codegen unit name into the `DW_AT_name`. Closes #88521.
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_codegen_llvm` See #91867 for more information. This one took a while. This crate has dozens of functions not associated with any type, and most of them were using in-band lifetimes for `'ll` and `'tcx`.
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_metadata` Another for #91867
-
由 Matthias Krüger 提交于
Apply path remapping to DW_AT_GNU_dwo_name when producing split DWARF `--remap-path-prefix` doesn't apply to paths to `.o` (in case of packed) or `.dwo` (in case of unpacked) files in `DW_AT_GNU_dwo_name`. GCC also has this bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91888
-
由 Matthias Krüger 提交于
hir: Do not introduce dummy type names for `extern` blocks in def paths Use a separate nameless `DefPathData` variant instead. Extracted from https://github.com/rust-lang/rust/pull/91795.
-
由 Matthias Krüger 提交于
Eliminate duplicate codes of expected_found_bool The function expected_found_bool is the same as ExpectedFound::new. So use ExpectedFound::new to replace expected_found_bool to eliminate duplicate codes. ![image](https://user-images.githubusercontent.com/95843988/146486722-c910eccd-a36c-4dc5-8b36-214aab058e38.png)
-
由 Matthias Krüger 提交于
Fix typo in "new region bound" suggestion The lifetime name shoud always appear in text surrounded by `.
-
由 Matthias Krüger 提交于
Clean up search code and unify function returned values This PR is a cleanup: there is no changes in the search results or in the UI. Depending if it was "literal search" or not, it was either returning booleans or integers. It's pretty bad so instead it all returns integers. Another thing I did was to move the add and checks into a `addIntoResults` function to simplify things. Last thing: I removed a loop in the `sortResults` function and moved its code directly into the first loop. All these changes are done to make #90630 much smaller. r? `@jsha`
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_privacy` See #91867 for more information.
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_query_impl` See #91867 for more information.
-
由 Matthias Krüger 提交于
pass -Wl,-z,origin to set DF_ORIGIN when using rpath DF_ORIGIN flag signifies that the object being loaded may make reference to the $ORIGIN substitution string. Some implementations are just ignoring [DF_ORIGIN](http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#df_flags) and do [substitution](http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#substitution) for $ORIGIN if present (whatever DF_ORIGIN presence or not) like glibc. But some others mandate the present of DF_ORIGIN for the substitution (like OpenBSD). Set the flag inconditionally if rpath is wanted. One possible fallout is if the linker rejects `-z origin` option.
-
由 Szilárd Parrag 提交于
Add missing `'s` to ` Let check it out.`
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #91439 (Mark defaulted `PartialEq`/`PartialOrd` methods as const) - #91516 (Improve suggestion to change struct field to &mut) - #91896 (Remove `in_band_lifetimes` for `rustc_passes`) - #91909 (
⬆ rust-analyzer) - #91922 (Remove `in_band_lifetimes` from `rustc_mir_dataflow`) - #92025 (Revert "socket ancillary data implementation for dragonflybsd.") - #92030 (Update stdlib to the 2021 edition) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup -
由 Matthias Krüger 提交于
Update stdlib to the 2021 edition progress towards https://github.com/rust-lang/rust/issues/88638 I couldnt find a way to run the 2018 style panic tests against 2018 so I just deleted them, maybe theres a way to do it that I missed though?
-
由 Matthias Krüger 提交于
Revert "socket ancillary data implementation for dragonflybsd." Reverts rust-lang/rust#91553
-
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` from `rustc_mir_dataflow` See #91867 for more information.
-
由 Matthias Krüger 提交于
⬆ rust-analyzer r? ```@ghost``` -
由 Matthias Krüger 提交于
Remove `in_band_lifetimes` for `rustc_passes` #91867
-
由 Matthias Krüger 提交于
Improve suggestion to change struct field to &mut r? ``@estebank`` Now displays a proper underline style suggestion instead of including the code change inline with the message.
-
由 Matthias Krüger 提交于
Mark defaulted `PartialEq`/`PartialOrd` methods as const WIthout it, `const` impls of these traits are unpleasant to write. I think this kind of change is allowed now. although it looks like it might require some Miri tweaks. Let's find out. r? ```@fee1-dead```
-
由 Vadim Petrochenkov 提交于
Use a separate nameless `DefPathData` variant instead
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #87901 (Fix suggestion of additional `pub` when using `pub pub fn ...`) - #89090 (Lint bare traits in AstConv.) - #91818 (Show the unused type for `unused_results` lint) - #91910 (miri: lift restriction on extern types being the only field in a struct) - #91928 (Constify (most) `Option` methods) - #91975 (Move generator check earlier in inlining.) - #92016 (builtin_macros: allow external consumers for AsmArgs parsing) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Matthias Krüger 提交于
builtin_macros: allow external consumers for AsmArgs parsing As discussed in Zulip (https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/parsing.20of.20AsmArgs.20for.20inline.20assembly), we need a function entry point that rustfmt can leverage from a pre-expansion context to get a more structured representation of the asm args without having to duplicate/maintain the token stream parsing r? ```@Amanieu``` and/or ```@joshtriplett```
-
由 Matthias Krüger 提交于
Move generator check earlier in inlining. Inlining into generator may create references to other generators. For instance, inlining `Pin::<&mut from_generator::GenFuture<[generator1]>>::new_unchecked` into `generator2`. This cross reference can then create cycles when computing inlining for `generator1`. In order to avoid this kind of surprises, we forbid all inlining into generators, and rely on LLVM to do the right thing. The existing `remove-zst-query-cycle` already ICEs in inline-mir mode, so we use it as test. Split from #91743.
-
由 Matthias Krüger 提交于
Constify (most) `Option` methods r? ``@oli-obk``
-