-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 7 pull requests #111882
Rollup of 7 pull requests #111882
Conversation
Only updated `exploit-mitigations.md` to reflect that the option exists. Removed the alternatives mentioned as they are not actually implemented yet. As this is an unstable feature, should it be added to `unstable-book` also? I didn't do that because I couldn't find the tracking issue for it. (There should be one to track stabilization of the feature.)
…ith binary formats such as bincode or postcard
Fixes rust-lang#111515 and complements rust-lang#106547 by adding support for encoding early bound regions and also excluding projections when transforming trait objects' traits into their identities before emitting type checks.
…eVoid [rustdoc][JSON] Use exclusively externally tagged enums in the JSON representation See [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/.28De.29serialization.20speed.20of.20JSON.20docs) and [this issue](rust-lang#93667) for the relevant context.
Pretty-print inherent projections correctly Previously, we were trying to pretty-print inherent projections with `Printer::print_def_path` which is incorrect since it expects the substitutions to be of a certain format (parents substs followed by own substs) which doesn't hold for inherent projections (self type subst followed by own substs). Now we print inherent projections manually. Fixes rust-lang#111390. Fixes rust-lang#111397. Lacking tests! Is there a test suite / compiletest flags for the pretty-printer? In most if not all cases, inherent projections are normalized away before they get the chance to appear in diagnostics. If I were to create regression tests for linked issues, they would need to be `mir-opt` tests to exercise `-Zdump-mir=all` (right?) which doesn't feel quite adequate to me. `@rustbot` label F-inherent_associated_types
…alle Document stack-protector option Only updated `exploit-mitigations.md` to reflect that the option exists. Removed the alternatives mentioned as they are not actually implemented yet. As this is an unstable feature, should it be added to `unstable-book` also? [Example](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html). I didn't do that because I couldn't find the tracking issue for stack-protector. (There should be one to track stabilization of the feature, I think?) cc `@rcvalle`
fix(resolve): not defined `extern crate shadow_name` Fixes rust-lang#109148 ## Why does rust-lang#109148 panic? When resolving `use std::xx` it enters `visit_scopes` from `early_resolve_ident_in_lexical_scope`, and iters twice during the loop: |iter| `scope` | `break_result` | result | |-|-|-|-| | 0 | `Module` pointed to root | binding pointed to `Undetermined`, so result is `None` | scope changed to `ExternPrelude` | | 1 | `ExternPrelude` | binding pointed to `std` | - | Then, the result of `maybe_resolve_path` is `Module(std)`, so `import.imported_module.set` is executed. Finally, during the `finalize_import` of `use std::xx`, `resolve_path` returns `NonModule` because `Binding(Ident(std), Module(root)`'s binding points to `extern crate blah as std`, which causes the assertion to fail at `assert!(import.imported_module.get().is_none());`. ## Investigation The question is why `#[a] extern crate blah as std` is not defined as a binding of `std::xxx`, which causes the iteration twice during `visit_scopes` when resolving `std::xxx`. Ideally, the value of `break_result.is_some()` should have been valid in the first iteration. After debugging, I found that because `#[a] extern crate blah as std` had been dummied by `placeholder` during `collect_invocations`, so it had lost its attrs, span, etc..., so it will not be defined. However, `expand_invoc` added them back, then the next `build_reduced_graph`, `#[a] extern crate blah as std` would have been defined, so it makes the result of `resolved_path` unexpected, and the program panics. ## Try to solve I think there has two-way to solve this issue: - Expand invocations before the first `resolve_imports` during `fully_expand_fragment`. However, I do not think this is a good idea because it would mess up the current design. - As my PR described: do not define to `extern crate blah as std` during the second `build_reduced_graph`, which is very easy and more reasonable. r? `@petrochenkov`
Update books ## rust-embedded/book 1 commits in d9eb4c3f75435b008881062ffa77bf0d1527b37d..f2aed2fe8e9f55508c86ba3aa4b6789b18a08a22 2023-05-12 12:26:37 UTC to 2023-05-12 12:26:37 UTC - Add link to Comprehensive Rust 🦀 (rust-embedded/book#354) ## rust-lang/nomicon 2 commits in b5f7500fc40775096c2bbd204eae096612cf9047..b5f018fb5930cb733b0a8aaf2eed975d4771e74d 2023-05-19 18:10:25 UTC to 2023-05-14 20:22:16 UTC - Expand unbounded lifetime example code and improve wording (rust-lang/nomicon#408) - Update to 2021 edition (rust-lang/nomicon#410) ## rust-lang/reference 5 commits in 28dc0f3576b55f5e57c5d6e65cd68ba3161e9fd5..553d99b02a53b4133a40d5bd2e19958c67487c00 2023-05-22 10:50:07 UTC to 2023-05-10 01:54:07 UTC - Update raw-dylib documentation for stabilization (rust-lang/reference#1345) - fix a typo (rust-lang/reference#1359) - fixed minor error in a comment that annotated output of a proc macro (rust-lang/reference#1358) - Fix example code in `impl` docs (rust-lang/reference#1360) - Add documentation for debugger_visualizer attribute (rust-lang/reference#1335) ## rust-lang/rustc-dev-guide 4 commits in 28dbeaf..f1e6378 2023-05-18 02:44:05 UTC to 2023-05-11 09:59:23 UTC - Add note about shell completion scripts (rust-lang/rustc-dev-guide#1686) - filter out S-blocked issues in the "Getting Started" search (rust-lang/rustc-dev-guide#1687) - Rename InstCombine to InstSimplify (rust-lang/rustc-dev-guide#1684) - Use unpretty for debugging Hir (rust-lang/rustc-dev-guide#1685)
CFI: Fix encode_region: unexpected ReEarlyBound(0, 'a) Fixes rust-lang#111515 and complements rust-lang#106547 by adding support for encoding early bound regions and also excluding projections when transforming trait objects' traits into their identities before emitting type checks.
…lor-5, r=notriddle Migrate GUI colors test to original CSS color format Follow-up of rust-lang#111459. r? `@notriddle`
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 52dd1cde59 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (d569987): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 646.927s -> 647.707s (0.12%) |
@rustbot label: perf-regression-triaged |
Successful merges:
extern crate shadow_name
#111761 (fix(resolve): not definedextern crate shadow_name
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup