Skip to content
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

tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs #126137

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Jun 7, 2024

This adds a regression test for an ICE "accidentally" fixed by #101947 that does not add a test for this particular case.

Closes #107564.

I have confirmed the added test code fails with nightly-2023-01-09 (and passes with nightly-2023-01-10 and of course recent nightly).

@rustbot
Copy link
Collaborator

rustbot commented Jun 7, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 7, 2024
@rust-lang rust-lang deleted a comment Jun 7, 2024
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably shouldn't be added as a test, since it's exercising behavior that we may not expect to work on the new trait solver. Type inferfence in higher-ranked associated types is kinda busted.

If you really want to add this test, then you should probably add two explicit revisions for the old and new trait solver. Grep the ui test suite for some lines to steal: //@ revisions: current next.

Also, this test name is not really complete. It should mention something like higher-ranked. Maybe rigid-equate-projections-in-higher-ranked-fn-signature.

@Enselic
Copy link
Member Author

Enselic commented Jun 8, 2024

This probably shouldn't be added as a test, since it's exercising behavior that we may not expect to work on the new trait solver. Type inferfence in higher-ranked associated types is kinda busted.

My main goal is to close #107564. Personally I'm completely fine with closing it with motivation "we don't want a test for this case".

But for now I updated the test.

If you really want to add this test, then you should probably add two explicit revisions for the old and new trait solver. Grep the ui test suite for some lines to steal: //@ revisions: current next.

Done!

Also, this test name is not really complete. It should mention something like higher-ranked. Maybe rigid-equate-projections-in-higher-ranked-fn-signature.

I thought it was sufficient that it was put in a dir called higher-ranked. But your name is much better than mine regardless. Done!

//@[next] check-fail
//@ ignore-compare-mode-next-solver (explicit revisions)

/// This triggers an ICE with (and without) `--emit metadata` using the old
Copy link
Member

@fmease fmease Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) either // (preferably) or //!. rn, this is "documenting" the trait, not the crate

@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 8, 2024

📌 Commit 1293ef7 has been approved by compiler-errors

It is now in the queue for this repository.

@compiler-errors
Copy link
Member

@bors rollup

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 9, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#126137 (tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs)
 - rust-lang#126146 (std::unix::process adding few specific freebsd signals to be able to id.)
 - rust-lang#126155 (Remove empty test suite `tests/run-make-fulldeps`)
 - rust-lang#126168 (std::unix::os current_exe implementation simplification for haiku.)
 - rust-lang#126175 (Use --quiet flag when installing pip dependencies)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 39fe991 into rust-lang:master Jun 9, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 9, 2024
Rollup merge of rust-lang#126137 - Enselic:normalize-generic-arg, r=compiler-errors

tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs

This adds a regression test for an ICE "accidentally" fixed by rust-lang#101947 that does not add a test for this particular case.

Closes rust-lang#107564.

I have confirmed the added test code fails with `nightly-2023-01-09` (and passes with `nightly-2023-01-10` and of course recent `nightly`).
@Enselic Enselic deleted the normalize-generic-arg branch June 9, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

higher ranked projections: ICE -> compile change
6 participants