-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
file!() macro return absolute path in doc-test compile #46372
Copy link
Copy link
Closed
rust-lang/cargo
#12221Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This a minimal example. Standard compilation resolve
file!()macro as relative project path but doc-test compilation emit follow error:This behavior involve just
include!()macro because when used in function or assignment works like as expectedNow I should disable doc-test to use
file!()for including some auto-generated code.