-
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
Fix SelfVisitor::is_self_ty
ICE
#103221
Fix SelfVisitor::is_self_ty
ICE
#103221
Conversation
r? @oli-obk (rust-highfive has picked a reviewer for you, use r? to override) |
struct S {} | ||
|
||
impl S { | ||
fn f(self: &S::x) {} //~ ERROR ambiguous associated type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. that error seems incorrect. Maybe we should bubble out a new ResolutionError
variant from find_lifetime_for_self
by changing the lifetime
field of the visitor to a Result
that, once set to Err
simply doesn't do anything else anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error does not come from find_lifetime_for
self, it looks like the regular error because
S` is known to be a type and we expect a type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before this regression, rustc caused the following error:
error[E0223]: ambiguous associated type
--> src/main.rs:4:17
|
4 | fn f(self: &S::x) {} //~ ERROR ambiguous associated type
| ^^^^ help: use fully-qualified syntax: `<S as Trait>::x`
struct S {} | ||
|
||
impl S { | ||
fn f(self: &S::x) {} //~ ERROR ambiguous associated type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error does not come from find_lifetime_for
self, it looks like the regular error because
S` is known to be a type and we expect a type.
@bors r+ rollup |
Fix `SelfVisitor::is_self_ty` ICE Fixes rust-lang#103202
Fix `SelfVisitor::is_self_ty` ICE Fixes rust-lang#103202
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#103221 (Fix `SelfVisitor::is_self_ty` ICE) - rust-lang#103230 (Clarify startup) - rust-lang#103281 (Adjust `transmute{,_copy}` to be clearer about which of `T` and `U` is input vs output) - rust-lang#103288 (Fixed docs typo in `library/std/src/time.rs`) - rust-lang#103296 (+/- shortcut now only expand/collapse, not both) - rust-lang#103297 (fix typo) - rust-lang#103313 (Don't label `src/test` tests as `A-testsuite`) - rust-lang#103315 (interpret: remove an incorrect assertion) - rust-lang#103319 (Improve "`~const` is not allowed here" message) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #103202