-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use impl's def id when calculating type to specify in UFCS #104334
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use impl's def id when calculating type to specify in UFCS #104334
Conversation
r? @estebank (rustbot has picked a reviewer for you, use r? to override) |
@@ -9,8 +9,8 @@ LL | let _f: base::Foo = base::HasNew::new(); | |||
| | |||
help: use the fully-qualified path to the only available implementation | |||
| | |||
LL | let _f: base::Foo = base::<Foo as HasNew>::new(); | |||
| +++++++ + | |||
LL | let _f: base::Foo = <Foo as base::HasNew>::new(); |
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.
This is an improvement, but for it to actually compile it needs a path to Foo and type params for HasNew:
let _f: base::Foo = <base::Foo as base::HasNew<_>>::new();
I can spin this off into a new issue (or two new issues) if you prefer.
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.
You can make a new issue for this. Thanks for pointing it out.
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.
Reported the missing path as #117623. The missing type params is probably okay, since the problem is in the original code rather than being introduced by the hint.
r=me (in case you need to rebase) |
2580881
to
1225a65
Compare
@bors r=estebank |
…f-id, r=estebank Use impl's def id when calculating type to specify in UFCS Fixes rust-lang#104327 Fixes rust-lang#104328 Also addresses rust-lang#102670 (comment)
…f-id, r=estebank Use impl's def id when calculating type to specify in UFCS Fixes rust-lang#104327 Fixes rust-lang#104328 Also addresses rust-lang#102670 (comment)
…f-id, r=estebank Use impl's def id when calculating type to specify in UFCS Fixes rust-lang#104327 Fixes rust-lang#104328 Also addresses rust-lang#102670 (comment)
…f-id, r=estebank Use impl's def id when calculating type to specify in UFCS Fixes rust-lang#104327 Fixes rust-lang#104328 Also addresses rust-lang#102670 (comment)
⌛ Testing commit 1225a65 with merge 51f5fa23453106ecb83c6df6f2f3008bd8c79c85... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry unrelated apple tester failure |
☀️ Test successful - checks-actions |
Finished benchmarking commit (39b2a41): comparison URL. Overall result: ✅ improvements - no action needed@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.
|
…id, r=estebank Use impl's def id when calculating type to specify in UFCS Fixes rust-lang#104327 Fixes rust-lang#104328 Also addresses rust-lang#102670 (comment)
Fixes #104327
Fixes #104328
Also addresses #102670 (comment)