-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
This works:
#[test]
fn unit_1() -> Result<(), &'static str>
{
}
But this doesn’t:
#[test]
fn unit_1<'a>() -> Result<(), &'a str>
{
}
error: functions used as tests must have signature fn() -> ()
--> crate/test.rs:162:5
|
162 | / fn unit_1<'a>() -> Result<(), &'a str>
Meta
rustc 1.31.0-nightly (46880f41b 2018-10-15)
binary: rustc
commit-hash: 46880f41b7aeb897b8245474196bba9dc11f0e88
commit-date: 2018-10-15
host: x86_64-unknown-linux-gnu
release: 1.31.0-nightly
LLVM version: 8.0
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Projects
Status
Done