about summary refs log tree commit diff
path: root/src/test/ui/proc-macro
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2020-01-21 23:01:21 -0800
committerEsteban Küber <esteban@kuber.com.ar>2020-01-26 10:57:18 -0800
commit697fdc568e28fbb376567eda4edb2c2a05db68de (patch)
tree2353388fac15725d1de0ef61d3c729dda69ba9ff /src/test/ui/proc-macro
parent8ad83afe5bcfa983a24b6f720c9ef389350f414b (diff)
downloadrust-697fdc568e28fbb376567eda4edb2c2a05db68de.tar.gz
rust-697fdc568e28fbb376567eda4edb2c2a05db68de.zip
Suggest defining type parameter when appropriate
```
error[E0412]: cannot find type `T` in this scope
 --> file.rs:3:12
  |
3 | impl Trait<T> for Struct {}
  |     -      ^ not found in this scope
  |     |
  |     help: you might be missing a type parameter: `<T>`
```

Fix #64298.
Diffstat (limited to 'src/test/ui/proc-macro')
-rw-r--r--src/test/ui/proc-macro/generate-mod.stderr12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr
index 829d8bf4c81..fe53fb242f4 100644
--- a/src/test/ui/proc-macro/generate-mod.stderr
+++ b/src/test/ui/proc-macro/generate-mod.stderr
@@ -6,6 +6,9 @@ LL | generate_mod::check!();
    | |
    | not found in this scope
    | in this macro invocation
+   |
+   = note: possible candidate is found in another module, you can import it into scope:
+           FromOutside
 
 error[E0412]: cannot find type `Outer` in this scope
   --> $DIR/generate-mod.rs:9:1
@@ -15,18 +18,27 @@ LL | generate_mod::check!();
    | |
    | not found in this scope
    | in this macro invocation
+   |
+   = note: possible candidate is found in another module, you can import it into scope:
+           Outer
 
 error[E0412]: cannot find type `FromOutside` in this scope
   --> $DIR/generate-mod.rs:12:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+   = note: possible candidate is found in another module, you can import it into scope:
+           FromOutside
 
 error[E0412]: cannot find type `OuterAttr` in this scope
   --> $DIR/generate-mod.rs:12:1
    |
 LL | #[generate_mod::check_attr]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
+   |
+   = note: possible candidate is found in another module, you can import it into scope:
+           OuterAttr
 
 warning: cannot find type `FromOutside` in this scope
   --> $DIR/generate-mod.rs:16:10