- 05 6月, 2022 1 次提交
-
-
由 Jack Huey 提交于
-
- 04 6月, 2022 34 次提交
-
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #96642 (Avoid zero-sized allocs in ThinBox if T and H are both ZSTs.) - #97647 (Lazily allocate and initialize pthread locks.) - #97715 (Support the `#[expect]` attribute on fn parameters (RFC-2383)) - #97716 (Fix reachability analysis for const methods) - #97722 (Tighten spans for bad fields in struct deriving `Copy`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
Tighten spans for bad fields in struct deriving `Copy` r? `@estebank` Closes #89137 for good, I think Not sure if this is what you were looking for in https://github.com/rust-lang/rust/issues/89137#issuecomment-1146201791
-
由 Dylan DPC 提交于
Fix reachability analysis for const methods Use `method_might_be_inlined` directly for `ImplItemKind::Fn` instead of duplicating the logic in `def_id_represents_local_inlined_item`. This is parallel to how we use `item_might_be_inlined` for `ItemKind::Fn` in that same body. Fixes #97708
-
由 Dylan DPC 提交于
Support the `#[expect]` attribute on fn parameters (RFC-2383) A small PR to allow the `#[expect]` attribute on function parameters. Nothing more to say, I hope everyone reading this has a lovely day. --- r? ``@wesleywiser`` closes: https://github.com/rust-lang/rust/issues/97650 cc: https://github.com/rust-lang/rust/issues/85549
-
由 Dylan DPC 提交于
Lazily allocate and initialize pthread locks. Lazily allocate and initialize pthread locks. This allows {Mutex, Condvar, RwLock}::new() to be const, while still using the platform's native locks for features like priority inheritance and debug tooling. E.g. on macOS, we cannot directly use the (private) APIs that pthread's locks are implemented with, making it impossible for us to use anything other than pthread while still preserving priority inheritance, etc. This PR doesn't yet make the public APIs const. That's for a separate PR with an FCP. Tracking issue: https://github.com/rust-lang/rust/issues/93740
-
由 Dylan DPC 提交于
Avoid zero-sized allocs in ThinBox if T and H are both ZSTs. This was surprisingly tricky, and took longer to get right than expected. `ThinBox` is a surprisingly subtle piece of code. That said, in the end, a lot of this was due to overthinking[^overthink] -- ultimately the fix ended up fairly clean and simple. [^overthink]: Honestly, for a while I was convinced this couldn't be done without allocations or runtime branches in these cases, but that's obviously untrue. Anyway, as a result of spending all that time debugging, I've extended the tests quite a bit, and also added more debug assertions. Many of these helped for subtle bugs I made in the middle (for example, the alloc/drop tracking is because I ended up double-dropping the value in the case where both were ZSTs), they're arguably a bit of overkill at this point, although I imagine they could help in the future too. Anyway, these tests cover a wide range of size/align cases, nd fully pass under miri[^1]. They also do some smoke-check asserting that the value has the correct alignment, although in practice it's totally within the compiler's rights to delete these assertions since we'd have already done UB if they get hit. They have more boilerplate than they really need, but it's not *too* bad on a per-test basis. A notable absence from testing is atypical header types, but at the moment it's impossible to manually implement `Pointee`. It would be really nice to have testing here, since it's not 100% obvious to me that the aligned read/write we use for `H` are correct in the face of arbitrary combinations of `size_of::<H>()`, `align_of::<H>()`, and `align_of::<T>()`. (That said, I spent a while thinking through it and am *pretty* sure it's fine -- I'd just feel... better if we could test some cases for non-ZST headers which have unequal and align). [^1]: Or at least, they pass under miri if I copy the code and tests into a new crate and run miri on it (after making it less stdlibified). Fixes #96485. I'd request review ``@yaahc,`` but I believe you're taking some time away from reviews, so I'll request from the previous PR's reviewer (I think that the context helps, even if the actual change didn't end up being bad here). r? ``@joshtriplett``
-
由 bors 提交于
Update LLVM submodule Merge upstream release/14.x branch. Fixes #97428.
-
由 Michael Goulet 提交于
-
由 bors 提交于
Rollup of 5 pull requests Successful merges: - #97446 (Make hir().get_generics and generics_of consistent.) - #97656 (Add a suggestion to replace parentheses with angle brackets on associated trait constraint) - #97692 (Add `#T-types/nominated` zulip notification) - #97696 (Do not ICE when failing to normalize during inlining.) - #97702 (Remove useless LocalDefId in ImplTraitContext::Universal.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Michael Goulet 提交于
-
由 bors 提交于
Make params be SmallVec as originally was r? `@cjgillot` It was originally a [`SmallVec`](https://github.com/rust-lang/rust/pull/97598/files#diff-0a61b538a3cec072c76fecae4635af6a12ec3256860029ac70549c2aa53ab394L1497), I've mistakenly changed it [here](https://github.com/rust-lang/rust/pull/97598/files#diff-0a61b538a3cec072c76fecae4635af6a12ec3256860029ac70549c2aa53ab394R1377) to a `Vec`
-
由 xFrednet 提交于
-
由 Matthias Krüger 提交于
Remove useless LocalDefId in ImplTraitContext::Universal.
-
由 Matthias Krüger 提交于
Do not ICE when failing to normalize during inlining. Fixes https://github.com/rust-lang/rust/issues/97695
-
由 Matthias Krüger 提交于
Add `#T-types/nominated` zulip notification Add rule to create topic in aforementioned stream when `I-types-nominated` tag is added
-
由 Matthias Krüger 提交于
Add a suggestion to replace parentheses with angle brackets on associated trait constraint This implements a requested suggestion FIXME in [`compiler/rustc_ast_lowering/src/lib.rs` ](https://github.com/rust-lang/rust/blob/9598b4b594c97dff66feb93522e22db500deea07/compiler/rustc_ast_lowering/src/lib.rs#L921) The suggestion asks for the parentheses to either be replaced with angle brackets or removed completely depending on whether there are arguments provided within. ![image](https://user-images.githubusercontent.com/20026256/171770414-ab60bfe2-ae27-44b0-964d-9ffcc32a7475.png) ![image](https://user-images.githubusercontent.com/20026256/171770383-ca8a2766-b3aa-43e3-8ba4-ae18874886ce.png) r? `@oli-obk`
-
由 Matthias Krüger 提交于
Make hir().get_generics and generics_of consistent. Fetching generics from a HIR node is currently implemented differently in 4 different places. This PR makes the 4 implementations call the single `hir::Node::generics`, which implements the more general version from `generics_of` query.
-
由 Camille GILLOT 提交于
-
由 bors 提交于
std: `<ExitStatus as Display>::fmt` name the signal it died from Related to #95601
-
由 Camille GILLOT 提交于
-
由 bors 提交于
Remove all json handling from rustc_serialize Json is now handled using serde_json. Where appropriate I have replaced json usage with binary serialization (rmeta files) or manual string formatting (emcc linker arg generation). This allowed for removing and simplifying a lot of code, which hopefully results in faster serialization/deserialization and faster compiles of rustc itself. Where sensible we now use serde. Metadata and incr cache serialization keeps using a heavily modified (compared to crates.io) rustc-serialize version that in the future could probably be extended with zero-copy deserialization or other perf tricks that serde can't support due to supporting more than one serialization format. Note that I had to remove `-Zast-json` and `-Zast-json-noexpand` as the relevant AST types don't implement `serde::Serialize`. Fixes #40177 See also https://github.com/rust-lang/compiler-team/issues/418
-
由 Camille GILLOT 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
It doesn't do anything for all encoders
-
由 bjorn3 提交于
They aren't overridden anyway
-
由 bjorn3 提交于
They aren't used anymore now that the json format has been removed
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
由 bjorn3 提交于
-
- 03 6月, 2022 5 次提交
-
-
由 EdwinRy 提交于
-
由 bors 提交于
Rollup of 3 pull requests Successful merges: - #97415 (Compute `is_late_bound_map` query separately from lifetime resolution) - #97471 (Provide more context when denying invalid type params ) - #97681 (Add more eslint checks) Failed merges: - #97446 (Make hir().get_generics and generics_of consistent.) r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
Add more eslint checks A new batch of eslint rules: * [no-fallthrough](https://eslint.org/docs/rules/no-fallthrough) * [no-invalid-regexp](https://eslint.org/docs/rules/no-invalid-regexp) * [no-import-assign](https://eslint.org/docs/rules/no-import-assign) * [no-self-compare](https://eslint.org/docs/rules/no-self-compare) * [no-template-curly-in-string](https://eslint.org/docs/rules/no-template-curly-in-string) * [block-scoped-var](https://eslint.org/docs/rules/block-scoped-var) * [guard-for-in](https://eslint.org/docs/rules/guard-for-in) * [no-alert](https://eslint.org/docs/rules/no-alert) r? ``@notriddle``
-
由 Dylan DPC 提交于
Provide more context when denying invalid type params
-
由 Dylan DPC 提交于
Compute `is_late_bound_map` query separately from lifetime resolution This query is actually very simple, and is only useful for functions and method. It can be computed directly by fetching the HIR, with no need to embed it within the lifetime resolution visitor. Based on https://github.com/rust-lang/rust/pull/96296
-