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

Add a regression test for ICE of bad_placeholder_type #81509

Merged
merged 1 commit into from
Jan 31, 2021

Conversation

0yoyoyo
Copy link
Contributor

@0yoyoyo 0yoyoyo commented Jan 29, 2021

Add a regression test for #72685. Check the error message is output instead of ICE.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2021
@estebank
Copy link
Contributor

You might want to instead of creating a new file add this case to an existing test, like https://github.com/rust-lang/rust/blob/c6735a624b45f8170299c0539856c7d3b5f29422/src/test/ui/typeck/typeck_type_placeholder_item_help.rs

@0yoyoyo 0yoyoyo force-pushed the fix-issue-72685-ice-drop-in-place branch from be3c4cb to 81ed4cf Compare January 30, 2021 09:28
@0yoyoyo
Copy link
Contributor Author

0yoyoyo commented Jan 30, 2021

@estebank Thank you for your advise! I moved the test to typeck_type_placeholder_item_help.rs.

BTW, I checked typeck_type_placeholder_item.rs too, and I think test codes that output error with help message should be placed in typeck_type_placeholder_item_help.rs. But current code is not.
Should I refactor this problem? (I'll create new issue if you want.)

@estebank
Copy link
Contributor

@0yoyoyo I think the separation was for the ones that at the time had help and the ones that didn't. My guess would be that the intent was to make one run-rustfix but for some reason they can't be. If you wish create a ticket to track that potential work, but I wouldn't want you to spend too much time on it :)

@bors r+

@bors
Copy link
Contributor

bors commented Jan 30, 2021

📌 Commit 81ed4cf has been approved by estebank

@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 Jan 30, 2021
Comment on lines +31 to +35
LL | const TEST4: fn() -> _ = 42;
| ^
| |
| not allowed in type signatures
| help: use type parameters instead: `T`
Copy link
Contributor

Choose a reason for hiding this comment

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

Pre-existing, but we should maybe file a ticket for the inaccurate suggestion.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 31, 2021
…as-schievink

Rollup of 18 pull requests

Successful merges:

 - rust-lang#78044 (Implement io::Seek for io::Empty)
 - rust-lang#79285 (Stabilize Arc::{increment,decrement}_strong_count)
 - rust-lang#80053 (stabilise `cargo test -- --include-ignored`)
 - rust-lang#80279 (Implement missing `AsMut<str>` for `str`)
 - rust-lang#80470 (Stabilize by-value `[T; N]` iterator `core::array::IntoIter`)
 - rust-lang#80945 (Add Box::downcast() for dyn Any + Send + Sync)
 - rust-lang#81048 (Stabilize `core::slice::fill_with`)
 - rust-lang#81198 (Remove requirement that forces symmetric and transitive PartialEq impls to exist)
 - rust-lang#81422 (Account for existing `_` field pattern when suggesting `..`)
 - rust-lang#81472 (Clone entire `TokenCursor` when collecting tokens)
 - rust-lang#81484 (Optimize decimal formatting of 128-bit integers)
 - rust-lang#81491 (Balance sidebar `Deref` cycle check with main content)
 - rust-lang#81509 (Add a regression test for ICE of bad_placeholder_type)
 - rust-lang#81547 (Edit rustc_typeck top-level docs)
 - rust-lang#81550 (Replace predecessor with range in collections documentation)
 - rust-lang#81558 (Fix ascii art text wrapping in mobile)
 - rust-lang#81562 (Clarify that InPlaceIterable guarantees extend to all advancing iterator methods.)
 - rust-lang#81563 (Improve docblock readability on small screen)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c74f004 into rust-lang:master Jan 31, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 31, 2021
@0yoyoyo 0yoyoyo deleted the fix-issue-72685-ice-drop-in-place branch February 19, 2021 14:07
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants