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

Improve 'generic param from outer item' error for Self and inside static/const items #119939

Merged
merged 2 commits into from Feb 7, 2024

Conversation

clubby789
Copy link
Contributor

Fixes #109596
Fixes #119936

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2024

r? @TaKO8Ki

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added 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. labels Jan 13, 2024
@clubby789 clubby789 added the A-diagnostics Area: Messages for errors, warnings, and lints label Jan 13, 2024
compiler/rustc_resolve/src/late.rs Outdated Show resolved Hide resolved
compiler/rustc_resolve/messages.ftl Outdated Show resolved Hide resolved
@rust-cloud-vms rust-cloud-vms bot force-pushed the static-const-generic-note branch 2 times, most recently from df87809 to 483852a Compare January 13, 2024 22:21
compiler/rustc_resolve/src/ident.rs Outdated Show resolved Hide resolved
compiler/rustc_resolve/src/late.rs Outdated Show resolved Hide resolved
@cjgillot
Copy link
Contributor

I'd like to be prudent with the perf effect, as we thread a lot more data.
@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 14, 2024
@bors
Copy link
Contributor

bors commented Jan 14, 2024

⌛ Trying commit 2cfc817 with merge ca81fe2...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2024
… r=<try>

Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items

Fixes rust-lang#109596
Fixes rust-lang#119936
@bors
Copy link
Contributor

bors commented Jan 14, 2024

☀️ Try build successful - checks-actions
Build commit: ca81fe2 (ca81fe2ba7171b5cd0d9a7542075c89447faae5b)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ca81fe2): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -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)
1.0% [1.0%, 1.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-3.2%, -1.0%] 3
All ❌✅ (primary) - - 0

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.8% [0.8%, 0.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 668.597s -> 670.238s (0.25%)
Artifact size: 308.21 MiB -> 308.11 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 14, 2024
@compiler-errors
Copy link
Member

r? compiler-errors @bors r+ rollup=maybe

@bors
Copy link
Contributor

bors commented Feb 5, 2024

📌 Commit 2cfc817 has been approved by compiler-errors

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 Feb 5, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 6, 2024
…e, r=compiler-errors

Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items

Fixes rust-lang#109596
Fixes rust-lang#119936
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#119614 (unstably allow constants to refer to statics and read from immutable statics)
 - rust-lang#119939 (Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items)
 - rust-lang#120206 (hir: Make sure all `HirId`s have corresponding HIR `Node`s)
 - rust-lang#120331 (pattern_analysis: use a plain `Vec` in `DeconstructedPat`)
 - rust-lang#120396 (Account for unbounded type param receiver in suggestions)
 - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies)
 - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg)
 - rust-lang#120502 (Remove `ffi_returns_twice` feature)
 - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion)
 - rust-lang#120513 (Normalize type outlives obligations in NLL for new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 6, 2024
…e, r=compiler-errors

Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items

Fixes rust-lang#109596
Fixes rust-lang#119936
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#119939 (Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items)
 - rust-lang#120206 (hir: Make sure all `HirId`s have corresponding HIR `Node`s)
 - rust-lang#120331 (pattern_analysis: use a plain `Vec` in `DeconstructedPat`)
 - rust-lang#120396 (Account for unbounded type param receiver in suggestions)
 - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies)
 - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg)
 - rust-lang#120502 (Remove `ffi_returns_twice` feature)
 - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion)
 - rust-lang#120513 (Normalize type outlives obligations in NLL for new solver)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#119939 (Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items)
 - rust-lang#120331 (pattern_analysis: use a plain `Vec` in `DeconstructedPat`)
 - rust-lang#120396 (Account for unbounded type param receiver in suggestions)
 - rust-lang#120423 (update indirect structural match lints to match RFC and to show up for dependencies)
 - rust-lang#120435 (Suggest name value cfg when only value is used for check-cfg)
 - rust-lang#120502 (Remove `ffi_returns_twice` feature)
 - rust-lang#120507 (Account for non-overlapping unmet trait bounds in suggestion)
 - rust-lang#120513 (Normalize type outlives obligations in NLL for new solver)
 - rust-lang#120707 (Don't expect early-bound region to be local when reporting errors in RPITIT well-formedness)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3c52832 into rust-lang:master Feb 7, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 7, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 7, 2024
Rollup merge of rust-lang#119939 - clubby789:static-const-generic-note, r=compiler-errors

Improve 'generic param from outer item' error for `Self` and inside `static`/`const` items

Fixes rust-lang#109596
Fixes rust-lang#119936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
7 participants