-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Add edition checks for some tests that had divergent output #142255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
85c28a9
to
ce7480d
Compare
error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait` | ||
--> $DIR/issue-54895.rs:18:40 | ||
| | ||
LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> { | ||
| ^^^^^^^^^^^^^^^ `impl Trait` implicitly captures all lifetimes in scope | ||
| | ||
note: lifetime declared here | ||
--> $DIR/issue-54895.rs:18:20 | ||
| | ||
LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> { | ||
| ^^ | ||
|
||
error[E0657]: `impl Trait` cannot capture higher-ranked lifetime from outer `impl Trait` | ||
--> $DIR/issue-54895.rs:18:53 | ||
| | ||
LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> { | ||
| ^^ | ||
| | ||
note: lifetime declared here | ||
--> $DIR/issue-54895.rs:18:20 | ||
| | ||
LL | fn f() -> impl for<'a> Trait<'a, Out = impl Sized + 'a> { | ||
| ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These duplicated errors are unfortunate and quite common throughout the test suite.
LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) { | ||
| -- this generic parameter must be used with a generic lifetime parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last edition changes the span being pointed at in such a way that the wording should change (or get the span from previous editions back).
The parts about bare trait names in type position LGTM, but it would probably be better if someone else who knew about RPITs better to assess the changes in those tests r? compiler |
r? compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some diagnostics are bad, but that's a pre-existing issue. @estebank would you mind opening issues for the bad cases here?
This improves test coverage, which seems like a good idea.
//@revisions: edition2015 edition2021 | ||
//@[edition2015] edition:2015 | ||
//@[edition2021] edition:2021 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should have a shorthand for this 🤔
@bors r=fee1-dead,WaffleLapkin rollup |
…s, r=fee1-dead,WaffleLapkin Add edition checks for some tests that had divergent output In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while I was looking at something else.
This comment has been minimized.
This comment has been minimized.
This needs to be rebased and blessed. @bors r- |
@bors rollup=iffy |
This comment has been minimized.
This comment has been minimized.
If we ever start testing every edition, using a new keyword unnecessarily will cause divergent output, so pre-emptively change `gen` into `generator`.
In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while looking at something else.
ce7480d
to
8c3a033
Compare
@bors r=fee1-dead,WaffleLapkin |
@bors p=5 |
…s, r=fee1-dead,WaffleLapkin Add edition checks for some tests that had divergent output In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while I was looking at something else.
Rollup of 17 pull requests Successful merges: - #124595 (Suggest cloning `Arc` moved into closure) - #139594 (Simplify `ObligationCauseCode::IfExpression`) - #141311 (make `tidy-alphabetical` use a natural sort) - #141648 ([rustdoc] Do not emit redundant_explicit_links lint if the doc comment comes from expansion) - #142255 (Add edition checks for some tests that had divergent output) - #142285 (tests: Do not run afoul of asm.validity.non-exhaustive in input-stats) - #142549 (small iter.intersperse.fold() optimization) - #142637 (Remove some glob imports from the type system) - #142647 ([perf] Compute hard errors without diagnostics in impl_intersection_has_impossible_obligation) - #142700 (Remove incorrect comments in `Weak`) - #142884 (StableMIR: Add method to retrieve body of coroutine) - #142925 (Rewrite `.gitattributes` CRLF ui tests into run-make tests) - #143001 (Rename run always ) - #143010 (Update `browser-ui-test` version to `0.20.7`) - #143015 (Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`) - #143020 (codegen_fn_attrs: make comment more precise) - #143033 (Expand const-stabilized API links in relnotes) r? `@ghost` `@rustbot` modify labels: rollup
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 8f21a5c (parent) -> 3b9d04c (this PR) Test differencesShow 84 test diffsStage 1
Stage 2
Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 3b9d04c62f74b9be46c3ba56cf8393529aa81d26 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
In order to expose edition dependent divergences in some tests in the test suite, add explicit
edition
annotations. Some of these tests might require additional work to avoid the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while I was looking at something else.