Rollup merge of #98530 - davidkna:known-bug-ref, r=Mark-Simulacrum

compiletest: add issue number param to `known-bug`

I was getting some errors while testing this, but I'm pretty sure that was unrelated to my changes.

Closes #98436

> Basically, instead of `// known-bug`, do `// known-bug #00000` or maybe `// known-bug chalk#00`?
>
> From: https://rust-lang.zulipchat.com/#narrow/stream/326866-t-types.2Fnominated/topic/.2398095.3A.20NLL.3A.20unsound.20verification.20of.20higher.20ranked.20outlives.E2.80.A6/near/287258738

I also added an `unknown` escape-hatch because I didn't find corresponding issues for every `// known-bug`.

The syntax also ended up being `// known-bug: `, because of `set_name_value_directive`.
This commit is contained in:
Matthias Krüger 2022-06-27 08:06:47 +02:00 committed by GitHub
commit 13e4f87c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 39 additions and 17 deletions

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: unknown
// compile-flags: -Z chalk --edition=2021
fn main() -> () {}

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #80626
// This should pass, but it requires `Sized` to be coinductive.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #86218
// This should pass, but seems to run into a TAIT issue.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #87735, #88526
// This should pass, but we need an extension of implied bounds (probably).

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #87748
// This should pass, but unnormalized input args aren't treated as implied.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #87755
// This should pass.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #87803
// This should pass, but using a type alias vs a reference directly
// changes late-bound -> early-bound.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #88382
// This should pass, but has a missed normalization due to HRTB.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #88460
// This should pass, but has a missed normalization due to HRTB.

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #88526
// This should pass, but requires more logic.

View File

@ -1,6 +1,6 @@
// check-fail
// edition:2021
// known-bug
// known-bug: #88908
// This should pass, but seems to run into a TAIT bug.

View File

@ -1,4 +1,4 @@
// known-bug
// known-bug: #95034
// failure-status: 101
// compile-flags: --edition=2021 --crate-type=lib
// rustc-env:RUST_BACKTRACE=0

View File

@ -1,5 +1,5 @@
// check-fail
// known-bug
// known-bug: #47511
// Regression test for #47511: anonymous lifetimes can appear
// unconstrained in a return type, but only if they appear just once

View File

@ -1,4 +1,4 @@
// known-bug
// known-bug: #93008
// build-fail
// failure-status: 101
// compile-flags:--crate-type=lib -Zmir-opt-level=3

View File

@ -1,4 +1,4 @@
// known-bug
// known-bug: #96572
// compile-flags: --edition=2021 --crate-type=lib
// rustc-env:RUST_BACKTRACE=0

View File

@ -1,7 +1,7 @@
// Regression test for issue #57611
// Ensures that we don't ICE
// FIXME: This should compile, but it currently doesn't
// known-bug
// known-bug: unknown
#![feature(trait_alias)]
#![feature(type_alias_impl_trait)]

View File

@ -395,7 +395,29 @@ impl TestProps {
);
config.set_name_directive(ln, STDERR_PER_BITWIDTH, &mut self.stderr_per_bitwidth);
config.set_name_directive(ln, INCREMENTAL, &mut self.incremental);
config.set_name_directive(ln, KNOWN_BUG, &mut self.known_bug);
// Unlike the other `name_value_directive`s this needs to be handled manually,
// because it sets a `bool` flag.
if let Some(known_bug) = config.parse_name_value_directive(ln, KNOWN_BUG) {
let known_bug = known_bug.trim();
if known_bug == "unknown"
|| known_bug.split(',').all(|issue_ref| {
issue_ref
.trim()
.split_once('#')
.filter(|(_, number)| {
number.chars().all(|digit| digit.is_numeric())
})
.is_some()
})
{
self.known_bug = true;
} else {
panic!(
"Invalid known-bug value: {known_bug}\nIt requires comma-separated issue references (`#000` or `chalk#000`) or `unknown`."
);
}
}
config.set_name_value_directive(ln, MIR_UNIT_TEST, &mut self.mir_unit_test, |s| {
s.trim().to_string()
});