-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
collect doc alias as tips during resolution
- Loading branch information
Showing
9 changed files
with
237 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// issue#124273 | ||
|
||
#[doc(alias="DocAliasS1")] | ||
pub struct S1; | ||
//~^ NOTE: `S1` has a name defined in the doc alias attribute as `DocAliasS1` | ||
|
||
#[doc(alias="DocAliasS2")] | ||
#[doc(alias("DocAliasS3", "DocAliasS4"))] | ||
pub struct S2; | ||
//~^ NOTE: `S2` has a name defined in the doc alias attribute as `DocAliasS2` | ||
//~| NOTE: `S2` has a name defined in the doc alias attribute as `DocAliasS3` | ||
//~| NOTE: `S2` has a name defined in the doc alias attribute as `DocAliasS4` | ||
|
||
#[doc(alias("doc_alias_f1", "doc_alias_f2"))] | ||
pub fn f() {} | ||
//~^ NOTE: `f` has a name defined in the doc alias attribute as `doc_alias_f1` | ||
//~| NOTE: `f` has a name defined in the doc alias attribute as `doc_alias_f2` | ||
|
||
mod m { | ||
#[doc(alias="DocAliasS5")] | ||
pub struct S5; | ||
//~^ NOTE: `S5` has a name defined in the doc alias attribute as `DocAliasS5` | ||
} | ||
|
||
fn main() { | ||
DocAliasS1; | ||
//~^ ERROR: cannot find value `DocAliasS1` in this scope | ||
DocAliasS2; | ||
//~^ ERROR: cannot find value `DocAliasS2` in this scope | ||
DocAliasS3; | ||
//~^ ERROR: cannot find value `DocAliasS3` in this scope | ||
DocAliasS4; | ||
//~^ ERROR: cannot find value `DocAliasS4` in this scope | ||
doc_alias_f1(); | ||
//~^ ERROR: cannot find function `doc_alias_f1` in this scope | ||
doc_alias_f2(); | ||
//~^ ERROR: cannot find function `doc_alias_f2` in this scope | ||
m::DocAliasS5; | ||
//~^ ERROR: cannot find value `DocAliasS5` in module `m` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
error[E0425]: cannot find value `DocAliasS1` in this scope | ||
--> $DIR/use-doc-alias-name.rs:26:3 | ||
| | ||
LL | pub struct S1; | ||
| -------------- `S1` has a name defined in the doc alias attribute as `DocAliasS1` | ||
... | ||
LL | DocAliasS1; | ||
| ^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find value `DocAliasS2` in this scope | ||
--> $DIR/use-doc-alias-name.rs:28:3 | ||
| | ||
LL | pub struct S2; | ||
| -------------- `S2` has a name defined in the doc alias attribute as `DocAliasS2` | ||
... | ||
LL | DocAliasS2; | ||
| ^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find value `DocAliasS3` in this scope | ||
--> $DIR/use-doc-alias-name.rs:30:3 | ||
| | ||
LL | pub struct S2; | ||
| -------------- `S2` has a name defined in the doc alias attribute as `DocAliasS3` | ||
... | ||
LL | DocAliasS3; | ||
| ^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find value `DocAliasS4` in this scope | ||
--> $DIR/use-doc-alias-name.rs:32:3 | ||
| | ||
LL | pub struct S2; | ||
| -------------- `S2` has a name defined in the doc alias attribute as `DocAliasS4` | ||
... | ||
LL | DocAliasS4; | ||
| ^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find value `DocAliasS5` in module `m` | ||
--> $DIR/use-doc-alias-name.rs:38:6 | ||
| | ||
LL | pub struct S5; | ||
| -------------- `S5` has a name defined in the doc alias attribute as `DocAliasS5` | ||
... | ||
LL | m::DocAliasS5; | ||
| ^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find function `doc_alias_f1` in this scope | ||
--> $DIR/use-doc-alias-name.rs:34:3 | ||
| | ||
LL | pub fn f() {} | ||
| ------------- `f` has a name defined in the doc alias attribute as `doc_alias_f1` | ||
... | ||
LL | doc_alias_f1(); | ||
| ^^^^^^^^^^^^ | ||
|
||
error[E0425]: cannot find function `doc_alias_f2` in this scope | ||
--> $DIR/use-doc-alias-name.rs:36:3 | ||
| | ||
LL | pub fn f() {} | ||
| ------------- `f` has a name defined in the doc alias attribute as `doc_alias_f2` | ||
... | ||
LL | doc_alias_f2(); | ||
| ^^^^^^^^^^^^ | ||
|
||
error: aborting due to 7 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0425`. |