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

Use the span of the whole bound when the diagnostic talks about a bound #139374

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 4, 2025

While it makes sense that the host predicate only points to the ~const part, as whether the actual trait bound is satisfied is checked separately, the user facing diagnostic is talking about the entire trait bound, at which point it makes more sense to just highlight the entire bound

r? @compiler-errors or @fee1-dead

@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 Apr 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 4, 2025

HIR ty lowering was modified

cc @fmease

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 4, 2025

📌 Commit a69a219 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 Apr 4, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139041 (Remove `rustc_middle::ty::util::ExplicitSelf`.)
 - rust-lang#139328 (Fix 2024 edition doctest panic output)
 - rust-lang#139339 (unstable book: document tait)
 - rust-lang#139348 (AsyncDestructor: replace fields with impl_did)
 - rust-lang#139353 (Fix `Debug` impl for `LateParamRegionKind`.)
 - rust-lang#139366 (ToSocketAddrs: fix typo)
 - rust-lang#139374 (Use the span of the whole bound when the diagnostic talks about a bound)
 - rust-lang#139378 (Use target-agnostic LLD flags in bootstrap for `use-lld`)
 - rust-lang#139384 (Add `compiletest` adhoc_group for `r? compiletest`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f074bbf into rust-lang:master Apr 5, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 5, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2025
Rollup merge of rust-lang#139374 - oli-obk:const-trait-bound, r=compiler-errors

Use the span of the whole bound when the diagnostic talks about a bound

While it makes sense that the host predicate only points to the `~const` part, as whether the actual trait bound is satisfied is checked separately, the user facing diagnostic is talking about the entire trait bound, at which point it makes more sense to just highlight the entire bound

r? `@compiler-errors` or `@fee1-dead`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Development

Successfully merging this pull request may close these issues.

4 participants