-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Point at inner item when it uses generic type param from outer item or Self
#148370
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
Changes from 5 commits
973ab7d
f693870
8fdd347
44ece2e
86d7556
c962b95
f171c41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,15 @@ error[E0401]: can't use generic parameters from outer item | |
| LL | fn bar<T: Default>(_: T) { | ||
| | - type parameter from outer item | ||
| LL | reuse Trait::static_method { | ||
| | - help: try introducing a local generic parameter here: `T,` | ||
| | ------------- generic parameter used in this inner delegated function | ||
| LL | | ||
| LL | let _ = T::Default(); | ||
| | ^^^^^^^^^^ use of generic parameter from outer item | ||
| | | ||
| help: try introducing a local generic parameter here | ||
| | | ||
| LL | reuse Trait::static_methodT, { | ||
| | ++ | ||
|
||
|
|
||
| error[E0434]: can't capture dynamic environment in a fn item | ||
| --> $DIR/target-expr.rs:26:17 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.