Skip to content
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 8 pull requests #104573

Merged
merged 21 commits into from
Nov 18, 2022
Merged

Rollup of 8 pull requests #104573

merged 21 commits into from
Nov 18, 2022

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 21 commits November 10, 2022 23:25
implement binding_shadows

migrate till self-in-generic-param-default

use braces in fluent message as suggested by @compiler-errors.

to fix lock file issue reported by CI

migrate 'unreachable label' error

run formatter

name the variables correctly in fluent file

SessionDiagnostic -> Diagnostic

test "pattern/pat-tuple-field-count-cross.rs" passed

test "resolve/bad-env-capture2.rs" passed

test "enum/enum-in-scope.rs" and other depended on "resolve_binding_shadows_something_unacceptable" should be passed now.

fix crash errors while running test-suite. there might be more.

then_some(..) suits better here.

all tests passed

convert TraitImpl and InvalidAsm. TraitImpl is buggy yet. will fix after receiving help from Zulip

migrate "Ralative-2018"

migrate "ancestor only"

migrate "expected found"

migrate "Indeterminate"

migrate "module only"

revert to the older implementation for now. since this is failing at the moment.

follow the convension for fluent variable

order the diag attribute as suggested in review comment

fix merge error. migrate trait-impl-duplicate

make the changes compatible with "Flatten diagnostic slug modules rust-lang#103345"

fix merge

remove commented code

merge issues

fix review comments

fix tests
This commit takes advantage of the ability to set [flex-basis] to a specific
length instead of setting it to `auto` and changing min-/max-width, and
setting flex-grow/-shrink both to 0.

[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
Clippy has an internal lint that checks for the usage of hardcoded def
paths and suggests to replace them with a lang or diagnostic item, if
possible. This was implemented with a hack, by getting all the variants
of the `LangItem` enum and then index into it with the position of the
`LangItem` in the `items` list. This is no longer possible, because the
`items` list can't be accessed anymore.
Migrate rustc_resolve to use SessionDiagnostic, part # 1

crate a somewhat on larger size, so plz allow some time to get it finished.
…o-dynstar, r=eholk

Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting)

This makes sure we don't accidentally allow coercions like `Box<T>` -> `Box<dyn* Trait>`, or in the case of this ICE, `&T` to `&dyn* Trait`. These coercions don't make sense, at least not via the `CoerceUnsized` trait.

Fixes rust-lang#102172
Fixes rust-lang#102429
…f, r=compiler-errors

Detect incorrect chaining of if and if let conditions and recover

Fixes rust-lang#103381
Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets

This is a duplicate of rust-lang#94100 (since the original author is unresponsive), which resolves rust-lang#91417.

On `aarch64-apple-darwin` targets, the internal resolution of `Instant` is lower than that of `Duration`, so math between them becomes non-associative with small-enough durations.

This PR makes this target use the standard Unix implementation (where `Instant` has 1ns resolution), but with `CLOCK_UPTIME_RAW` so it still returns the same values as `mach_absolute_time`[^1].

(Edit: I need someone to confirm that this still works, I do not have access to an M1 device.)

[^1]: https://www.manpagez.com/man/3/clock_gettime/
Add variant_name function to `LangItem`

Clippy has an internal lint that checks for the usage of hardcoded def paths and suggests to replace them with a lang or diagnostic item, if possible. This was implemented with a hack, by getting all the variants of the `LangItem` enum and then index into it with the position of the `LangItem` in the `items` list. This is no longer possible, because the `items` list can't be accessed anymore.

Follow up to rust-lang#103603

cc `@camsteffen`
r? `@oli-obk`

This is blocking the sync between Clippy and Rust. I'm not sure if this is the best solution here, or if I should add a method `items()` to `LanguageItems` and keep the code in Clippy unchanged.
…-func, r=notriddle

Migrate GUI test to use functions

r? `@notriddle`
…ebar-width, r=GuillaumeGomez

rustdoc: clean up sidebar width CSS

This commit takes advantage of the ability to set [flex-basis] to a specific length instead of setting it to `auto` and changing min-/max-width, and setting flex-grow/-shrink both to 0.

This PR should not cause any visual changes.

preview: https://notriddle.com/notriddle-rustdoc-demos/flex-basis-sidebar-width/std/index.html

[flex-basis]: https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 18, 2022
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Nov 18, 2022

📌 Commit 7e5e520 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2022
@bors
Copy link
Contributor

bors commented Nov 18, 2022

⌛ Testing commit 7e5e520 with merge 6d1f72cef0ba4187d297b791ee635bba5e032729...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 18, 2022
@matthiaskrgr
Copy link
Member Author

@bors retry #104563

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 18, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test str::utf8_char_counts ... ok

failures:

---- rc::rc_from_vec_opt stdout ----
thread 'rc::rc_from_vec_opt' panicked at 'assertion failed: `(left == right)`
  left: `-68544`,
 right: `16`: Vector allocation not reused', library\alloc\tests\rc.rs:217:9

failures:
    rc::rc_from_vec_opt


test result: FAILED. 652 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.61s

error: test failed, to rerun pass `-p alloc --test collectionstests`
Build completed unsuccessfully in 0:38:01
make: *** [Makefile:83: ci-mingw-subset-1] Error 1

@bors
Copy link
Contributor

bors commented Nov 18, 2022

⌛ Testing commit 7e5e520 with merge b833ad5...

@bors
Copy link
Contributor

bors commented Nov 18, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing b833ad5 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 18, 2022
@bors bors merged commit b833ad5 into rust-lang:master Nov 18, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 18, 2022
@rust-timer
Copy link
Collaborator

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b833ad5): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-1.2% [-1.2%, -1.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.2% [-1.2%, -1.2%] 1

Cycles

Results

This 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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.5% [-2.3%, -0.6%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-2.3%, -0.6%] 2

flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 21, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#101162 (Migrate rustc_resolve to use SessionDiagnostic, part # 1)
 - rust-lang#103386 (Don't allow `CoerceUnsized` into `dyn*` (except for trait upcasting))
 - rust-lang#103405 (Detect incorrect chaining of if and if let conditions and recover)
 - rust-lang#103594 (Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets)
 - rust-lang#104006 (Add variant_name function to `LangItem`)
 - rust-lang#104494 (Migrate GUI test to use functions)
 - rust-lang#104516 (rustdoc: clean up sidebar width CSS)
 - rust-lang#104550 (fix a typo)

Failed merges:

 - rust-lang#104554 (Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-k36ybtp branch December 22, 2022 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.